@classytic/ledger-bd 0.2.2 → 0.3.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,60 @@
3
3
  Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
4
4
  adhering to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
5
 
6
+ ## [0.2.3]
7
+
8
+ ### Added
9
+
10
+ **Expanded `BD_ACCOUNT_CODES`** to expose 25 more codes that were
11
+ already seeded in `BD_ACCOUNT_TYPES` (since 0.1.0–0.2.2) but missing
12
+ from the typed map. Hosts that previously hand-coded these as string
13
+ literals in posting contracts can now reference them through the
14
+ canonical export. The chart itself is unchanged — only the typed
15
+ exports grew.
16
+
17
+ #### Cash & Receivables
18
+ - **`BANK_CHARGES: '6328'`** — gateway processing fees, mobile-money
19
+ merchant deductions, ad-hoc bank charges.
20
+ - **`CHARGEBACK_RECEIVABLE: '1159'`** — card-network dispute holding.
21
+
22
+ #### Liabilities
23
+ - **`COMMISSION_PAYABLE: '2122'`** — accrued sales/agent commission.
24
+ - **`REVERSE_LOGISTICS_PAYABLE: '2162'`** — return-handling accrual.
25
+ - **`CUSTOMER_ADVANCE: '2191'`** — IFRS 15 contract liability.
26
+
27
+ #### Revenue / Other Income
28
+ - **`TRANSPORT_REVENUE: '4147'`** — line-item delivery charge billed to customer.
29
+ - **`COURIER_REVENUE: '4159'`** — in-house courier service revenue.
30
+ - **`BAD_DEBT_RECOVERY: '4310'`** — recovery of previously written-off debt.
31
+
32
+ #### COGS / Landed Cost
33
+ - **`IMPORT_LANDED_COST: '5116'`** — capitalized duty + freight + insurance.
34
+ - **`CARRIAGE_INWARD: '5117'`** — domestic inbound freight (capitalized).
35
+ - **`PACKAGING_PRODUCTION: '5317'`** — production-time primary packaging.
36
+ - **`CUSTOMS_DUTY: '5505'`** — NBR import duty (when not capitalized).
37
+ - **`CF_AGENT_COMMISSION: '5507'`** — clearing/forwarding agent fee.
38
+
39
+ #### Operating Expenses
40
+ - **`POSTAGE_ADMIN: '6302'`** — admin postage (NOT customer delivery).
41
+ - **`SALES_COMMISSION: '6403'`** — internal commercial team commission.
42
+ - **`FREIGHT_OUTWARD: '6405'`** — outbound delivery cost (domestic).
43
+ - **`SHIPPING_LOGISTICS_EXPORT: '6406'`** — DHL / FedEx weight-priced export.
44
+ - **`PACKAGING_DISPATCH: '6407'`** — outbound packaging consumables.
45
+ - **`MARKETPLACE_COMMISSION: '6422'`** — Daraz / Chaldal / Pickaboo cut.
46
+ - **`COURIER_COD_COMMISSION: '6423'`** — Pathao / RedX / Steadfast COD cut.
47
+ - **`LOGISTICS_HUB_RENT: '6426'`** — sortation-hub / depot rent.
48
+ - **`COURIER_DRIVER_BONUS: '6428'`** — variable courier performance pay.
49
+ - **`BAD_DEBT_WRITTEN_OFF: '6702'`** — unrecoverable A/R / shortfall.
50
+ - **`MARKETPLACE_ADS: '6823'`** — platform-specific ad-engine fees.
51
+ - **`MARKETPLACE_COMPLIANCE_FEE: '6824'`** — recurring seller-platform fees.
52
+
53
+ Together these cover the typical 3PL / DHL-style export / marketplace-
54
+ aggregator accounting flows. The full chart still has ~120 more accounts
55
+ (industry-specific: RMG, pharma, agro-processing, telecom, etc.) — reach
56
+ for those via `BD_ACCOUNT_TYPES` directly when an industry-specific
57
+ posting needs them; bring them into `BD_ACCOUNT_CODES` when a host-
58
+ agnostic posting contract starts referencing them.
59
+
6
60
  ## [0.2.2]
7
61
 
8
62
  ### Added
package/dist/index.d.mts CHANGED
@@ -87,6 +87,13 @@ declare const BD_ACCOUNT_CODES: {
87
87
  readonly COD_CLEARING: "1127";
88
88
  readonly AR: "1141"; /** 1158 — Net amount due from marketplaces (Daraz/Chaldal/Pickaboo). */
89
89
  readonly MARKETPLACE_RECEIVABLE: "1158";
90
+ /**
91
+ * 1159 — Chargeback / Payment Dispute Receivable. Customer-initiated
92
+ * card-network disputes. Disputed amount held pending network resolution
93
+ * (typically 30-90 days). Recovered → reversed to cash; lost → written
94
+ * off via `BAD_DEBT_WRITTEN_OFF` or recovered via `BAD_DEBT_RECOVERY`.
95
+ */
96
+ readonly CHARGEBACK_RECEIVABLE: "1159";
90
97
  /**
91
98
  * 1145 — Receivable from Related Parties.
92
99
  * Used as inter-branch receivable when consolidated reporting needs
@@ -96,6 +103,13 @@ declare const BD_ACCOUNT_CODES: {
96
103
  readonly INTER_BRANCH_RECEIVABLE: "1145";
97
104
  readonly VAT_RECEIVABLE: "1150";
98
105
  readonly ADVANCE_INCOME_TAX: "1151";
106
+ /**
107
+ * 1153 — VDS Receivable. The portion of output VAT withheld by a
108
+ * designated buyer (govt entity / large corporate) and deposited to
109
+ * NBR on our behalf. Held as an asset until offset against VAT Output
110
+ * Payable at the monthly return filing.
111
+ */
112
+ readonly VDS_RECEIVABLE: "1153";
99
113
  readonly VAT_CASH_BASIS_TRANSITION: "1157";
100
114
  readonly RAW_MATERIALS: "1161";
101
115
  readonly WIP: "1162";
@@ -117,6 +131,13 @@ declare const BD_ACCOUNT_CODES: {
117
131
  */
118
132
  readonly INTER_BRANCH_PAYABLE: "2113";
119
133
  readonly ACCRUED_EXPENSES: "2114";
134
+ /**
135
+ * 2122 — Sales / Agent Commission Payable. Accrued obligation to internal
136
+ * sales reps or external agents on closed sales, awaiting payout cycle.
137
+ * Distinct from `BD_ACCOUNT_CODES.AP` (general trade payables) so payroll
138
+ * adjacent obligations report separately.
139
+ */
140
+ readonly COMMISSION_PAYABLE: "2122";
120
141
  readonly FREIGHT_PAYABLE: "2124";
121
142
  /**
122
143
  * 2125 — Goods Received / Invoice Received (GR/IR).
@@ -138,11 +159,206 @@ declare const BD_ACCOUNT_CODES: {
138
159
  readonly GIFT_CARD_LIABILITY: "2129"; /** 2130 — Customer in-store credit balance. */
139
160
  readonly STORE_CREDIT_LIABILITY: "2130"; /** 2160 — Outstanding loyalty points valued per IFRS 15. */
140
161
  readonly LOYALTY_POINT_LIABILITY: "2160";
162
+ /**
163
+ * 2162 — Reverse Logistics / Returns Processing Payable. Accrued cost
164
+ * to handle inbound returns: 3PL handling fee, reverse-courier,
165
+ * restocking, inspection. Distinct from outbound `FREIGHT_PAYABLE` —
166
+ * this is the inbound/reverse flow accrual.
167
+ */
168
+ readonly REVERSE_LOGISTICS_PAYABLE: "2162";
169
+ /**
170
+ * 2191 — Advance from Customers. Customer pre-payments before goods
171
+ * are delivered (pre-orders, milestone-billed services, deposits).
172
+ * Cleared to revenue when delivery / performance obligation completes.
173
+ * Required by IFRS 15 contract-liability presentation.
174
+ */
175
+ readonly CUSTOMER_ADVANCE: "2191";
141
176
  readonly INCOME_TAX_PAYABLE: "2131";
142
177
  readonly VAT_OUTPUT_PAYABLE: "2132";
143
178
  readonly TDS_PAYABLE: "2135";
144
- readonly SALES_REVENUE: "4111"; /** 5111 — Cost of Goods Sold — Raw Materials */
145
- readonly COGS_MATERIALS: "5111"; /** 6703 Inventory Write-down / Obsolescence (slow-moving / expired). */
179
+ /**
180
+ * 2136 VDS Payable. Amount we must remit to NBR when we withhold VDS
181
+ * from a supplier's payment. Dr here at receipt; Cr to Bank when remitted.
182
+ * Distinct from 2135 (TDS) — VDS is VAT-side withholding, TDS is income-tax-side.
183
+ */
184
+ readonly VDS_PAYABLE: "2136";
185
+ readonly SALES_REVENUE: "4111";
186
+ /**
187
+ * 4147 — Transport / Freight Revenue. When delivery is sold as a
188
+ * line-item (Tk 60 delivery charge on the invoice) instead of being
189
+ * absorbed in product price. Posted gross at sale; the actual delivery
190
+ * cost flows through `FREIGHT_OUTWARD` separately so margin per
191
+ * delivery channel stays visible.
192
+ */
193
+ readonly TRANSPORT_REVENUE: "4147";
194
+ /**
195
+ * 4159 — Courier / Delivery Service Revenue. Used when the merchant
196
+ * itself runs the courier leg (own riders, in-house fleet) and bills
197
+ * the customer for it. Distinct from `TRANSPORT_REVENUE` which is the
198
+ * generic transport-revenue line — pick whichever the deployment uses.
199
+ */
200
+ readonly COURIER_REVENUE: "4159";
201
+ /**
202
+ * 4319 — Restocking Fee Income. Customer-paid fee retained by the
203
+ * merchant on a return/exchange to cover handling costs. Distinct
204
+ * from `SALES_REVENUE` (the original goods sale already booked) and
205
+ * from `MISCELLANEOUS_INCOME` so reporting can break out RMA-specific
206
+ * monetisation. Posting: `Dr Cash/AR / Cr 4319` for the fee amount;
207
+ * the goods value flows through the normal refund + COGS-reversal
208
+ * pipeline independently.
209
+ */
210
+ readonly RESTOCKING_FEE_INCOME: "4319";
211
+ /**
212
+ * 4310 — Bad Debt Recovery. Credit booked when a previously written-off
213
+ * receivable is unexpectedly recovered (chargeback reversal, late COD
214
+ * remittance, recovered marketplace deduction). Posts: `Dr Cash/Bank /
215
+ * Cr 4310`. Counterpart of `BAD_DEBT_WRITTEN_OFF`.
216
+ */
217
+ readonly BAD_DEBT_RECOVERY: "4310";
218
+ /**
219
+ * 4317 — Write-back of Provisions / Inventory Gain. Credit booked when a
220
+ * previously expensed loss is reversed because the value is recovered:
221
+ * physical-count overage (stock found that wasn't on the books), reversal
222
+ * of an over-stated obsolescence/shrinkage provision, or post-write-off
223
+ * recovery of inventory. Posts: `Dr Inventory / Cr 4317`. Distinct from
224
+ * `SHRINKAGE` (6711) which is the loss side — gains MUST NOT be credited
225
+ * to the loss expense because that creates a misleading credit balance
226
+ * on a Loss account and inflates profit.
227
+ */
228
+ readonly INVENTORY_GAIN: "4317"; /** 5111 — Cost of Goods Sold — Raw Materials */
229
+ readonly COGS_MATERIALS: "5111";
230
+ /**
231
+ * 5116 — Import Cost (duty + freight + insurance). Capitalized to
232
+ * inventory at landed cost. Use this when a CIF/FOB import flow needs
233
+ * to roll duty + freight + insurance into the goods cost basis per
234
+ * IAS 2. For inland inbound freight on domestic purchases use
235
+ * `CARRIAGE_INWARD`.
236
+ */
237
+ readonly IMPORT_LANDED_COST: "5116";
238
+ /**
239
+ * 5117 — Carriage Inward / Freight-In. Inbound freight on domestic
240
+ * stock receipts. Capitalized to inventory at receipt time so the cost
241
+ * basis matches IAS 2. Distinct from `FREIGHT_OUTWARD` (sales-side).
242
+ */
243
+ readonly CARRIAGE_INWARD: "5117";
244
+ /**
245
+ * 5317 — Packaging Cost (manufacturing). Cost of primary packaging
246
+ * applied during production (bottles, blister packs, retail boxes).
247
+ * For dispatch-side packaging (cartons, pallet wrap, courier mailers)
248
+ * use `PACKAGING_DISPATCH`.
249
+ */
250
+ readonly PACKAGING_PRODUCTION: "5317";
251
+ /**
252
+ * 5505 — Customs Duty on Imports. NBR import duty paid at clearance.
253
+ * Either capitalized into landed cost via `IMPORT_LANDED_COST` or
254
+ * expensed here when the host doesn't capitalize (small-value imports,
255
+ * non-resale imports).
256
+ */
257
+ readonly CUSTOMS_DUTY: "5505";
258
+ /**
259
+ * 5507 — C&F Agent Commission. Clearing & forwarding agent fee on
260
+ * imports. Typically capitalized into landed cost. Listed separately
261
+ * from `COURIER_COD_COMMISSION` because the cost driver (volume of
262
+ * shipments × cargo weight) and tax treatment (input-VAT eligibility)
263
+ * differ from last-mile courier commission.
264
+ */
265
+ readonly CF_AGENT_COMMISSION: "5507";
266
+ /**
267
+ * 6302 — Postage & Courier (admin). Admin-side postage for documents,
268
+ * sample dispatches, internal mail. NOT for outbound delivery to
269
+ * customers — that's `FREIGHT_OUTWARD` (operating expense, not admin).
270
+ */
271
+ readonly POSTAGE_ADMIN: "6302";
272
+ /**
273
+ * 6403 — Sales Commission / Incentive. Commercial team's commission
274
+ * on closed sales (internal payroll-adjacent expense). Distinct from
275
+ * `MARKETPLACE_COMMISSION` (platform cut) and `COURIER_COD_COMMISSION`
276
+ * (logistics-side fee).
277
+ */
278
+ readonly SALES_COMMISSION: "6403";
279
+ /**
280
+ * 6405 — Freight Outward / Delivery (domestic). Default outbound
281
+ * delivery cost for the local market — own fleet fuel, last-mile
282
+ * courier paid as flat-rate-per-parcel, etc. Use `SHIPPING_LOGISTICS_EXPORT`
283
+ * for cross-border / DHL-style weight-based shipping.
284
+ */
285
+ readonly FREIGHT_OUTWARD: "6405";
286
+ /**
287
+ * 6406 — Shipping & Logistics (export). Cross-border outbound shipping
288
+ * cost — DHL / FedEx / Aramex weight-priced commercial dispatches,
289
+ * customs clearance fees on outbound, export-side insurance. Reported
290
+ * separately from `FREIGHT_OUTWARD` because export logistics has
291
+ * different VAT treatment (zero-rated) and cost drivers (chargeable
292
+ * weight, customs).
293
+ */
294
+ readonly SHIPPING_LOGISTICS_EXPORT: "6406";
295
+ /**
296
+ * 6407 — Packaging for Dispatch. Outbound packaging consumables —
297
+ * cartons, pallet wrap, courier mailers, bubble wrap, fragile labels.
298
+ * Distinct from `PACKAGING_PRODUCTION` (production-time primary
299
+ * packaging that gets capitalized into COGS).
300
+ */
301
+ readonly PACKAGING_DISPATCH: "6407";
302
+ /**
303
+ * 6422 — Marketplace Commission. Platform cut deducted by Daraz /
304
+ * Chaldal / Pickaboo / Rokomari at payout time on goods sold via
305
+ * their channel. Reported separately from `BANK_CHARGES` because
306
+ * platform commission is sales-channel COGS-adjacent, not banking.
307
+ */
308
+ readonly MARKETPLACE_COMMISSION: "6422";
309
+ /**
310
+ * 6426 — Hub / Depot Rent (logistics). Rent for sortation hubs and
311
+ * last-mile depots (Dhaka North/South, Chittagong, etc.). Distinct
312
+ * from office rent and showroom rent — courier hubs often have
313
+ * variable lease terms based on parcel volume.
314
+ */
315
+ readonly LOGISTICS_HUB_RENT: "6426";
316
+ /**
317
+ * 6428 — Driver Bonus / Per-Trip Commission. Variable performance
318
+ * incentives for couriers — on-time, zero-damage, multi-tier delivery
319
+ * counts. Accrued weekly, settled monthly. Distinct from
320
+ * `SALES_COMMISSION` (commercial team) and `COURIER_COD_COMMISSION`
321
+ * (external partner cut).
322
+ */
323
+ readonly COURIER_DRIVER_BONUS: "6428";
324
+ /**
325
+ * 6823 — Marketplace Advertising Spend. Daraz Ads, Chaldal Sponsored
326
+ * Listings, Pickaboo Promotions — platform-specific ad-engine fees.
327
+ * Distinct from generic digital marketing and from
328
+ * `MARKETPLACE_COMMISSION` (sales commission).
329
+ */
330
+ readonly MARKETPLACE_ADS: "6823";
331
+ /**
332
+ * 6824 — Marketplace Compliance / Category Fee. Recurring seller-
333
+ * compliance and category-listing fees on marketplaces (Premium Seller
334
+ * Badge, Category Compliance, Return Guarantee Fund). Distinct from
335
+ * `MARKETPLACE_COMMISSION` (per-sale cut) and from association fees.
336
+ */
337
+ readonly MARKETPLACE_COMPLIANCE_FEE: "6824";
338
+ /**
339
+ * 6328 — Bank Charges & Commission. Default fee account for bank
340
+ * charges, payment-gateway processing fees (Stripe / SSLCommerz /
341
+ * ShurjoPay), mobile-money merchant deductions, and L/C-adjacent
342
+ * banking fees that don't warrant their own line. Use 6329 for
343
+ * L/C-specific commission, 6330 for guarantee commission.
344
+ */
345
+ readonly BANK_CHARGES: "6328";
346
+ /**
347
+ * 6423 — Courier COD Commission. Commission deducted by courier
348
+ * partners (Pathao / RedX / Steadfast / paperfly) on COD remittance.
349
+ * Distinct from `BANK_CHARGES` so BD operating-expense reports break
350
+ * out logistics-side fees from banking fees — the two scale with
351
+ * different drivers (volume of deliveries vs. payment volume).
352
+ */
353
+ readonly COURIER_COD_COMMISSION: "6423";
354
+ /**
355
+ * 6702 — Bad Debt Written Off. Unrecoverable A/R or clearing-account
356
+ * shortfall: COD partial collection, refused-on-delivery short-pay,
357
+ * marketplace deduction the courier won't reimburse. Posting a write-
358
+ * off here keeps the original revenue gross and surfaces the loss
359
+ * line in P&L instead of silently netting receivables.
360
+ */
361
+ readonly BAD_DEBT_WRITTEN_OFF: "6702"; /** 6703 — Inventory Write-down / Obsolescence (slow-moving / expired). */
146
362
  readonly OBSOLESCENCE: "6703"; /** 6711 — Inventory Shrinkage / Theft / Loss (audit shortfall). */
147
363
  readonly SHRINKAGE: "6711";
148
364
  };
package/dist/index.mjs CHANGED
@@ -9,7 +9,8 @@ const CURRENT_ASSETS = [
9
9
  description: "Physical cash held on premises for day-to-day expenses",
10
10
  parentCode: "Current Assets",
11
11
  isTotal: false,
12
- cashFlowCategory: null
12
+ cashFlowCategory: null,
13
+ isCashAccount: true
13
14
  },
14
15
  {
15
16
  code: "1112",
@@ -18,7 +19,8 @@ const CURRENT_ASSETS = [
18
19
  description: "Foreign currency notes held on premises",
19
20
  parentCode: "Current Assets",
20
21
  isTotal: false,
21
- cashFlowCategory: null
22
+ cashFlowCategory: null,
23
+ isCashAccount: true
22
24
  },
23
25
  {
24
26
  code: "1113",
@@ -27,7 +29,8 @@ const CURRENT_ASSETS = [
27
29
  description: "Funds in bank current accounts",
28
30
  parentCode: "Current Assets",
29
31
  isTotal: false,
30
- cashFlowCategory: null
32
+ cashFlowCategory: null,
33
+ isCashAccount: true
31
34
  },
32
35
  {
33
36
  code: "1114",
@@ -36,7 +39,8 @@ const CURRENT_ASSETS = [
36
39
  description: "Funds in bank savings accounts",
37
40
  parentCode: "Current Assets",
38
41
  isTotal: false,
39
- cashFlowCategory: null
42
+ cashFlowCategory: null,
43
+ isCashAccount: true
40
44
  },
41
45
  {
42
46
  code: "1115",
@@ -45,7 +49,8 @@ const CURRENT_ASSETS = [
45
49
  description: "Short term deposit accounts with banks",
46
50
  parentCode: "Current Assets",
47
51
  isTotal: false,
48
- cashFlowCategory: null
52
+ cashFlowCategory: null,
53
+ isCashAccount: true
49
54
  },
50
55
  {
51
56
  code: "1116",
@@ -54,7 +59,8 @@ const CURRENT_ASSETS = [
54
59
  description: "Foreign currency bank accounts for export proceeds and LC",
55
60
  parentCode: "Current Assets",
56
61
  isTotal: false,
57
- cashFlowCategory: null
62
+ cashFlowCategory: null,
63
+ isCashAccount: true
58
64
  },
59
65
  {
60
66
  code: "1117",
@@ -63,7 +69,8 @@ const CURRENT_ASSETS = [
63
69
  description: "Cash being transferred between locations or accounts",
64
70
  parentCode: "Current Assets",
65
71
  isTotal: false,
66
- cashFlowCategory: null
72
+ cashFlowCategory: null,
73
+ isCashAccount: true
67
74
  },
68
75
  {
69
76
  code: "1118",
@@ -72,7 +79,8 @@ const CURRENT_ASSETS = [
72
79
  description: "Balances in mobile financial service wallets",
73
80
  parentCode: "Current Assets",
74
81
  isTotal: false,
75
- cashFlowCategory: null
82
+ cashFlowCategory: null,
83
+ isCashAccount: true
76
84
  },
77
85
  {
78
86
  code: "1119",
@@ -81,7 +89,8 @@ const CURRENT_ASSETS = [
81
89
  description: "Statutory reserve balance maintained with central bank (banks only)",
82
90
  parentCode: "Current Assets",
83
91
  isTotal: false,
84
- cashFlowCategory: null
92
+ cashFlowCategory: null,
93
+ isCashAccount: true
85
94
  },
86
95
  {
87
96
  code: "1120",
@@ -90,7 +99,8 @@ const CURRENT_ASSETS = [
90
99
  description: "Short-term lending to other banks (banks only)",
91
100
  parentCode: "Current Assets",
92
101
  isTotal: false,
93
- cashFlowCategory: null
102
+ cashFlowCategory: null,
103
+ isCashAccount: true
94
104
  },
95
105
  {
96
106
  code: "1121",
@@ -99,7 +109,8 @@ const CURRENT_ASSETS = [
99
109
  description: "Inter-bank balances (banks only)",
100
110
  parentCode: "Current Assets",
101
111
  isTotal: false,
102
- cashFlowCategory: null
112
+ cashFlowCategory: null,
113
+ isCashAccount: true
103
114
  },
104
115
  {
105
116
  code: "1122",
@@ -108,7 +119,8 @@ const CURRENT_ASSETS = [
108
119
  description: "Cash loaded in ATM and CDM machines (banks only)",
109
120
  parentCode: "Current Assets",
110
121
  isTotal: false,
111
- cashFlowCategory: null
122
+ cashFlowCategory: null,
123
+ isCashAccount: true
112
124
  },
113
125
  {
114
126
  code: "1123",
@@ -3837,6 +3849,15 @@ const OTHER_INCOME = [
3837
3849
  parentCode: "Other Income",
3838
3850
  isTotal: false,
3839
3851
  cashFlowCategory: "Operating"
3852
+ },
3853
+ {
3854
+ code: "4319",
3855
+ name: "Restocking Fee Income",
3856
+ category: I$1,
3857
+ description: "Customer-paid fees retained on returns and exchanges to cover handling. Booked at RMA-confirm time; tracked separately from goods revenue (4111) for RMA economics reporting.",
3858
+ parentCode: "Other Income",
3859
+ isTotal: false,
3860
+ cashFlowCategory: "Operating"
3840
3861
  }
3841
3862
  ];
3842
3863
  const REVENUE = [
@@ -5588,7 +5609,8 @@ const DEPRECIATION = [
5588
5609
  description: "Depreciation on office buildings (NBR rate: 10%)",
5589
5610
  parentCode: "Operating Expenses",
5590
5611
  isTotal: false,
5591
- cashFlowCategory: "Operating"
5612
+ cashFlowCategory: "Operating",
5613
+ nonCashAdjustmentTag: "depreciation"
5592
5614
  },
5593
5615
  {
5594
5616
  code: "6602",
@@ -5597,7 +5619,8 @@ const DEPRECIATION = [
5597
5619
  description: "Depreciation on factory buildings (NBR rate: 20%)",
5598
5620
  parentCode: "Operating Expenses",
5599
5621
  isTotal: false,
5600
- cashFlowCategory: "Operating"
5622
+ cashFlowCategory: "Operating",
5623
+ nonCashAdjustmentTag: "depreciation"
5601
5624
  },
5602
5625
  {
5603
5626
  code: "6603",
@@ -5606,7 +5629,8 @@ const DEPRECIATION = [
5606
5629
  description: "Depreciation on plant and machinery (NBR rate: 20%)",
5607
5630
  parentCode: "Operating Expenses",
5608
5631
  isTotal: false,
5609
- cashFlowCategory: "Operating"
5632
+ cashFlowCategory: "Operating",
5633
+ nonCashAdjustmentTag: "depreciation"
5610
5634
  },
5611
5635
  {
5612
5636
  code: "6604",
@@ -5615,7 +5639,8 @@ const DEPRECIATION = [
5615
5639
  description: "Depreciation on furniture and fixtures (NBR rate: 10%)",
5616
5640
  parentCode: "Operating Expenses",
5617
5641
  isTotal: false,
5618
- cashFlowCategory: "Operating"
5642
+ cashFlowCategory: "Operating",
5643
+ nonCashAdjustmentTag: "depreciation"
5619
5644
  },
5620
5645
  {
5621
5646
  code: "6605",
@@ -5624,7 +5649,8 @@ const DEPRECIATION = [
5624
5649
  description: "Depreciation on motor vehicles (NBR rate: 20%)",
5625
5650
  parentCode: "Operating Expenses",
5626
5651
  isTotal: false,
5627
- cashFlowCategory: "Operating"
5652
+ cashFlowCategory: "Operating",
5653
+ nonCashAdjustmentTag: "depreciation"
5628
5654
  },
5629
5655
  {
5630
5656
  code: "6606",
@@ -5633,7 +5659,8 @@ const DEPRECIATION = [
5633
5659
  description: "Depreciation on office equipment (NBR rate: 20%)",
5634
5660
  parentCode: "Operating Expenses",
5635
5661
  isTotal: false,
5636
- cashFlowCategory: "Operating"
5662
+ cashFlowCategory: "Operating",
5663
+ nonCashAdjustmentTag: "depreciation"
5637
5664
  },
5638
5665
  {
5639
5666
  code: "6607",
@@ -5642,7 +5669,8 @@ const DEPRECIATION = [
5642
5669
  description: "Depreciation on computer and IT equipment (NBR rate: 30%)",
5643
5670
  parentCode: "Operating Expenses",
5644
5671
  isTotal: false,
5645
- cashFlowCategory: "Operating"
5672
+ cashFlowCategory: "Operating",
5673
+ nonCashAdjustmentTag: "depreciation"
5646
5674
  },
5647
5675
  {
5648
5676
  code: "6608",
@@ -5651,7 +5679,8 @@ const DEPRECIATION = [
5651
5679
  description: "Depreciation on medical equipment (NBR rate: 20%)",
5652
5680
  parentCode: "Operating Expenses",
5653
5681
  isTotal: false,
5654
- cashFlowCategory: "Operating"
5682
+ cashFlowCategory: "Operating",
5683
+ nonCashAdjustmentTag: "depreciation"
5655
5684
  },
5656
5685
  {
5657
5686
  code: "6609",
@@ -5660,7 +5689,8 @@ const DEPRECIATION = [
5660
5689
  description: "Depreciation on other property, plant and equipment",
5661
5690
  parentCode: "Operating Expenses",
5662
5691
  isTotal: false,
5663
- cashFlowCategory: "Operating"
5692
+ cashFlowCategory: "Operating",
5693
+ nonCashAdjustmentTag: "depreciation"
5664
5694
  },
5665
5695
  {
5666
5696
  code: "6610",
@@ -5669,7 +5699,8 @@ const DEPRECIATION = [
5669
5699
  description: "Depreciation on right-of-use assets (IFRS 16)",
5670
5700
  parentCode: "Operating Expenses",
5671
5701
  isTotal: false,
5672
- cashFlowCategory: "Operating"
5702
+ cashFlowCategory: "Operating",
5703
+ nonCashAdjustmentTag: "depreciation"
5673
5704
  },
5674
5705
  {
5675
5706
  code: "6611",
@@ -5678,7 +5709,8 @@ const DEPRECIATION = [
5678
5709
  description: "Depreciation on investment property (NBR rate: 10%)",
5679
5710
  parentCode: "Operating Expenses",
5680
5711
  isTotal: false,
5681
- cashFlowCategory: "Operating"
5712
+ cashFlowCategory: "Operating",
5713
+ nonCashAdjustmentTag: "depreciation"
5682
5714
  },
5683
5715
  {
5684
5716
  code: "6612",
@@ -5687,7 +5719,8 @@ const DEPRECIATION = [
5687
5719
  description: "Amortization of software (NBR rate: 30%)",
5688
5720
  parentCode: "Operating Expenses",
5689
5721
  isTotal: false,
5690
- cashFlowCategory: "Operating"
5722
+ cashFlowCategory: "Operating",
5723
+ nonCashAdjustmentTag: "amortization"
5691
5724
  },
5692
5725
  {
5693
5726
  code: "6613",
@@ -5696,7 +5729,8 @@ const DEPRECIATION = [
5696
5729
  description: "Amortization of other intangible assets",
5697
5730
  parentCode: "Operating Expenses",
5698
5731
  isTotal: false,
5699
- cashFlowCategory: "Operating"
5732
+ cashFlowCategory: "Operating",
5733
+ nonCashAdjustmentTag: "amortization"
5700
5734
  }
5701
5735
  ];
5702
5736
  const PROVISIONS = [
@@ -5752,7 +5786,8 @@ const PROVISIONS = [
5752
5786
  description: "Impairment loss on property, plant and equipment",
5753
5787
  parentCode: "Operating Expenses",
5754
5788
  isTotal: false,
5755
- cashFlowCategory: "Operating"
5789
+ cashFlowCategory: "Operating",
5790
+ nonCashAdjustmentTag: "impairment"
5756
5791
  },
5757
5792
  {
5758
5793
  code: "6707",
@@ -5761,7 +5796,8 @@ const PROVISIONS = [
5761
5796
  description: "Impairment loss on intangible assets",
5762
5797
  parentCode: "Operating Expenses",
5763
5798
  isTotal: false,
5764
- cashFlowCategory: "Operating"
5799
+ cashFlowCategory: "Operating",
5800
+ nonCashAdjustmentTag: "impairment"
5765
5801
  },
5766
5802
  {
5767
5803
  code: "6708",
@@ -5770,7 +5806,8 @@ const PROVISIONS = [
5770
5806
  description: "Impairment loss on goodwill",
5771
5807
  parentCode: "Operating Expenses",
5772
5808
  isTotal: false,
5773
- cashFlowCategory: "Operating"
5809
+ cashFlowCategory: "Operating",
5810
+ nonCashAdjustmentTag: "impairment"
5774
5811
  },
5775
5812
  {
5776
5813
  code: "6709",
@@ -6246,43 +6283,308 @@ const ALL_TAX_ACCOUNTS = [
6246
6283
  * `accountRepository.resolveAccountId(code)` to fail at runtime.
6247
6284
  */
6248
6285
  const BD_ACCOUNT_CODES = {
6286
+ /**
6287
+ * 1113 — Cash at Bank (Current Account). The normal default for
6288
+ * "where receipts land". NOT 1112 — that's "Cash in Hand (Foreign
6289
+ * Currency)" in this chart, a common mis-mapping in BD ERP setups.
6290
+ */
6249
6291
  CASH: "1113",
6292
+ /** 1111 — Cash in Hand (Petty Cash). Use for petty-cash accounts only. */
6250
6293
  PETTY_CASH: "1111",
6294
+ /** 1123 — Per-register POS till float (cash drawer). */
6251
6295
  POS_DRAWER: "1123",
6296
+ /** 1124 — POS reconciliation variance (over/short clearing). */
6252
6297
  POS_OVER_SHORT: "1124",
6298
+ /** 1125 — Payment gateway proceeds awaiting bank settlement. */
6253
6299
  GATEWAY_CLEARING: "1125",
6300
+ /** 1126 — Mobile money merchant balance (bKash/Nagad/Rocket merchant). */
6254
6301
  MOBILE_MONEY_MERCHANT: "1126",
6302
+ /** 1127 — COD cash held by courier awaiting remittance. */
6255
6303
  COD_CLEARING: "1127",
6256
6304
  AR: "1141",
6305
+ /** 1158 — Net amount due from marketplaces (Daraz/Chaldal/Pickaboo). */
6257
6306
  MARKETPLACE_RECEIVABLE: "1158",
6307
+ /**
6308
+ * 1159 — Chargeback / Payment Dispute Receivable. Customer-initiated
6309
+ * card-network disputes. Disputed amount held pending network resolution
6310
+ * (typically 30-90 days). Recovered → reversed to cash; lost → written
6311
+ * off via `BAD_DEBT_WRITTEN_OFF` or recovered via `BAD_DEBT_RECOVERY`.
6312
+ */
6313
+ CHARGEBACK_RECEIVABLE: "1159",
6314
+ /**
6315
+ * 1145 — Receivable from Related Parties.
6316
+ * Used as inter-branch receivable when consolidated reporting needs
6317
+ * explicit settlement balances. For standard inter-branch transfers
6318
+ * the `1179` clearing path is sufficient.
6319
+ */
6258
6320
  INTER_BRANCH_RECEIVABLE: "1145",
6259
6321
  VAT_RECEIVABLE: "1150",
6260
6322
  ADVANCE_INCOME_TAX: "1151",
6323
+ /**
6324
+ * 1153 — VDS Receivable. The portion of output VAT withheld by a
6325
+ * designated buyer (govt entity / large corporate) and deposited to
6326
+ * NBR on our behalf. Held as an asset until offset against VAT Output
6327
+ * Payable at the monthly return filing.
6328
+ */
6329
+ VDS_RECEIVABLE: "1153",
6261
6330
  VAT_CASH_BASIS_TRANSITION: "1157",
6262
6331
  RAW_MATERIALS: "1161",
6263
6332
  WIP: "1162",
6264
6333
  FINISHED_GOODS: "1163",
6334
+ /**
6335
+ * 1164 — Merchandise / Trading Goods. The retail default for stock
6336
+ * movements (procurement, sales COGS, transfers, adjustments). NOTE:
6337
+ * earlier (pre-0.2.2) BFRS audits sometimes confused this with 1165;
6338
+ * `1165` is Packing Materials in this chart.
6339
+ */
6265
6340
  MERCHANDISE: "1164",
6266
6341
  PACKING_MATERIALS: "1165",
6267
6342
  INVENTORY_IN_TRANSIT: "1179",
6268
6343
  AP: "2111",
6269
6344
  BILLS_PAYABLE: "2112",
6345
+ /**
6346
+ * 2113 — Payable to Related Parties.
6347
+ * Mirror of 1145 for intra-company settlements.
6348
+ */
6270
6349
  INTER_BRANCH_PAYABLE: "2113",
6271
6350
  ACCRUED_EXPENSES: "2114",
6351
+ /**
6352
+ * 2122 — Sales / Agent Commission Payable. Accrued obligation to internal
6353
+ * sales reps or external agents on closed sales, awaiting payout cycle.
6354
+ * Distinct from `BD_ACCOUNT_CODES.AP` (general trade payables) so payroll
6355
+ * adjacent obligations report separately.
6356
+ */
6357
+ COMMISSION_PAYABLE: "2122",
6272
6358
  FREIGHT_PAYABLE: "2124",
6359
+ /**
6360
+ * 2125 — Goods Received / Invoice Received (GR/IR).
6361
+ * Accrued liability for goods physically received but not yet
6362
+ * billed. Receipt: `Dr Inventory / Cr 2125`. Bill: `Dr 2125 / Cr AP`.
6363
+ * Cleared on 3-way match. SAP/Oracle/ERPNext-aligned placement.
6364
+ */
6273
6365
  GR_IR_CLEARING: "2125",
6366
+ /**
6367
+ * 2126 — Transfer Cost Clearing (Inter-Branch).
6368
+ * Capitalization clearing for inter-branch transit costs into
6369
+ * receiver inventory per IAS 2. Receive: `Dr 1164 (goods + transit)
6370
+ * / Cr 1179 (goods) / Cr 2126 (transit)`. Cleared by host against
6371
+ * actual freight invoices.
6372
+ */
6274
6373
  TRANSFER_COST_CLEARING: "2126",
6374
+ /** 2127 — Goods returned in transit, awaiting RMA receipt + inspection. */
6275
6375
  SALES_RETURN_CLEARING: "2127",
6376
+ /** 2128 — Approved customer refund authorized but not yet remitted. */
6276
6377
  REFUND_PAYABLE: "2128",
6378
+ /** 2129 — Customer pre-paid balance (gift cards, vouchers). */
6277
6379
  GIFT_CARD_LIABILITY: "2129",
6380
+ /** 2130 — Customer in-store credit balance. */
6278
6381
  STORE_CREDIT_LIABILITY: "2130",
6382
+ /** 2160 — Outstanding loyalty points valued per IFRS 15. */
6279
6383
  LOYALTY_POINT_LIABILITY: "2160",
6384
+ /**
6385
+ * 2162 — Reverse Logistics / Returns Processing Payable. Accrued cost
6386
+ * to handle inbound returns: 3PL handling fee, reverse-courier,
6387
+ * restocking, inspection. Distinct from outbound `FREIGHT_PAYABLE` —
6388
+ * this is the inbound/reverse flow accrual.
6389
+ */
6390
+ REVERSE_LOGISTICS_PAYABLE: "2162",
6391
+ /**
6392
+ * 2191 — Advance from Customers. Customer pre-payments before goods
6393
+ * are delivered (pre-orders, milestone-billed services, deposits).
6394
+ * Cleared to revenue when delivery / performance obligation completes.
6395
+ * Required by IFRS 15 contract-liability presentation.
6396
+ */
6397
+ CUSTOMER_ADVANCE: "2191",
6280
6398
  INCOME_TAX_PAYABLE: "2131",
6281
6399
  VAT_OUTPUT_PAYABLE: "2132",
6282
6400
  TDS_PAYABLE: "2135",
6401
+ /**
6402
+ * 2136 — VDS Payable. Amount we must remit to NBR when we withhold VDS
6403
+ * from a supplier's payment. Dr here at receipt; Cr to Bank when remitted.
6404
+ * Distinct from 2135 (TDS) — VDS is VAT-side withholding, TDS is income-tax-side.
6405
+ */
6406
+ VDS_PAYABLE: "2136",
6283
6407
  SALES_REVENUE: "4111",
6408
+ /**
6409
+ * 4147 — Transport / Freight Revenue. When delivery is sold as a
6410
+ * line-item (Tk 60 delivery charge on the invoice) instead of being
6411
+ * absorbed in product price. Posted gross at sale; the actual delivery
6412
+ * cost flows through `FREIGHT_OUTWARD` separately so margin per
6413
+ * delivery channel stays visible.
6414
+ */
6415
+ TRANSPORT_REVENUE: "4147",
6416
+ /**
6417
+ * 4159 — Courier / Delivery Service Revenue. Used when the merchant
6418
+ * itself runs the courier leg (own riders, in-house fleet) and bills
6419
+ * the customer for it. Distinct from `TRANSPORT_REVENUE` which is the
6420
+ * generic transport-revenue line — pick whichever the deployment uses.
6421
+ */
6422
+ COURIER_REVENUE: "4159",
6423
+ /**
6424
+ * 4319 — Restocking Fee Income. Customer-paid fee retained by the
6425
+ * merchant on a return/exchange to cover handling costs. Distinct
6426
+ * from `SALES_REVENUE` (the original goods sale already booked) and
6427
+ * from `MISCELLANEOUS_INCOME` so reporting can break out RMA-specific
6428
+ * monetisation. Posting: `Dr Cash/AR / Cr 4319` for the fee amount;
6429
+ * the goods value flows through the normal refund + COGS-reversal
6430
+ * pipeline independently.
6431
+ */
6432
+ RESTOCKING_FEE_INCOME: "4319",
6433
+ /**
6434
+ * 4310 — Bad Debt Recovery. Credit booked when a previously written-off
6435
+ * receivable is unexpectedly recovered (chargeback reversal, late COD
6436
+ * remittance, recovered marketplace deduction). Posts: `Dr Cash/Bank /
6437
+ * Cr 4310`. Counterpart of `BAD_DEBT_WRITTEN_OFF`.
6438
+ */
6439
+ BAD_DEBT_RECOVERY: "4310",
6440
+ /**
6441
+ * 4317 — Write-back of Provisions / Inventory Gain. Credit booked when a
6442
+ * previously expensed loss is reversed because the value is recovered:
6443
+ * physical-count overage (stock found that wasn't on the books), reversal
6444
+ * of an over-stated obsolescence/shrinkage provision, or post-write-off
6445
+ * recovery of inventory. Posts: `Dr Inventory / Cr 4317`. Distinct from
6446
+ * `SHRINKAGE` (6711) which is the loss side — gains MUST NOT be credited
6447
+ * to the loss expense because that creates a misleading credit balance
6448
+ * on a Loss account and inflates profit.
6449
+ */
6450
+ INVENTORY_GAIN: "4317",
6451
+ /** 5111 — Cost of Goods Sold — Raw Materials */
6284
6452
  COGS_MATERIALS: "5111",
6453
+ /**
6454
+ * 5116 — Import Cost (duty + freight + insurance). Capitalized to
6455
+ * inventory at landed cost. Use this when a CIF/FOB import flow needs
6456
+ * to roll duty + freight + insurance into the goods cost basis per
6457
+ * IAS 2. For inland inbound freight on domestic purchases use
6458
+ * `CARRIAGE_INWARD`.
6459
+ */
6460
+ IMPORT_LANDED_COST: "5116",
6461
+ /**
6462
+ * 5117 — Carriage Inward / Freight-In. Inbound freight on domestic
6463
+ * stock receipts. Capitalized to inventory at receipt time so the cost
6464
+ * basis matches IAS 2. Distinct from `FREIGHT_OUTWARD` (sales-side).
6465
+ */
6466
+ CARRIAGE_INWARD: "5117",
6467
+ /**
6468
+ * 5317 — Packaging Cost (manufacturing). Cost of primary packaging
6469
+ * applied during production (bottles, blister packs, retail boxes).
6470
+ * For dispatch-side packaging (cartons, pallet wrap, courier mailers)
6471
+ * use `PACKAGING_DISPATCH`.
6472
+ */
6473
+ PACKAGING_PRODUCTION: "5317",
6474
+ /**
6475
+ * 5505 — Customs Duty on Imports. NBR import duty paid at clearance.
6476
+ * Either capitalized into landed cost via `IMPORT_LANDED_COST` or
6477
+ * expensed here when the host doesn't capitalize (small-value imports,
6478
+ * non-resale imports).
6479
+ */
6480
+ CUSTOMS_DUTY: "5505",
6481
+ /**
6482
+ * 5507 — C&F Agent Commission. Clearing & forwarding agent fee on
6483
+ * imports. Typically capitalized into landed cost. Listed separately
6484
+ * from `COURIER_COD_COMMISSION` because the cost driver (volume of
6485
+ * shipments × cargo weight) and tax treatment (input-VAT eligibility)
6486
+ * differ from last-mile courier commission.
6487
+ */
6488
+ CF_AGENT_COMMISSION: "5507",
6489
+ /**
6490
+ * 6302 — Postage & Courier (admin). Admin-side postage for documents,
6491
+ * sample dispatches, internal mail. NOT for outbound delivery to
6492
+ * customers — that's `FREIGHT_OUTWARD` (operating expense, not admin).
6493
+ */
6494
+ POSTAGE_ADMIN: "6302",
6495
+ /**
6496
+ * 6403 — Sales Commission / Incentive. Commercial team's commission
6497
+ * on closed sales (internal payroll-adjacent expense). Distinct from
6498
+ * `MARKETPLACE_COMMISSION` (platform cut) and `COURIER_COD_COMMISSION`
6499
+ * (logistics-side fee).
6500
+ */
6501
+ SALES_COMMISSION: "6403",
6502
+ /**
6503
+ * 6405 — Freight Outward / Delivery (domestic). Default outbound
6504
+ * delivery cost for the local market — own fleet fuel, last-mile
6505
+ * courier paid as flat-rate-per-parcel, etc. Use `SHIPPING_LOGISTICS_EXPORT`
6506
+ * for cross-border / DHL-style weight-based shipping.
6507
+ */
6508
+ FREIGHT_OUTWARD: "6405",
6509
+ /**
6510
+ * 6406 — Shipping & Logistics (export). Cross-border outbound shipping
6511
+ * cost — DHL / FedEx / Aramex weight-priced commercial dispatches,
6512
+ * customs clearance fees on outbound, export-side insurance. Reported
6513
+ * separately from `FREIGHT_OUTWARD` because export logistics has
6514
+ * different VAT treatment (zero-rated) and cost drivers (chargeable
6515
+ * weight, customs).
6516
+ */
6517
+ SHIPPING_LOGISTICS_EXPORT: "6406",
6518
+ /**
6519
+ * 6407 — Packaging for Dispatch. Outbound packaging consumables —
6520
+ * cartons, pallet wrap, courier mailers, bubble wrap, fragile labels.
6521
+ * Distinct from `PACKAGING_PRODUCTION` (production-time primary
6522
+ * packaging that gets capitalized into COGS).
6523
+ */
6524
+ PACKAGING_DISPATCH: "6407",
6525
+ /**
6526
+ * 6422 — Marketplace Commission. Platform cut deducted by Daraz /
6527
+ * Chaldal / Pickaboo / Rokomari at payout time on goods sold via
6528
+ * their channel. Reported separately from `BANK_CHARGES` because
6529
+ * platform commission is sales-channel COGS-adjacent, not banking.
6530
+ */
6531
+ MARKETPLACE_COMMISSION: "6422",
6532
+ /**
6533
+ * 6426 — Hub / Depot Rent (logistics). Rent for sortation hubs and
6534
+ * last-mile depots (Dhaka North/South, Chittagong, etc.). Distinct
6535
+ * from office rent and showroom rent — courier hubs often have
6536
+ * variable lease terms based on parcel volume.
6537
+ */
6538
+ LOGISTICS_HUB_RENT: "6426",
6539
+ /**
6540
+ * 6428 — Driver Bonus / Per-Trip Commission. Variable performance
6541
+ * incentives for couriers — on-time, zero-damage, multi-tier delivery
6542
+ * counts. Accrued weekly, settled monthly. Distinct from
6543
+ * `SALES_COMMISSION` (commercial team) and `COURIER_COD_COMMISSION`
6544
+ * (external partner cut).
6545
+ */
6546
+ COURIER_DRIVER_BONUS: "6428",
6547
+ /**
6548
+ * 6823 — Marketplace Advertising Spend. Daraz Ads, Chaldal Sponsored
6549
+ * Listings, Pickaboo Promotions — platform-specific ad-engine fees.
6550
+ * Distinct from generic digital marketing and from
6551
+ * `MARKETPLACE_COMMISSION` (sales commission).
6552
+ */
6553
+ MARKETPLACE_ADS: "6823",
6554
+ /**
6555
+ * 6824 — Marketplace Compliance / Category Fee. Recurring seller-
6556
+ * compliance and category-listing fees on marketplaces (Premium Seller
6557
+ * Badge, Category Compliance, Return Guarantee Fund). Distinct from
6558
+ * `MARKETPLACE_COMMISSION` (per-sale cut) and from association fees.
6559
+ */
6560
+ MARKETPLACE_COMPLIANCE_FEE: "6824",
6561
+ /**
6562
+ * 6328 — Bank Charges & Commission. Default fee account for bank
6563
+ * charges, payment-gateway processing fees (Stripe / SSLCommerz /
6564
+ * ShurjoPay), mobile-money merchant deductions, and L/C-adjacent
6565
+ * banking fees that don't warrant their own line. Use 6329 for
6566
+ * L/C-specific commission, 6330 for guarantee commission.
6567
+ */
6568
+ BANK_CHARGES: "6328",
6569
+ /**
6570
+ * 6423 — Courier COD Commission. Commission deducted by courier
6571
+ * partners (Pathao / RedX / Steadfast / paperfly) on COD remittance.
6572
+ * Distinct from `BANK_CHARGES` so BD operating-expense reports break
6573
+ * out logistics-side fees from banking fees — the two scale with
6574
+ * different drivers (volume of deliveries vs. payment volume).
6575
+ */
6576
+ COURIER_COD_COMMISSION: "6423",
6577
+ /**
6578
+ * 6702 — Bad Debt Written Off. Unrecoverable A/R or clearing-account
6579
+ * shortfall: COD partial collection, refused-on-delivery short-pay,
6580
+ * marketplace deduction the courier won't reimburse. Posting a write-
6581
+ * off here keeps the original revenue gross and surfaces the loss
6582
+ * line in P&L instead of silently netting receivables.
6583
+ */
6584
+ BAD_DEBT_WRITTEN_OFF: "6702",
6585
+ /** 6703 — Inventory Write-down / Obsolescence (slow-moving / expired). */
6285
6586
  OBSOLESCENCE: "6703",
6587
+ /** 6711 — Inventory Shrinkage / Theft / Loss (audit shortfall). */
6286
6588
  SHRINKAGE: "6711"
6287
6589
  };
6288
6590
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@classytic/ledger-bd",
3
- "version": "0.2.2",
3
+ "version": "0.3.0",
4
4
  "description": "Bangladesh country pack for @classytic/ledger — BFRS chart of accounts, NBR VAT/TDS tax codes, Mushak 9.1 return",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -46,7 +46,7 @@
46
46
  "author": "Classytic <classytic.dev@gmail.com> (https://github.com/classytic)",
47
47
  "license": "MIT",
48
48
  "peerDependencies": {
49
- "@classytic/ledger": ">=0.7.0"
49
+ "@classytic/ledger": "^0.12.0"
50
50
  },
51
51
  "engines": {
52
52
  "node": ">=22"
@@ -64,12 +64,16 @@
64
64
  },
65
65
  "devDependencies": {
66
66
  "@classytic/dev-tools": "^0.2.0",
67
- "@classytic/ledger": "^0.7.0",
67
+ "@classytic/ledger": "^0.12.0",
68
+ "@classytic/mongokit": "^3.13.3",
69
+ "@classytic/primitives": "^0.5.0",
70
+ "@classytic/repo-core": "^0.4.2",
68
71
  "@types/node": "^22.0.0",
69
72
  "mongodb-memory-server": "^11.0.1",
70
73
  "mongoose": "^9.3.3",
71
74
  "tsdown": "^0.21.5",
72
75
  "typescript": "^5.7.0",
73
- "vitest": "^3.0.0"
76
+ "vitest": "^3.0.0",
77
+ "zod": "^4.4.3"
74
78
  }
75
79
  }