@hisaabo/cli 0.6.1 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +31 -0
- package/README.md +9 -0
- package/dist/bin/{audit-trail-4AMEFQGB.js → audit-trail-IJ6SKACR.js} +3 -3
- package/dist/bin/{categories-CLCBRNWC.js → categories-O6TODPAH.js} +2 -2
- package/dist/bin/{check-slug-OKW7KDYG.js → check-slug-P7RFU6OP.js} +2 -2
- package/dist/bin/chunk-NO4FIFMS.js +0 -0
- package/dist/bin/{chunk-FIMJZAS4.js → chunk-QUITS2FE.js} +46 -1
- package/dist/bin/{chunk-GXRLFDZW.js → chunk-WDN7RIE3.js} +32 -2
- package/dist/bin/{chunk-T63VQXNM.js → chunk-ZPYC767N.js} +1 -0
- package/dist/bin/{client-2ZKMLWI6.js → client-36JX5MR3.js} +1 -1
- package/dist/bin/{collection-efficiency-TECE6PVQ.js → collection-efficiency-DA5RWG3V.js} +3 -3
- package/dist/bin/{config-335MN4I7.js → config-4LLNT4SH.js} +5 -1
- package/dist/bin/{create-AS2YVGRA.js → create-C5INBPQO.js} +2 -2
- package/dist/bin/{default-account-3RVSU7RF.js → default-account-2GMQ7ZA4.js} +2 -2
- package/dist/bin/{expenses-KXFQJKD6.js → expenses-S2YVA5UT.js} +3 -3
- package/dist/bin/{export-UHZISG7H.js → export-YOOODNVX.js} +2 -2
- package/dist/bin/export-ZA43MLWO.js +191 -0
- package/dist/bin/{factory-OBESY2LG.js → factory-6MUCSXTL.js} +3 -3
- package/dist/bin/{get-WUSYEMG4.js → get-GMQRROK2.js} +2 -2
- package/dist/bin/{get-GTL556HL.js → get-ZV3SC2VY.js} +3 -3
- package/dist/bin/hisaabo.js +107 -59
- package/dist/bin/import-UUHMLCKX.js +267 -0
- package/dist/bin/{invitations-U4ZNYWY7.js → invitations-OVORTTMF.js} +2 -2
- package/dist/bin/{invite-5S4GJKRF.js → invite-GGHBZY4U.js} +2 -2
- package/dist/bin/{invoice-breakdown-PP3BZQLG.js → invoice-breakdown-32XXAZDP.js} +3 -3
- package/dist/bin/{items-CHEFLI7C.js → items-6NOIMH6B.js} +3 -3
- package/dist/bin/{items-toggle-ETVCDCU6.js → items-toggle-L6W6QKQD.js} +2 -2
- package/dist/bin/{list-3FO4UJKC.js → list-FC5JHKHD.js} +3 -3
- package/dist/bin/{list-RJ34MFPR.js → list-OXAVDXH7.js} +2 -2
- package/dist/bin/{list-LQJGTZB4.js → list-RAR56EMQ.js} +2 -2
- package/dist/bin/{members-TE5K5NQC.js → members-Y6XJVHHR.js} +3 -3
- package/dist/bin/{monthly-comparison-Q6KPMTPS.js → monthly-comparison-IAUZ6SBJ.js} +3 -3
- package/dist/bin/{order-cancel-NOQDBL2N.js → order-cancel-QRTCNART.js} +2 -2
- package/dist/bin/{order-confirm-6WMKTGPV.js → order-confirm-LGQOMC4O.js} +2 -2
- package/dist/bin/{order-get-ONWR4GTW.js → order-get-4XAQCRYV.js} +3 -3
- package/dist/bin/{order-update-IVO4AFGV.js → order-update-KZY4H2UR.js} +3 -3
- package/dist/bin/output-NUOL7KJW.js +0 -0
- package/dist/bin/{payment-modes-FXB2G6WP.js → payment-modes-DY2ZEMK7.js} +3 -3
- package/dist/bin/{profit-loss-XPYELDTH.js → profit-loss-5GJBG3PL.js} +3 -3
- package/dist/bin/{receivables-aging-MU6Q3DZ4.js → receivables-aging-6A7XJKDT.js} +3 -3
- package/dist/bin/{remove-DJBOOOR4.js → remove-ZBX34TIQ.js} +2 -2
- package/dist/bin/{revoke-WRIK7HLY.js → revoke-XDNOA2GJ.js} +2 -2
- package/dist/bin/{revoke-5L5GZ4ZZ.js → revoke-ZTAMW2Q2.js} +2 -2
- package/dist/bin/{revoke-all-QARW2G6R.js → revoke-all-365NRBOA.js} +2 -2
- package/dist/bin/{revoke-invitation-ZGLJHYNB.js → revoke-invitation-PQH7XNYA.js} +2 -2
- package/dist/bin/{sales-trend-P5HOZJSX.js → sales-trend-D6PQ7MHY.js} +3 -3
- package/dist/bin/{sequence-LK6QLSI5.js → sequence-KZWADVD7.js} +2 -2
- package/dist/bin/{store-FU7CEILC.js → store-SVRZBUFO.js} +3 -3
- package/dist/bin/{summary-XONLN72I.js → summary-H6U7O5GJ.js} +3 -3
- package/dist/bin/{top-customers-U6HQW2GH.js → top-customers-ATBN6RDI.js} +3 -3
- package/dist/bin/{top-items-EAOIVZ4P.js → top-items-XXU6KYTC.js} +3 -3
- package/dist/bin/{top-outstanding-4546FJDH.js → top-outstanding-JTQNGGW4.js} +3 -3
- package/dist/bin/{unpaid-invoices-AED55PLC.js → unpaid-invoices-BTNQFWCH.js} +3 -3
- package/dist/bin/{untracked-ZEM2CDHC.js → untracked-PAMEDJ6Y.js} +3 -3
- package/dist/bin/{update-FO7AAXF5.js → update-6ZMX2OYX.js} +3 -3
- package/dist/bin/{update-OZPBIBME.js → update-EGHPFXLK.js} +2 -2
- package/dist/bin/{update-QCK32XAG.js → update-EK4NJWU4.js} +3 -3
- package/dist/bin/{update-role-RB35QIA5.js → update-role-24PDTNFK.js} +2 -2
- package/dist/bin/{update-settings-EUC2FJQJ.js → update-settings-AASI6WZX.js} +2 -2
- package/package.json +35 -9
- package/.turbo/turbo-build.log +0 -13
- package/.turbo/turbo-typecheck.log +0 -4
- package/CLI-UX-ARCHITECTURE.md +0 -1269
- package/src/auth.ts +0 -221
- package/src/bin/hisaabo.ts +0 -74
- package/src/bin/registrars/api-key.ts +0 -44
- package/src/bin/registrars/auth.ts +0 -222
- package/src/bin/registrars/automated-invoice.ts +0 -167
- package/src/bin/registrars/bank-recon.ts +0 -34
- package/src/bin/registrars/bank.ts +0 -124
- package/src/bin/registrars/business.ts +0 -120
- package/src/bin/registrars/dashboard.ts +0 -225
- package/src/bin/registrars/document.ts +0 -184
- package/src/bin/registrars/einvoice.ts +0 -46
- package/src/bin/registrars/ewb.ts +0 -37
- package/src/bin/registrars/expense.ts +0 -87
- package/src/bin/registrars/gst.ts +0 -57
- package/src/bin/registrars/import.ts +0 -49
- package/src/bin/registrars/invoice.ts +0 -117
- package/src/bin/registrars/itc.ts +0 -56
- package/src/bin/registrars/item.ts +0 -112
- package/src/bin/registrars/journal.ts +0 -47
- package/src/bin/registrars/party.ts +0 -81
- package/src/bin/registrars/payment.ts +0 -128
- package/src/bin/registrars/report.ts +0 -186
- package/src/bin/registrars/session.ts +0 -32
- package/src/bin/registrars/shipment.ts +0 -74
- package/src/bin/registrars/store.ts +0 -128
- package/src/bin/registrars/target.ts +0 -46
- package/src/bin/registrars/tenant.ts +0 -73
- package/src/client.ts +0 -2051
- package/src/commands/api-key/create.ts +0 -72
- package/src/commands/api-key/list.ts +0 -71
- package/src/commands/api-key/revoke.ts +0 -46
- package/src/commands/automated-invoice/create.ts +0 -85
- package/src/commands/automated-invoice/delete.ts +0 -42
- package/src/commands/automated-invoice/get.ts +0 -113
- package/src/commands/automated-invoice/history.ts +0 -65
- package/src/commands/automated-invoice/index.ts +0 -11
- package/src/commands/automated-invoice/list.ts +0 -91
- package/src/commands/automated-invoice/pause.ts +0 -29
- package/src/commands/automated-invoice/resume.ts +0 -29
- package/src/commands/automated-invoice/run-now.ts +0 -29
- package/src/commands/automated-invoice/suggestions.ts +0 -68
- package/src/commands/automated-invoice/update.ts +0 -54
- package/src/commands/automated-invoice/usage.ts +0 -68
- package/src/commands/bank/gateway-config.ts +0 -61
- package/src/commands/bank/index.ts +0 -244
- package/src/commands/bank/update-gateway.ts +0 -84
- package/src/commands/bank-recon/index.ts +0 -127
- package/src/commands/business/audit-trail.ts +0 -79
- package/src/commands/business/export.ts +0 -52
- package/src/commands/business/get.ts +0 -55
- package/src/commands/business/sequence.ts +0 -65
- package/src/commands/business/update.ts +0 -64
- package/src/commands/dashboard/collection-efficiency.ts +0 -164
- package/src/commands/dashboard/expenses.ts +0 -76
- package/src/commands/dashboard/invoice-breakdown.ts +0 -89
- package/src/commands/dashboard/monthly-comparison.ts +0 -193
- package/src/commands/dashboard/payment-modes.ts +0 -121
- package/src/commands/dashboard/profit-loss.ts +0 -146
- package/src/commands/dashboard/receivables-aging.ts +0 -169
- package/src/commands/dashboard/sales-trend.ts +0 -68
- package/src/commands/dashboard/summary.ts +0 -105
- package/src/commands/dashboard/top-customers.ts +0 -70
- package/src/commands/dashboard/top-items.ts +0 -74
- package/src/commands/dashboard/top-outstanding.ts +0 -61
- package/src/commands/dashboard.ts +0 -105
- package/src/commands/document/factory.ts +0 -590
- package/src/commands/einvoice/index.ts +0 -109
- package/src/commands/ewb/index.ts +0 -108
- package/src/commands/expense/categories.ts +0 -40
- package/src/commands/expense/create.ts +0 -51
- package/src/commands/expense/delete.ts +0 -45
- package/src/commands/expense/list.ts +0 -65
- package/src/commands/expense/update.ts +0 -58
- package/src/commands/gst/index.ts +0 -194
- package/src/commands/import/index.ts +0 -168
- package/src/commands/invoice/create.ts +0 -262
- package/src/commands/invoice/delete.ts +0 -44
- package/src/commands/invoice/get.ts +0 -105
- package/src/commands/invoice/list.ts +0 -126
- package/src/commands/invoice/pdf.ts +0 -75
- package/src/commands/invoice/status.ts +0 -41
- package/src/commands/itc/index.ts +0 -163
- package/src/commands/item/categories.ts +0 -40
- package/src/commands/item/create.ts +0 -98
- package/src/commands/item/delete.ts +0 -44
- package/src/commands/item/list.ts +0 -81
- package/src/commands/item/low-stock-count.ts +0 -32
- package/src/commands/item/merge.ts +0 -53
- package/src/commands/item/price-history.ts +0 -59
- package/src/commands/item/rename-unit.ts +0 -39
- package/src/commands/item/sales-stats.ts +0 -44
- package/src/commands/item/stock-history.ts +0 -70
- package/src/commands/item/stock.ts +0 -46
- package/src/commands/item/switch-base-unit.ts +0 -42
- package/src/commands/item/update.ts +0 -59
- package/src/commands/item/variants-create.ts +0 -58
- package/src/commands/item/variants-delete.ts +0 -47
- package/src/commands/item/variants-list.ts +0 -63
- package/src/commands/item/variants-update.ts +0 -61
- package/src/commands/journal/index.ts +0 -156
- package/src/commands/party/create.ts +0 -88
- package/src/commands/party/delete.ts +0 -44
- package/src/commands/party/get.ts +0 -42
- package/src/commands/party/ledger-report.ts +0 -81
- package/src/commands/party/ledger.ts +0 -63
- package/src/commands/party/list.ts +0 -69
- package/src/commands/party/merge.ts +0 -50
- package/src/commands/party/stats.ts +0 -40
- package/src/commands/party/top-items.ts +0 -57
- package/src/commands/party/update.ts +0 -65
- package/src/commands/payment/create.ts +0 -131
- package/src/commands/payment/default-account.ts +0 -56
- package/src/commands/payment/delete.ts +0 -46
- package/src/commands/payment/get.ts +0 -59
- package/src/commands/payment/list.ts +0 -66
- package/src/commands/payment/unpaid-invoices.ts +0 -69
- package/src/commands/payment/untracked.ts +0 -70
- package/src/commands/payment/update.ts +0 -54
- package/src/commands/report/index.ts +0 -736
- package/src/commands/session/list.ts +0 -91
- package/src/commands/session/revoke-all.ts +0 -20
- package/src/commands/session/revoke.ts +0 -32
- package/src/commands/shipment/index.ts +0 -170
- package/src/commands/store/check-slug.ts +0 -48
- package/src/commands/store/index.ts +0 -77
- package/src/commands/store/items-toggle.ts +0 -41
- package/src/commands/store/items.ts +0 -61
- package/src/commands/store/order-cancel.ts +0 -48
- package/src/commands/store/order-confirm.ts +0 -45
- package/src/commands/store/order-get.ts +0 -66
- package/src/commands/store/order-update.ts +0 -52
- package/src/commands/store/update-settings.ts +0 -52
- package/src/commands/target/index.ts +0 -118
- package/src/commands/tenant/invitations.ts +0 -62
- package/src/commands/tenant/invite.ts +0 -57
- package/src/commands/tenant/list.ts +0 -46
- package/src/commands/tenant/members.ts +0 -55
- package/src/commands/tenant/remove.ts +0 -47
- package/src/commands/tenant/revoke-invitation.ts +0 -32
- package/src/commands/tenant/update-role.ts +0 -41
- package/src/config.ts +0 -96
- package/src/error-handler.ts +0 -53
- package/src/format.ts +0 -180
- package/src/output.ts +0 -228
- package/src/spinner.ts +0 -39
- package/tsconfig.json +0 -22
- package/tsup.config.ts +0 -18
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
import { Command } from "commander";
|
|
2
|
-
import type { DocTypeConfig } from "../../commands/document/factory.js";
|
|
3
|
-
|
|
4
|
-
const DOC_TYPES: DocTypeConfig[] = [
|
|
5
|
-
{
|
|
6
|
-
cmd: "quotation",
|
|
7
|
-
label: "Quotation",
|
|
8
|
-
nsKey: "quotation",
|
|
9
|
-
statuses: ["draft", "sent", "accepted", "rejected", "expired", "cancelled"],
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
cmd: "credit-note",
|
|
13
|
-
label: "Credit Note",
|
|
14
|
-
nsKey: "creditNote",
|
|
15
|
-
statuses: ["draft", "confirmed", "cancelled"],
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
cmd: "debit-note",
|
|
19
|
-
label: "Debit Note",
|
|
20
|
-
nsKey: "debitNote",
|
|
21
|
-
statuses: ["draft", "confirmed", "cancelled"],
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
cmd: "delivery-challan",
|
|
25
|
-
label: "Delivery Challan",
|
|
26
|
-
nsKey: "deliveryChallan",
|
|
27
|
-
statuses: ["draft", "dispatched", "delivered", "cancelled"],
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
cmd: "proforma",
|
|
31
|
-
label: "Proforma Invoice",
|
|
32
|
-
nsKey: "proforma",
|
|
33
|
-
statuses: ["draft", "sent", "accepted", "rejected", "expired", "converted", "cancelled"],
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
cmd: "sales-return",
|
|
37
|
-
label: "Sales Return",
|
|
38
|
-
nsKey: "salesReturn",
|
|
39
|
-
statuses: ["draft", "confirmed", "cancelled"],
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
cmd: "purchase-return",
|
|
43
|
-
label: "Purchase Return",
|
|
44
|
-
nsKey: "purchaseReturn",
|
|
45
|
-
statuses: ["draft", "confirmed", "cancelled"],
|
|
46
|
-
},
|
|
47
|
-
];
|
|
48
|
-
|
|
49
|
-
export function registerDocumentCommands(program: Command): void {
|
|
50
|
-
for (const dt of DOC_TYPES) {
|
|
51
|
-
const parent = program.command(dt.cmd).description(`${dt.label} management`);
|
|
52
|
-
|
|
53
|
-
parent
|
|
54
|
-
.command("list")
|
|
55
|
-
.description(`List ${dt.label.toLowerCase()}s`)
|
|
56
|
-
.option("--json", "JSON output")
|
|
57
|
-
.option("--format <format>", "Output format: table, tsv, csv, ids")
|
|
58
|
-
.option("--status <status>", `Filter by status: ${dt.statuses.join(", ")}`)
|
|
59
|
-
.option("--party <search>", "Filter by party name")
|
|
60
|
-
.option("--from <date>", "Start date (YYYY-MM-DD)")
|
|
61
|
-
.option("--to <date>", "End date (YYYY-MM-DD)")
|
|
62
|
-
.option("--this-month", "Current month")
|
|
63
|
-
.option("--this-fy", "Current financial year")
|
|
64
|
-
.option("--page <n>", "Page number", parseInt)
|
|
65
|
-
.option("--limit <n>", "Items per page", parseInt)
|
|
66
|
-
.action(async (opts) => {
|
|
67
|
-
const { docListCommand } = await import("../../commands/document/factory.js");
|
|
68
|
-
await docListCommand(dt, opts);
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
parent
|
|
72
|
-
.command("get <id>")
|
|
73
|
-
.description(`Get ${dt.label.toLowerCase()} details`)
|
|
74
|
-
.option("--json", "JSON output")
|
|
75
|
-
.action(async (id, opts) => {
|
|
76
|
-
const { docGetCommand } = await import("../../commands/document/factory.js");
|
|
77
|
-
await docGetCommand(dt, id, opts);
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
parent
|
|
81
|
-
.command("create")
|
|
82
|
-
.description(`Create a new ${dt.label.toLowerCase()}`)
|
|
83
|
-
.option("--json", "JSON output")
|
|
84
|
-
.option("--party-id <id>", "Party UUID")
|
|
85
|
-
.option("--party <name>", "Party search name")
|
|
86
|
-
.option("--date <date>", "Document date (YYYY-MM-DD)")
|
|
87
|
-
.option("--due-date <date>", "Due date (YYYY-MM-DD)")
|
|
88
|
-
.option("--item <desc>", "Item description (repeatable)", (v, a: string[]) => [...a, v], [] as string[])
|
|
89
|
-
.option("--qty <n>", "Quantity per item (repeatable)", (v, a: string[]) => [...a, v], [] as string[])
|
|
90
|
-
.option("--rate <n>", "Rate per item (repeatable)", (v, a: string[]) => [...a, v], [] as string[])
|
|
91
|
-
.option("--notes <text>", "Notes")
|
|
92
|
-
.option("--discount <pct>", "Discount percent")
|
|
93
|
-
.option("-y, --yes", "Skip confirmation")
|
|
94
|
-
.action(async (opts) => {
|
|
95
|
-
const { docCreateCommand } = await import("../../commands/document/factory.js");
|
|
96
|
-
await docCreateCommand(dt, opts);
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
parent
|
|
100
|
-
.command("update-status <id> <status>")
|
|
101
|
-
.description(`Update ${dt.label.toLowerCase()} status (${dt.statuses.join(", ")})`)
|
|
102
|
-
.option("--json", "JSON output")
|
|
103
|
-
.action(async (id, status, opts) => {
|
|
104
|
-
const { docStatusCommand } = await import("../../commands/document/factory.js");
|
|
105
|
-
await docStatusCommand(dt, id, status, opts);
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
parent
|
|
109
|
-
.command("delete <id>")
|
|
110
|
-
.description(`Delete a ${dt.label.toLowerCase()}`)
|
|
111
|
-
.option("-y, --yes", "Skip confirmation")
|
|
112
|
-
.option("--json", "JSON output")
|
|
113
|
-
.action(async (id, opts) => {
|
|
114
|
-
const { docDeleteCommand } = await import("../../commands/document/factory.js");
|
|
115
|
-
await docDeleteCommand(dt, id, opts);
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
// ── document convert ──────────────────────────────────────────────────────
|
|
120
|
-
|
|
121
|
-
program
|
|
122
|
-
.command("document")
|
|
123
|
-
.description("Document conversion operations")
|
|
124
|
-
.command("convert")
|
|
125
|
-
.description("Convert one document type to another")
|
|
126
|
-
.requiredOption("--from-type <type>", "Source type (quotation, proforma, delivery-challan, etc.)")
|
|
127
|
-
.requiredOption("--from-id <id>", "Source document ID")
|
|
128
|
-
.requiredOption("--to-type <type>", "Target type (invoice, credit-note, etc.)")
|
|
129
|
-
.option("--json", "JSON output")
|
|
130
|
-
.option("-y, --yes", "Skip confirmation")
|
|
131
|
-
.action(async (opts) => {
|
|
132
|
-
const { HisaaboClient, HisaaboApiError } = await import("../../client.js");
|
|
133
|
-
const { requireAuth } = await import("../../config.js");
|
|
134
|
-
const { fatalError, outputJSON, success, EXIT } = await import("../../output.js");
|
|
135
|
-
|
|
136
|
-
const cfg = requireAuth();
|
|
137
|
-
const client = new HisaaboClient(cfg);
|
|
138
|
-
|
|
139
|
-
if (!opts.yes && process.stdin.isTTY) {
|
|
140
|
-
const readline = await import("readline");
|
|
141
|
-
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
142
|
-
const answer = await new Promise<string>((resolve) => {
|
|
143
|
-
rl.question(
|
|
144
|
-
` Convert ${opts.fromType} ${opts.fromId} → ${opts.toType}? (y/N): `,
|
|
145
|
-
resolve,
|
|
146
|
-
);
|
|
147
|
-
});
|
|
148
|
-
rl.close();
|
|
149
|
-
if (answer.trim().toLowerCase() !== "y") {
|
|
150
|
-
console.log(" Cancelled.");
|
|
151
|
-
process.exit(EXIT.SUCCESS);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
try {
|
|
156
|
-
const result = await client.document.convert({
|
|
157
|
-
fromType: opts.fromType,
|
|
158
|
-
fromId: opts.fromId,
|
|
159
|
-
toType: opts.toType,
|
|
160
|
-
});
|
|
161
|
-
|
|
162
|
-
if (opts.json) {
|
|
163
|
-
outputJSON(result);
|
|
164
|
-
return;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
const newId = result.id ?? result.documentId ?? "(unknown)";
|
|
168
|
-
const newNum = result.documentNumber ?? result.number ?? newId;
|
|
169
|
-
success(`Converted: ${opts.fromType} → ${opts.toType} ${newNum}`);
|
|
170
|
-
console.log(` New ID: ${newId}\n`);
|
|
171
|
-
|
|
172
|
-
} catch (e) {
|
|
173
|
-
if (e instanceof HisaaboApiError) {
|
|
174
|
-
const err = e.hisaaboError;
|
|
175
|
-
if (err.code === "not_found") fatalError(`Source document not found: ${opts.fromId}`, EXIT.NOT_FOUND);
|
|
176
|
-
if (err.code === "unauthorized") fatalError("Session expired. Run: hisaabo login", EXIT.AUTH);
|
|
177
|
-
if (err.code === "forbidden") fatalError(err.message, EXIT.FORBIDDEN);
|
|
178
|
-
if (err.code === "validation_failed") fatalError(e.message, EXIT.VALIDATION);
|
|
179
|
-
if (err.code === "network_error") fatalError(err.message, EXIT.NETWORK);
|
|
180
|
-
}
|
|
181
|
-
fatalError(String(e instanceof Error ? e.message : e));
|
|
182
|
-
}
|
|
183
|
-
});
|
|
184
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Command } from "commander";
|
|
2
|
-
import {
|
|
3
|
-
eInvoiceDashboardCommand,
|
|
4
|
-
eInvoiceGenerateCommand,
|
|
5
|
-
eInvoiceCancelCommand,
|
|
6
|
-
eInvoiceRetryCommand,
|
|
7
|
-
} from "../../commands/einvoice/index.js";
|
|
8
|
-
|
|
9
|
-
export function registerEInvoiceCommands(program: Command): void {
|
|
10
|
-
const einvoice = program.command("einvoice").description("E-Invoice (IRP) management");
|
|
11
|
-
|
|
12
|
-
einvoice
|
|
13
|
-
.command("dashboard")
|
|
14
|
-
.description("E-invoice generation summary")
|
|
15
|
-
.option("--json", "JSON output")
|
|
16
|
-
.option("--from <date>", "From date")
|
|
17
|
-
.option("--to <date>", "To date")
|
|
18
|
-
.action(async (opts) => {
|
|
19
|
-
await eInvoiceDashboardCommand(opts);
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
einvoice
|
|
23
|
-
.command("generate <invoiceId>")
|
|
24
|
-
.description("Generate an e-invoice (get IRN from IRP)")
|
|
25
|
-
.option("--json", "JSON output")
|
|
26
|
-
.action(async (invoiceId: string, opts) => {
|
|
27
|
-
await eInvoiceGenerateCommand(invoiceId, { json: opts.json });
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
einvoice
|
|
31
|
-
.command("cancel <invoiceId>")
|
|
32
|
-
.description("Cancel an e-invoice")
|
|
33
|
-
.option("--json", "JSON output")
|
|
34
|
-
.option("--reason <code>", "Cancel reason code (1-4)")
|
|
35
|
-
.action(async (invoiceId: string, opts) => {
|
|
36
|
-
await eInvoiceCancelCommand(invoiceId, { json: opts.json, reason: opts.reason });
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
einvoice
|
|
40
|
-
.command("retry <invoiceId>")
|
|
41
|
-
.description("Retry a failed e-invoice generation")
|
|
42
|
-
.option("--json", "JSON output")
|
|
43
|
-
.action(async (invoiceId: string, opts) => {
|
|
44
|
-
await eInvoiceRetryCommand(invoiceId, { json: opts.json });
|
|
45
|
-
});
|
|
46
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Command } from "commander";
|
|
2
|
-
import {
|
|
3
|
-
ewbDashboardCommand,
|
|
4
|
-
ewbGenerateCommand,
|
|
5
|
-
ewbExpiringCommand,
|
|
6
|
-
} from "../../commands/ewb/index.js";
|
|
7
|
-
|
|
8
|
-
export function registerEwbCommands(program: Command): void {
|
|
9
|
-
const ewb = program.command("ewb").description("E-Way Bill management");
|
|
10
|
-
|
|
11
|
-
ewb
|
|
12
|
-
.command("dashboard")
|
|
13
|
-
.description("E-way bill summary dashboard")
|
|
14
|
-
.option("--json", "JSON output")
|
|
15
|
-
.option("--from <date>", "From date")
|
|
16
|
-
.option("--to <date>", "To date")
|
|
17
|
-
.action(async (opts) => {
|
|
18
|
-
await ewbDashboardCommand(opts);
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
ewb
|
|
22
|
-
.command("generate <invoiceId>")
|
|
23
|
-
.description("Generate an e-way bill for an invoice")
|
|
24
|
-
.option("--json", "JSON output")
|
|
25
|
-
.action(async (invoiceId: string, opts) => {
|
|
26
|
-
await ewbGenerateCommand(invoiceId, { json: opts.json });
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
ewb
|
|
30
|
-
.command("expiring")
|
|
31
|
-
.description("List e-way bills expiring soon")
|
|
32
|
-
.option("--json", "JSON output")
|
|
33
|
-
.option("--days <n>", "Within N days (default: 3)", parseInt)
|
|
34
|
-
.action(async (opts) => {
|
|
35
|
-
await ewbExpiringCommand({ json: opts.json, days: opts.days });
|
|
36
|
-
});
|
|
37
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { Command } from "commander";
|
|
2
|
-
import { expenseListCommand } from "../../commands/expense/list.js";
|
|
3
|
-
import { expenseCreateCommand } from "../../commands/expense/create.js";
|
|
4
|
-
import { expenseDeleteCommand } from "../../commands/expense/delete.js";
|
|
5
|
-
|
|
6
|
-
export function registerExpenseCommands(program: Command): void {
|
|
7
|
-
// ── expense ───────────────────────────────────────────────────────────────
|
|
8
|
-
|
|
9
|
-
const expense = program.command("expense").description("Expense tracking");
|
|
10
|
-
|
|
11
|
-
expense
|
|
12
|
-
.command("list")
|
|
13
|
-
.description("List expenses")
|
|
14
|
-
.option("--json", "JSON output")
|
|
15
|
-
.option("--format <format>", "Output format: table, tsv, csv, ids")
|
|
16
|
-
.option("--category <cat>", "Filter by category")
|
|
17
|
-
.option("--from <date>", "From date")
|
|
18
|
-
.option("--to <date>", "To date")
|
|
19
|
-
.option("--page <n>", "Page number", parseInt)
|
|
20
|
-
.option("--limit <n>", "Items per page", parseInt)
|
|
21
|
-
.action(async (opts) => {
|
|
22
|
-
await expenseListCommand(opts);
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
expense
|
|
26
|
-
.command("create")
|
|
27
|
-
.description("Create a new expense")
|
|
28
|
-
.option("--json", "JSON output")
|
|
29
|
-
.option("--category <cat>", "Expense category")
|
|
30
|
-
.option("--amount <amount>", "Amount")
|
|
31
|
-
.option("--mode <mode>", "cash/bank/upi/cheque/other")
|
|
32
|
-
.option("--description <text>", "Description")
|
|
33
|
-
.option("--date <date>", "Expense date")
|
|
34
|
-
.option("--reference <ref>", "Reference number")
|
|
35
|
-
.action(async (opts) => {
|
|
36
|
-
await expenseCreateCommand({
|
|
37
|
-
json: opts.json,
|
|
38
|
-
category: opts.category,
|
|
39
|
-
amount: opts.amount,
|
|
40
|
-
mode: opts.mode,
|
|
41
|
-
description: opts.description,
|
|
42
|
-
date: opts.date,
|
|
43
|
-
reference: opts.reference,
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
expense
|
|
48
|
-
.command("delete <id>")
|
|
49
|
-
.description("Delete an expense")
|
|
50
|
-
.option("-y, --yes", "Skip confirmation")
|
|
51
|
-
.option("--json", "JSON output")
|
|
52
|
-
.action(async (id, opts) => {
|
|
53
|
-
await expenseDeleteCommand(id, { yes: opts.yes, json: opts.json });
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
expense
|
|
57
|
-
.command("update <id>")
|
|
58
|
-
.description("Update an expense")
|
|
59
|
-
.option("--amount <amount>", "New amount")
|
|
60
|
-
.option("--category <cat>", "Expense category")
|
|
61
|
-
.option("--date <YYYY-MM-DD>", "Expense date")
|
|
62
|
-
.option("--description <text>", "Description")
|
|
63
|
-
.option("--payment-mode <mode>", "Payment mode: cash, upi, bank, cheque, other")
|
|
64
|
-
.option("--reference <ref>", "Reference number")
|
|
65
|
-
.option("--json", "JSON output")
|
|
66
|
-
.action(async (id, opts) => {
|
|
67
|
-
const { expenseUpdateCommand } = await import("../../commands/expense/update.js");
|
|
68
|
-
await expenseUpdateCommand(id, {
|
|
69
|
-
json: opts.json,
|
|
70
|
-
amount: opts.amount,
|
|
71
|
-
category: opts.category,
|
|
72
|
-
date: opts.date,
|
|
73
|
-
description: opts.description,
|
|
74
|
-
paymentMode: opts.paymentMode,
|
|
75
|
-
reference: opts.reference,
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
expense
|
|
80
|
-
.command("categories")
|
|
81
|
-
.description("List all expense categories")
|
|
82
|
-
.option("--json", "JSON output")
|
|
83
|
-
.action(async (opts) => {
|
|
84
|
-
const { expenseCategoriesCommand } = await import("../../commands/expense/categories.js");
|
|
85
|
-
await expenseCategoriesCommand({ json: opts.json });
|
|
86
|
-
});
|
|
87
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { Command } from "commander";
|
|
2
|
-
import { gstR1Command, gstR3bCommand, gstR1CsvCommand, gstR9Command, gstr2bUploadsCommand } from "../../commands/gst/index.js";
|
|
3
|
-
|
|
4
|
-
export function registerGstCommands(program: Command): void {
|
|
5
|
-
// ── gst ───────────────────────────────────────────────────────────────────
|
|
6
|
-
|
|
7
|
-
const gst = program.command("gst").description("GST reports");
|
|
8
|
-
|
|
9
|
-
gst
|
|
10
|
-
.command("r1")
|
|
11
|
-
.description("GSTR-1 report")
|
|
12
|
-
.option("--json", "JSON output")
|
|
13
|
-
.option("--quarter <q>", "Quarter: Q1, Q2, Q3, Q4")
|
|
14
|
-
.option("--month <n>", "Month number (1-12)", parseInt)
|
|
15
|
-
.option("--year <n>", "Year", parseInt)
|
|
16
|
-
.action(async (opts) => {
|
|
17
|
-
await gstR1Command({ json: opts.json, quarter: opts.quarter, month: opts.month, year: opts.year });
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
gst
|
|
21
|
-
.command("r3b")
|
|
22
|
-
.description("GSTR-3B report")
|
|
23
|
-
.option("--json", "JSON output")
|
|
24
|
-
.option("--quarter <q>", "Quarter: Q1, Q2, Q3, Q4")
|
|
25
|
-
.option("--month <n>", "Month number (1-12)", parseInt)
|
|
26
|
-
.option("--year <n>", "Year", parseInt)
|
|
27
|
-
.action(async (opts) => {
|
|
28
|
-
await gstR3bCommand({ json: opts.json, quarter: opts.quarter, month: opts.month, year: opts.year });
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
gst
|
|
32
|
-
.command("r1-csv")
|
|
33
|
-
.description("Download GSTR-1 as GSTN-compatible CSV")
|
|
34
|
-
.option("--quarter <q>", "Quarter")
|
|
35
|
-
.option("--month <n>", "Month", parseInt)
|
|
36
|
-
.option("--year <n>", "Year", parseInt)
|
|
37
|
-
.option("--output <path>", "Output file path")
|
|
38
|
-
.action(async (opts) => {
|
|
39
|
-
await gstR1CsvCommand({ quarter: opts.quarter, month: opts.month, year: opts.year, output: opts.output });
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
gst
|
|
43
|
-
.command("gstr9 <fy>")
|
|
44
|
-
.description("GSTR-9 annual return (e.g. 2023-24)")
|
|
45
|
-
.option("--json", "JSON output")
|
|
46
|
-
.action(async (fy: string, opts) => {
|
|
47
|
-
await gstR9Command(fy, { json: opts.json });
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
gst
|
|
51
|
-
.command("gstr2b-uploads")
|
|
52
|
-
.description("List GSTR-2B uploaded periods")
|
|
53
|
-
.option("--json", "JSON output")
|
|
54
|
-
.action(async (opts) => {
|
|
55
|
-
await gstr2bUploadsCommand({ json: opts.json });
|
|
56
|
-
});
|
|
57
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Command } from "commander";
|
|
2
|
-
import {
|
|
3
|
-
importPartiesCommand,
|
|
4
|
-
importItemsCommand,
|
|
5
|
-
importInvoicesCommand,
|
|
6
|
-
importPaymentsCommand,
|
|
7
|
-
} from "../../commands/import/index.js";
|
|
8
|
-
|
|
9
|
-
export function registerImportCommands(program: Command): void {
|
|
10
|
-
// ── import ────────────────────────────────────────────────────────────────
|
|
11
|
-
|
|
12
|
-
const importCmd = program.command("import").description("Bulk import data");
|
|
13
|
-
|
|
14
|
-
importCmd
|
|
15
|
-
.command("parties <file>")
|
|
16
|
-
.description("Import parties from JSON or CSV file")
|
|
17
|
-
.option("--json", "JSON output")
|
|
18
|
-
.option("--format <format>", "json or csv (auto-detected from extension)")
|
|
19
|
-
.action(async (file, opts) => {
|
|
20
|
-
await importPartiesCommand(file, { json: opts.json, format: opts.format });
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
importCmd
|
|
24
|
-
.command("items <file>")
|
|
25
|
-
.description("Import items from JSON or CSV file")
|
|
26
|
-
.option("--json", "JSON output")
|
|
27
|
-
.option("--format <format>", "json or csv (auto-detected from extension)")
|
|
28
|
-
.action(async (file, opts) => {
|
|
29
|
-
await importItemsCommand(file, { json: opts.json, format: opts.format });
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
importCmd
|
|
33
|
-
.command("invoices <file>")
|
|
34
|
-
.description("Import invoices from JSON or CSV file")
|
|
35
|
-
.option("--json", "JSON output")
|
|
36
|
-
.option("--format <format>", "json or csv (auto-detected from extension)")
|
|
37
|
-
.action(async (file, opts) => {
|
|
38
|
-
await importInvoicesCommand(file, { json: opts.json, format: opts.format });
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
importCmd
|
|
42
|
-
.command("payments <file>")
|
|
43
|
-
.description("Import payments from JSON or CSV file")
|
|
44
|
-
.option("--json", "JSON output")
|
|
45
|
-
.option("--format <format>", "json or csv (auto-detected from extension)")
|
|
46
|
-
.action(async (file, opts) => {
|
|
47
|
-
await importPaymentsCommand(file, { json: opts.json, format: opts.format });
|
|
48
|
-
});
|
|
49
|
-
}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { Command } from "commander";
|
|
2
|
-
import { invoiceListCommand } from "../../commands/invoice/list.js";
|
|
3
|
-
import { invoiceGetCommand } from "../../commands/invoice/get.js";
|
|
4
|
-
import { invoiceCreateCommand } from "../../commands/invoice/create.js";
|
|
5
|
-
import { invoiceStatusCommand } from "../../commands/invoice/status.js";
|
|
6
|
-
import { invoicePdfCommand } from "../../commands/invoice/pdf.js";
|
|
7
|
-
import { invoiceDeleteCommand } from "../../commands/invoice/delete.js";
|
|
8
|
-
|
|
9
|
-
export function registerInvoiceCommands(program: Command): void {
|
|
10
|
-
// ── invoice ───────────────────────────────────────────────────────────────
|
|
11
|
-
|
|
12
|
-
const invoice = program.command("invoice").description("Invoice management");
|
|
13
|
-
|
|
14
|
-
invoice
|
|
15
|
-
.command("list")
|
|
16
|
-
.description("List invoices")
|
|
17
|
-
.option("--json", "JSON output")
|
|
18
|
-
.option("--format <format>", "Output format: table, tsv, csv, ids")
|
|
19
|
-
.option("--type <type>", "sale or purchase")
|
|
20
|
-
.option("--status <status>", "Filter by status")
|
|
21
|
-
.option("--party <name>", "Filter by party name")
|
|
22
|
-
.option("--party-id <id>", "Filter by party ID")
|
|
23
|
-
.option("--from <date>", "From date (YYYY-MM-DD)")
|
|
24
|
-
.option("--to <date>", "To date (YYYY-MM-DD)")
|
|
25
|
-
.option("--this-month", "Filter to current month")
|
|
26
|
-
.option("--this-quarter", "Filter to current quarter")
|
|
27
|
-
.option("--this-fy", "Filter to current financial year")
|
|
28
|
-
.option("--page <n>", "Page number", parseInt)
|
|
29
|
-
.option("--limit <n>", "Items per page", parseInt)
|
|
30
|
-
.option("--search <q>", "Search invoices")
|
|
31
|
-
.option("--sort-by <field>", "Sort field: date, amount, number")
|
|
32
|
-
.option("--sort-dir <dir>", "Sort direction: asc, desc")
|
|
33
|
-
.action(async (opts) => {
|
|
34
|
-
await invoiceListCommand({
|
|
35
|
-
json: opts.json,
|
|
36
|
-
format: opts.format,
|
|
37
|
-
type: opts.type,
|
|
38
|
-
status: opts.status,
|
|
39
|
-
party: opts.party,
|
|
40
|
-
partyId: opts.partyId,
|
|
41
|
-
from: opts.from,
|
|
42
|
-
to: opts.to,
|
|
43
|
-
thisMonth: opts.thisMonth,
|
|
44
|
-
thisQuarter: opts.thisQuarter,
|
|
45
|
-
thisFy: opts.thisFy,
|
|
46
|
-
page: opts.page,
|
|
47
|
-
limit: opts.limit,
|
|
48
|
-
search: opts.search,
|
|
49
|
-
sortBy: opts.sortBy,
|
|
50
|
-
sortDir: opts.sortDir,
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
invoice
|
|
55
|
-
.command("get <id>")
|
|
56
|
-
.description("Get invoice details")
|
|
57
|
-
.option("--json", "JSON output")
|
|
58
|
-
.action(async (id, opts) => {
|
|
59
|
-
await invoiceGetCommand(id, { json: opts.json });
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
invoice
|
|
63
|
-
.command("create")
|
|
64
|
-
.description("Create a new invoice")
|
|
65
|
-
.option("--json", "JSON output")
|
|
66
|
-
.option("--party <name>", "Party name")
|
|
67
|
-
.option("--party-id <id>", "Party UUID")
|
|
68
|
-
.option("--type <type>", "sale or purchase")
|
|
69
|
-
.option("--item <name>", "Item (repeatable)", (v, a: string[]) => [...a, v], [] as string[])
|
|
70
|
-
.option("--qty <n>", "Quantity (per --item)", (v, a: string[]) => [...a, v], [] as string[])
|
|
71
|
-
.option("--rate <n>", "Unit price (per --item)", (v, a: string[]) => [...a, v], [] as string[])
|
|
72
|
-
.option("--delivery <method>", "Delivery method")
|
|
73
|
-
.option("--notes <text>", "Invoice notes")
|
|
74
|
-
.option("--terms <text>", "Terms and conditions")
|
|
75
|
-
.option("-y, --yes", "Skip confirmation prompts")
|
|
76
|
-
.action(async (opts) => {
|
|
77
|
-
await invoiceCreateCommand({
|
|
78
|
-
json: opts.json,
|
|
79
|
-
party: opts.party,
|
|
80
|
-
partyId: opts.partyId,
|
|
81
|
-
type: opts.type,
|
|
82
|
-
items: opts.item,
|
|
83
|
-
qty: opts.qty,
|
|
84
|
-
rate: opts.rate,
|
|
85
|
-
delivery: opts.delivery,
|
|
86
|
-
notes: opts.notes,
|
|
87
|
-
terms: opts.terms,
|
|
88
|
-
yes: opts.yes,
|
|
89
|
-
});
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
invoice
|
|
93
|
-
.command("status <id> <status>")
|
|
94
|
-
.description("Update invoice status")
|
|
95
|
-
.option("--json", "JSON output")
|
|
96
|
-
.action(async (id, status, opts) => {
|
|
97
|
-
await invoiceStatusCommand(id, status, { json: opts.json });
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
invoice
|
|
101
|
-
.command("pdf <id>")
|
|
102
|
-
.description("Download invoice as PDF")
|
|
103
|
-
.option("--output <path>", "Output path or directory")
|
|
104
|
-
.option("--open", "Open after download")
|
|
105
|
-
.action(async (id, opts) => {
|
|
106
|
-
await invoicePdfCommand(id, { output: opts.output, open: opts.open });
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
invoice
|
|
110
|
-
.command("delete <id>")
|
|
111
|
-
.description("Delete an invoice")
|
|
112
|
-
.option("-y, --yes", "Skip confirmation")
|
|
113
|
-
.option("--json", "JSON output")
|
|
114
|
-
.action(async (id, opts) => {
|
|
115
|
-
await invoiceDeleteCommand(id, { yes: opts.yes, json: opts.json });
|
|
116
|
-
});
|
|
117
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { Command } from "commander";
|
|
2
|
-
import {
|
|
3
|
-
itcDashboardCommand,
|
|
4
|
-
itcLedgerCommand,
|
|
5
|
-
itcAgingCommand,
|
|
6
|
-
itcBlockCommand,
|
|
7
|
-
itcUnblockCommand,
|
|
8
|
-
} from "../../commands/itc/index.js";
|
|
9
|
-
|
|
10
|
-
export function registerItcCommands(program: Command): void {
|
|
11
|
-
const itc = program.command("itc").description("Input Tax Credit tracking");
|
|
12
|
-
|
|
13
|
-
itc
|
|
14
|
-
.command("dashboard")
|
|
15
|
-
.description("ITC summary dashboard")
|
|
16
|
-
.option("--json", "JSON output")
|
|
17
|
-
.option("--from <date>", "From date")
|
|
18
|
-
.option("--to <date>", "To date")
|
|
19
|
-
.action(async (opts) => {
|
|
20
|
-
await itcDashboardCommand(opts);
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
itc
|
|
24
|
-
.command("ledger")
|
|
25
|
-
.description("ITC ledger — all eligible purchase credits")
|
|
26
|
-
.option("--json", "JSON output")
|
|
27
|
-
.option("--from <date>", "From date")
|
|
28
|
-
.option("--to <date>", "To date")
|
|
29
|
-
.action(async (opts) => {
|
|
30
|
-
await itcLedgerCommand(opts);
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
itc
|
|
34
|
-
.command("aging")
|
|
35
|
-
.description("ITC aging alerts — credits at risk of reversal")
|
|
36
|
-
.option("--json", "JSON output")
|
|
37
|
-
.action(async (opts) => {
|
|
38
|
-
await itcAgingCommand({ json: opts.json });
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
itc
|
|
42
|
-
.command("block <invoiceId>")
|
|
43
|
-
.description("Mark ITC for an invoice as blocked")
|
|
44
|
-
.option("--json", "JSON output")
|
|
45
|
-
.action(async (invoiceId: string, opts) => {
|
|
46
|
-
await itcBlockCommand(invoiceId, { json: opts.json });
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
itc
|
|
50
|
-
.command("unblock <invoiceId>")
|
|
51
|
-
.description("Mark ITC for an invoice as eligible")
|
|
52
|
-
.option("--json", "JSON output")
|
|
53
|
-
.action(async (invoiceId: string, opts) => {
|
|
54
|
-
await itcUnblockCommand(invoiceId, { json: opts.json });
|
|
55
|
-
});
|
|
56
|
-
}
|