@classytic/ledger-bd 0.2.3 → 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/dist/index.mjs +260 -12
- package/package.json +8 -4
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",
|
|
@@ -6271,72 +6283,308 @@ const ALL_TAX_ACCOUNTS = [
|
|
|
6271
6283
|
* `accountRepository.resolveAccountId(code)` to fail at runtime.
|
|
6272
6284
|
*/
|
|
6273
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
|
+
*/
|
|
6274
6291
|
CASH: "1113",
|
|
6292
|
+
/** 1111 — Cash in Hand (Petty Cash). Use for petty-cash accounts only. */
|
|
6275
6293
|
PETTY_CASH: "1111",
|
|
6294
|
+
/** 1123 — Per-register POS till float (cash drawer). */
|
|
6276
6295
|
POS_DRAWER: "1123",
|
|
6296
|
+
/** 1124 — POS reconciliation variance (over/short clearing). */
|
|
6277
6297
|
POS_OVER_SHORT: "1124",
|
|
6298
|
+
/** 1125 — Payment gateway proceeds awaiting bank settlement. */
|
|
6278
6299
|
GATEWAY_CLEARING: "1125",
|
|
6300
|
+
/** 1126 — Mobile money merchant balance (bKash/Nagad/Rocket merchant). */
|
|
6279
6301
|
MOBILE_MONEY_MERCHANT: "1126",
|
|
6302
|
+
/** 1127 — COD cash held by courier awaiting remittance. */
|
|
6280
6303
|
COD_CLEARING: "1127",
|
|
6281
6304
|
AR: "1141",
|
|
6305
|
+
/** 1158 — Net amount due from marketplaces (Daraz/Chaldal/Pickaboo). */
|
|
6282
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
|
+
*/
|
|
6283
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
|
+
*/
|
|
6284
6320
|
INTER_BRANCH_RECEIVABLE: "1145",
|
|
6285
6321
|
VAT_RECEIVABLE: "1150",
|
|
6286
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
|
+
*/
|
|
6287
6329
|
VDS_RECEIVABLE: "1153",
|
|
6288
6330
|
VAT_CASH_BASIS_TRANSITION: "1157",
|
|
6289
6331
|
RAW_MATERIALS: "1161",
|
|
6290
6332
|
WIP: "1162",
|
|
6291
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
|
+
*/
|
|
6292
6340
|
MERCHANDISE: "1164",
|
|
6293
6341
|
PACKING_MATERIALS: "1165",
|
|
6294
6342
|
INVENTORY_IN_TRANSIT: "1179",
|
|
6295
6343
|
AP: "2111",
|
|
6296
6344
|
BILLS_PAYABLE: "2112",
|
|
6345
|
+
/**
|
|
6346
|
+
* 2113 — Payable to Related Parties.
|
|
6347
|
+
* Mirror of 1145 for intra-company settlements.
|
|
6348
|
+
*/
|
|
6297
6349
|
INTER_BRANCH_PAYABLE: "2113",
|
|
6298
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
|
+
*/
|
|
6299
6357
|
COMMISSION_PAYABLE: "2122",
|
|
6300
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
|
+
*/
|
|
6301
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
|
+
*/
|
|
6302
6373
|
TRANSFER_COST_CLEARING: "2126",
|
|
6374
|
+
/** 2127 — Goods returned in transit, awaiting RMA receipt + inspection. */
|
|
6303
6375
|
SALES_RETURN_CLEARING: "2127",
|
|
6376
|
+
/** 2128 — Approved customer refund authorized but not yet remitted. */
|
|
6304
6377
|
REFUND_PAYABLE: "2128",
|
|
6378
|
+
/** 2129 — Customer pre-paid balance (gift cards, vouchers). */
|
|
6305
6379
|
GIFT_CARD_LIABILITY: "2129",
|
|
6380
|
+
/** 2130 — Customer in-store credit balance. */
|
|
6306
6381
|
STORE_CREDIT_LIABILITY: "2130",
|
|
6382
|
+
/** 2160 — Outstanding loyalty points valued per IFRS 15. */
|
|
6307
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
|
+
*/
|
|
6308
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
|
+
*/
|
|
6309
6397
|
CUSTOMER_ADVANCE: "2191",
|
|
6310
6398
|
INCOME_TAX_PAYABLE: "2131",
|
|
6311
6399
|
VAT_OUTPUT_PAYABLE: "2132",
|
|
6312
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
|
+
*/
|
|
6313
6406
|
VDS_PAYABLE: "2136",
|
|
6314
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
|
+
*/
|
|
6315
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
|
+
*/
|
|
6316
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
|
+
*/
|
|
6317
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
|
+
*/
|
|
6318
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
|
+
*/
|
|
6319
6450
|
INVENTORY_GAIN: "4317",
|
|
6451
|
+
/** 5111 — Cost of Goods Sold — Raw Materials */
|
|
6320
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
|
+
*/
|
|
6321
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
|
+
*/
|
|
6322
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
|
+
*/
|
|
6323
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
|
+
*/
|
|
6324
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
|
+
*/
|
|
6325
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
|
+
*/
|
|
6326
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
|
+
*/
|
|
6327
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
|
+
*/
|
|
6328
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
|
+
*/
|
|
6329
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
|
+
*/
|
|
6330
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
|
+
*/
|
|
6331
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
|
+
*/
|
|
6332
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
|
+
*/
|
|
6333
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
|
+
*/
|
|
6334
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
|
+
*/
|
|
6335
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
|
+
*/
|
|
6336
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
|
+
*/
|
|
6337
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
|
+
*/
|
|
6338
6584
|
BAD_DEBT_WRITTEN_OFF: "6702",
|
|
6585
|
+
/** 6703 — Inventory Write-down / Obsolescence (slow-moving / expired). */
|
|
6339
6586
|
OBSOLESCENCE: "6703",
|
|
6587
|
+
/** 6711 — Inventory Shrinkage / Theft / Loss (audit shortfall). */
|
|
6340
6588
|
SHRINKAGE: "6711"
|
|
6341
6589
|
};
|
|
6342
6590
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@classytic/ledger-bd",
|
|
3
|
-
"version": "0.
|
|
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.
|
|
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.
|
|
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
|
}
|