@classytic/ledger-bd 0.2.1 → 0.2.3
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 +99 -0
- package/dist/index.d.mts +317 -1
- package/dist/index.mjs +1014 -428
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,105 @@
|
|
|
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
|
+
|
|
60
|
+
## [0.2.2]
|
|
61
|
+
|
|
62
|
+
### Added
|
|
63
|
+
|
|
64
|
+
**`BD_ACCOUNT_CODES` map** — canonical export of domain-meaningful keys
|
|
65
|
+
to 4-digit chart codes (e.g. `BD_ACCOUNT_CODES.AR === '1141'`). Hosts
|
|
66
|
+
build their posting contracts against this map instead of hand-coding
|
|
67
|
+
chart-code literals. The map covers the codes most posting layers
|
|
68
|
+
reference (cash/AR/AP/inventory/COGS/revenue/tax/clearings) and is
|
|
69
|
+
typed with `BDAccountCode` and `BDAccountKey` helpers.
|
|
70
|
+
|
|
71
|
+
Hosts that need different default mappings (e.g. a manufacturer
|
|
72
|
+
defaulting `MERCHANDISE → FINISHED_GOODS`) layer their own thin alias
|
|
73
|
+
module on top — the chart is the same; the host's "default inventory
|
|
74
|
+
account" is policy. See `BDAccountCode` for the typed key list.
|
|
75
|
+
|
|
76
|
+
**Two clearing-account codes** in the liability section (2125 / 2126),
|
|
77
|
+
matching SAP / Oracle / ERPNext placement (clearings have credit-natural
|
|
78
|
+
balances, so they belong in 2xxx, not 1xxx):
|
|
79
|
+
|
|
80
|
+
- **`2125` — Goods Received / Invoice Received (GR/IR)** — accrued
|
|
81
|
+
liability for physical goods receipt pending vendor invoice. Decouples
|
|
82
|
+
physical receipt from financial posting:
|
|
83
|
+
- Receipt: `Dr Inventory / Cr 2125`
|
|
84
|
+
- Vendor bill: `Dr 2125 / Cr AP`
|
|
85
|
+
- Period-end balance = receipts pending invoice (accrual reportable
|
|
86
|
+
on the balance sheet). Cleared on 3-way match (PO ↔ receipt ↔
|
|
87
|
+
invoice).
|
|
88
|
+
|
|
89
|
+
- **`2126` — Transfer Cost Clearing (Inter-Branch)** — accrued liability
|
|
90
|
+
for inter-branch transit costs capitalized into receiver inventory per
|
|
91
|
+
IAS 2:
|
|
92
|
+
- Receive leg: `Dr 1164 (goods + transit) / Cr 1179 (goods) / Cr 2126 (transit)`
|
|
93
|
+
- Host clears against actual freight invoice: `Dr 2126 / Cr AP`
|
|
94
|
+
|
|
95
|
+
Both codes slot into the previously-empty 2125–2126 gap in the chart
|
|
96
|
+
(between 2124 Freight & Shipping Payable and 2131 Income Tax Payable),
|
|
97
|
+
so no existing seeded codes shift.
|
|
98
|
+
|
|
99
|
+
### Migration
|
|
100
|
+
|
|
101
|
+
Pure additive change. Run `seedAccounts()` once after upgrade to pick up
|
|
102
|
+
the two new codes — `accountRepository.seedAccounts()` is idempotent and
|
|
103
|
+
will not modify pre-existing accounts.
|
|
104
|
+
|
|
6
105
|
## [0.2.1]
|
|
7
106
|
|
|
8
107
|
### Added
|
package/dist/index.d.mts
CHANGED
|
@@ -49,6 +49,322 @@ declare const TDS_LIABILITY_ACCOUNTS: AccountType[];
|
|
|
49
49
|
declare const VDS_LIABILITY_ACCOUNTS: AccountType[];
|
|
50
50
|
declare const ALL_TAX_ACCOUNTS: AccountType[];
|
|
51
51
|
//#endregion
|
|
52
|
+
//#region src/accounts/codes.d.ts
|
|
53
|
+
/**
|
|
54
|
+
* Canonical BD chart account codes — domain-meaningful keys to the
|
|
55
|
+
* 4-digit chart codes that posting layers reference.
|
|
56
|
+
*
|
|
57
|
+
* This is the **fact** layer (chart of accounts is what it is). Hosts
|
|
58
|
+
* import these to write posting contracts:
|
|
59
|
+
*
|
|
60
|
+
* ```typescript
|
|
61
|
+
* import { BD_ACCOUNT_CODES as BD } from '@classytic/ledger-bd';
|
|
62
|
+
*
|
|
63
|
+
* { accountCode: BD.AR, debit: 1000, credit: 0 } // 1141 Accounts Receivable
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* Hosts that want different default mappings (e.g. a manufacturer
|
|
67
|
+
* defaulting to `FINISHED_GOODS` instead of `MERCHANDISE` for "the
|
|
68
|
+
* inventory account") layer their own thin alias module on top —
|
|
69
|
+
* never edit this file. It's the chart, not policy.
|
|
70
|
+
*
|
|
71
|
+
* Pinned to the codes seeded by `BD_ACCOUNT_TYPES` in this same package.
|
|
72
|
+
* Adding a code here without seeding it via the chart will cause
|
|
73
|
+
* `accountRepository.resolveAccountId(code)` to fail at runtime.
|
|
74
|
+
*/
|
|
75
|
+
declare const BD_ACCOUNT_CODES: {
|
|
76
|
+
/**
|
|
77
|
+
* 1113 — Cash at Bank (Current Account). The normal default for
|
|
78
|
+
* "where receipts land". NOT 1112 — that's "Cash in Hand (Foreign
|
|
79
|
+
* Currency)" in this chart, a common mis-mapping in BD ERP setups.
|
|
80
|
+
*/
|
|
81
|
+
readonly CASH: "1113"; /** 1111 — Cash in Hand (Petty Cash). Use for petty-cash accounts only. */
|
|
82
|
+
readonly PETTY_CASH: "1111"; /** 1123 — Per-register POS till float (cash drawer). */
|
|
83
|
+
readonly POS_DRAWER: "1123"; /** 1124 — POS reconciliation variance (over/short clearing). */
|
|
84
|
+
readonly POS_OVER_SHORT: "1124"; /** 1125 — Payment gateway proceeds awaiting bank settlement. */
|
|
85
|
+
readonly GATEWAY_CLEARING: "1125"; /** 1126 — Mobile money merchant balance (bKash/Nagad/Rocket merchant). */
|
|
86
|
+
readonly MOBILE_MONEY_MERCHANT: "1126"; /** 1127 — COD cash held by courier awaiting remittance. */
|
|
87
|
+
readonly COD_CLEARING: "1127";
|
|
88
|
+
readonly AR: "1141"; /** 1158 — Net amount due from marketplaces (Daraz/Chaldal/Pickaboo). */
|
|
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";
|
|
97
|
+
/**
|
|
98
|
+
* 1145 — Receivable from Related Parties.
|
|
99
|
+
* Used as inter-branch receivable when consolidated reporting needs
|
|
100
|
+
* explicit settlement balances. For standard inter-branch transfers
|
|
101
|
+
* the `1179` clearing path is sufficient.
|
|
102
|
+
*/
|
|
103
|
+
readonly INTER_BRANCH_RECEIVABLE: "1145";
|
|
104
|
+
readonly VAT_RECEIVABLE: "1150";
|
|
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";
|
|
113
|
+
readonly VAT_CASH_BASIS_TRANSITION: "1157";
|
|
114
|
+
readonly RAW_MATERIALS: "1161";
|
|
115
|
+
readonly WIP: "1162";
|
|
116
|
+
readonly FINISHED_GOODS: "1163";
|
|
117
|
+
/**
|
|
118
|
+
* 1164 — Merchandise / Trading Goods. The retail default for stock
|
|
119
|
+
* movements (procurement, sales COGS, transfers, adjustments). NOTE:
|
|
120
|
+
* earlier (pre-0.2.2) BFRS audits sometimes confused this with 1165;
|
|
121
|
+
* `1165` is Packing Materials in this chart.
|
|
122
|
+
*/
|
|
123
|
+
readonly MERCHANDISE: "1164";
|
|
124
|
+
readonly PACKING_MATERIALS: "1165";
|
|
125
|
+
readonly INVENTORY_IN_TRANSIT: "1179";
|
|
126
|
+
readonly AP: "2111";
|
|
127
|
+
readonly BILLS_PAYABLE: "2112";
|
|
128
|
+
/**
|
|
129
|
+
* 2113 — Payable to Related Parties.
|
|
130
|
+
* Mirror of 1145 for intra-company settlements.
|
|
131
|
+
*/
|
|
132
|
+
readonly INTER_BRANCH_PAYABLE: "2113";
|
|
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";
|
|
141
|
+
readonly FREIGHT_PAYABLE: "2124";
|
|
142
|
+
/**
|
|
143
|
+
* 2125 — Goods Received / Invoice Received (GR/IR).
|
|
144
|
+
* Accrued liability for goods physically received but not yet
|
|
145
|
+
* billed. Receipt: `Dr Inventory / Cr 2125`. Bill: `Dr 2125 / Cr AP`.
|
|
146
|
+
* Cleared on 3-way match. SAP/Oracle/ERPNext-aligned placement.
|
|
147
|
+
*/
|
|
148
|
+
readonly GR_IR_CLEARING: "2125";
|
|
149
|
+
/**
|
|
150
|
+
* 2126 — Transfer Cost Clearing (Inter-Branch).
|
|
151
|
+
* Capitalization clearing for inter-branch transit costs into
|
|
152
|
+
* receiver inventory per IAS 2. Receive: `Dr 1164 (goods + transit)
|
|
153
|
+
* / Cr 1179 (goods) / Cr 2126 (transit)`. Cleared by host against
|
|
154
|
+
* actual freight invoices.
|
|
155
|
+
*/
|
|
156
|
+
readonly TRANSFER_COST_CLEARING: "2126"; /** 2127 — Goods returned in transit, awaiting RMA receipt + inspection. */
|
|
157
|
+
readonly SALES_RETURN_CLEARING: "2127"; /** 2128 — Approved customer refund authorized but not yet remitted. */
|
|
158
|
+
readonly REFUND_PAYABLE: "2128"; /** 2129 — Customer pre-paid balance (gift cards, vouchers). */
|
|
159
|
+
readonly GIFT_CARD_LIABILITY: "2129"; /** 2130 — Customer in-store credit balance. */
|
|
160
|
+
readonly STORE_CREDIT_LIABILITY: "2130"; /** 2160 — Outstanding loyalty points valued per IFRS 15. */
|
|
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";
|
|
176
|
+
readonly INCOME_TAX_PAYABLE: "2131";
|
|
177
|
+
readonly VAT_OUTPUT_PAYABLE: "2132";
|
|
178
|
+
readonly TDS_PAYABLE: "2135";
|
|
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). */
|
|
362
|
+
readonly OBSOLESCENCE: "6703"; /** 6711 — Inventory Shrinkage / Theft / Loss (audit shortfall). */
|
|
363
|
+
readonly SHRINKAGE: "6711";
|
|
364
|
+
};
|
|
365
|
+
type BDAccountCode = (typeof BD_ACCOUNT_CODES)[keyof typeof BD_ACCOUNT_CODES];
|
|
366
|
+
type BDAccountKey = keyof typeof BD_ACCOUNT_CODES;
|
|
367
|
+
//#endregion
|
|
52
368
|
//#region src/accounts/index.d.ts
|
|
53
369
|
/** Complete flat array of all BD account types + tax sub-accounts + group labels */
|
|
54
370
|
declare const BD_ACCOUNT_TYPES: readonly AccountType[];
|
|
@@ -176,4 +492,4 @@ declare const ALL_DIVISIONS: ("Dhaka" | "Chittagong" | "Rajshahi" | "Khulna" | "
|
|
|
176
492
|
*/
|
|
177
493
|
declare const bangladeshPack: _$_classytic_ledger0.CountryPack;
|
|
178
494
|
//#endregion
|
|
179
|
-
export { ADMIN_EXPENSES, ALL_DIVISIONS, ALL_TAX_ACCOUNTS, ASSETS, BANKING_REVENUE, BD_ACCOUNT_TYPES, BD_DIVISIONS, COGS, COST_OF_SERVICES, CURRENT_ASSETS, CURRENT_LIABILITIES, DEPRECIATION, DIRECT_LABOR, DIRECT_MATERIALS, DIVISIONS, EMPLOYEE_COSTS, EQUITY, EXPENSES, FINANCIAL_EXPENSES, INDUSTRY_REVENUE, LIABILITIES, MANUFACTURING_OVERHEAD, NGO_REVENUE, NON_CURRENT_ASSETS, NON_CURRENT_LIABILITIES, OTHER_INCOME, OTHER_OPERATING, PREMISES_COSTS, PROVISIONS, PURCHASES, REVENUE, SALES_REVENUE, SELLING_DISTRIBUTION, ALL_TAX_CODES as TAX_CODES, TAX_CODES_BY_DIVISION, TAX_EXPENSE, TDS_LIABILITY_ACCOUNTS, VAT_ASSET_ACCOUNTS, VAT_LIABILITY_ACCOUNTS, VDS_LIABILITY_ACCOUNTS, bangladeshPack, getTaxCodeDetails, mushakReturnTemplate };
|
|
495
|
+
export { ADMIN_EXPENSES, ALL_DIVISIONS, ALL_TAX_ACCOUNTS, ASSETS, BANKING_REVENUE, type BDAccountCode, type BDAccountKey, BD_ACCOUNT_CODES, BD_ACCOUNT_TYPES, BD_DIVISIONS, COGS, COST_OF_SERVICES, CURRENT_ASSETS, CURRENT_LIABILITIES, DEPRECIATION, DIRECT_LABOR, DIRECT_MATERIALS, DIVISIONS, EMPLOYEE_COSTS, EQUITY, EXPENSES, FINANCIAL_EXPENSES, INDUSTRY_REVENUE, LIABILITIES, MANUFACTURING_OVERHEAD, NGO_REVENUE, NON_CURRENT_ASSETS, NON_CURRENT_LIABILITIES, OTHER_INCOME, OTHER_OPERATING, PREMISES_COSTS, PROVISIONS, PURCHASES, REVENUE, SALES_REVENUE, SELLING_DISTRIBUTION, ALL_TAX_CODES as TAX_CODES, TAX_CODES_BY_DIVISION, TAX_EXPENSE, TDS_LIABILITY_ACCOUNTS, VAT_ASSET_ACCOUNTS, VAT_LIABILITY_ACCOUNTS, VDS_LIABILITY_ACCOUNTS, bangladeshPack, getTaxCodeDetails, mushakReturnTemplate };
|