@classytic/ledger-bd 0.6.0 → 0.7.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 +385 -353
- package/dist/posting-recipes/index.d.mts +457 -0
- package/dist/posting-recipes/index.mjs +1353 -0
- package/package.json +94 -89
package/CHANGELOG.md
CHANGED
|
@@ -1,353 +1,385 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
`
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
`BD-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
###
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
###
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
###
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
- **`
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
- **`
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.7.0 — 2026-07-17
|
|
4
|
+
|
|
5
|
+
### Added — BD posting-recipe pack (`@classytic/ledger-bd/posting-recipes`)
|
|
6
|
+
|
|
7
|
+
- **29 typed posting recipes** migrating be-prod's 18 hand-written posting
|
|
8
|
+
contracts onto `@classytic/ledger/posting-rules` (design:
|
|
9
|
+
ledger `docs/posting-rules-design.md`): purchases family (purchase,
|
|
10
|
+
goods-receipt, vendor-bill + payment + reversal + supplier-return,
|
|
11
|
+
import-clearance), sales + COD lifecycle (sales transaction with
|
|
12
|
+
source-derived journal type, daily POS summary, refund, COD
|
|
13
|
+
placement/settlement/cancellation, restocking fee), inventory + transfer
|
|
14
|
+
(4-type stock adjustment, COGS + reversal, transfer dispatch/receive +
|
|
15
|
+
hand-written reversals — the originals carry distinct labels, so kernel
|
|
16
|
+
`reversalOf` would not be faithful — landed-cost capitalization +
|
|
17
|
+
reversal with regex clearing groups), and misc (gateway settlement,
|
|
18
|
+
customer invoice with VDS receivable + receipt, vendor credit / customer
|
|
19
|
+
debit notes with exported fintech validators, go-live opening balances).
|
|
20
|
+
- **`BdPostingResolvers`** — the injected jurisdiction ports (rate/regime
|
|
21
|
+
input-VAT account, VDS withholding, customs import stack with its
|
|
22
|
+
documented balance invariant). Recipes never import a host.
|
|
23
|
+
- **`BD_REQUIRED_POSTING_SLOTS`** — every chart alias any recipe touches,
|
|
24
|
+
for fail-loud registry validation at boot.
|
|
25
|
+
- **Golden-draft suite** (27 tests) — every expectation hand-transcribed
|
|
26
|
+
from the ORIGINAL contract source with file:line citations (never derived
|
|
27
|
+
from running the recipes), pinning real BD GL codes: the migration gate.
|
|
28
|
+
- Fidelity notes preserved in-code: vendor-bill reversal credits INVENTORY
|
|
29
|
+
(not GR/IR); COD cancellation keys on orderId (placement keys on
|
|
30
|
+
transactionId); claimable-VAT computed in amounts so foreign-currency
|
|
31
|
+
proportional splits stay byte-identical.
|
|
32
|
+
- Peer floor: `@classytic/ledger >= 0.17.0` (posting-rules kernel).
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
36
|
+
adhering to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
37
|
+
|
|
38
|
+
## [0.6.0] — 2026-07-11
|
|
39
|
+
|
|
40
|
+
### Added — PPE / fixed-asset codes for the assets module
|
|
41
|
+
|
|
42
|
+
Named constants in `BD_ACCOUNT_CODES` (`src/accounts/codes.ts`) for the
|
|
43
|
+
PPE ledger accounts used by `@classytic/assets`:
|
|
44
|
+
|
|
45
|
+
- **Asset categories** (with NBR straight-line depreciation rates from
|
|
46
|
+
SRO No.120-Law/Income Tax/2025): `PPE_BUILDING` 1315 (10%),
|
|
47
|
+
`PPE_FACTORY_BUILDING` 1314 (20%), `PPE_MACHINERY` 1322 (20%),
|
|
48
|
+
`PPE_FURNITURE` 1335 (10%), `PPE_VEHICLE` 1337 (20%),
|
|
49
|
+
`PPE_OFFICE_EQUIPMENT` 1333 (20%), `PPE_COMPUTER` 1334 (30%),
|
|
50
|
+
`PPE_MEDICAL_EQUIPMENT` 1347 (20%).
|
|
51
|
+
- **`ACCUMULATED_DEPRECIATION_PPE`** 1359 — contra-asset for all PPE
|
|
52
|
+
categories.
|
|
53
|
+
- **Depreciation expense codes** `DEPRECIATION_BUILDING` 6601 through
|
|
54
|
+
`DEPRECIATION_MEDICAL_EQUIPMENT` 6608 — one per PPE category, so
|
|
55
|
+
the depreciation journal entry can split by asset class.
|
|
56
|
+
- **`LOSS_ON_ASSET_DISPOSAL`** 6810 — disposal below book value.
|
|
57
|
+
|
|
58
|
+
These codes are already part of the BFRS chart of accounts shipped in
|
|
59
|
+
earlier versions; this release adds the named `BD_ACCOUNT_CODES` keys so
|
|
60
|
+
the assets engine can resolve them symbolically without hardcoding strings.
|
|
61
|
+
|
|
62
|
+
## [0.5.0] - 2026-07-06
|
|
63
|
+
|
|
64
|
+
Seven opt-in vertical extensions plus an NBR canonical reporting-code
|
|
65
|
+
layer — the "become a standard for BD accountants" pass. Research-grounded
|
|
66
|
+
(4-5 Jul 2026 web research across NBR/BMDC/DGHS/MRA/NGOAB/Bangladesh Bank
|
|
67
|
+
sources), with confidence flags per account — see each vertical's README.
|
|
68
|
+
|
|
69
|
+
### Added — vertical extensions (`src/verticals/`, subpath `./verticals`)
|
|
70
|
+
|
|
71
|
+
New, opt-in, additive-only (core chart files untouched); apply with
|
|
72
|
+
`applyVerticals(BD_ACCOUNT_TYPES, [...names])`:
|
|
73
|
+
|
|
74
|
+
- **`school`** (10 accounts) — development/session/hostel/transport fee
|
|
75
|
+
revenue, board-exam pass-through liability, two statutory teacher-fund
|
|
76
|
+
payables (Retirement Benefit Board + Welfare Trust — genuinely distinct
|
|
77
|
+
bodies), scholarship-waiver contra-revenue. Deliberately does NOT model
|
|
78
|
+
MPO as a ledger account — since the Jan 2025 EFT rollout the government
|
|
79
|
+
salary portion never touches the institution's own bank account.
|
|
80
|
+
- **`agro`** (12 accounts) — crop/jute/aquaculture WIP and inventory stages,
|
|
81
|
+
cold-storage receivable + sourced ~3.82% spoilage allowance, pledged-
|
|
82
|
+
produce financing under the Secured Transactions (Movable Property) Act
|
|
83
|
+
2023 (NOT "warehouse receipt financing" — no such standalone BB scheme
|
|
84
|
+
could be confirmed), direct-cash agro-subsidy income.
|
|
85
|
+
- **`real-estate`** (4 accounts) — contract asset/unbilled revenue distinct
|
|
86
|
+
from retention receivable, landowner joint-venture unit-share payable,
|
|
87
|
+
contractor mobilization-advance-received, guarantee margin deposit. Flags
|
|
88
|
+
as explicitly open: no actual BD-listed developer's revenue-recognition
|
|
89
|
+
policy could be located.
|
|
90
|
+
- **`ngo-microfinance`** (13 accounts) — loan portfolio by product,
|
|
91
|
+
interest-in-suspense, PKSF per-tranche borrowing/fees (mirrors PKSF's own
|
|
92
|
+
audited "Schedule of Service Charge Receivables"), member savings
|
|
93
|
+
(compulsory/voluntary), NGOAB-mandated project-restricted bank account
|
|
94
|
+
and fund.
|
|
95
|
+
- **`restaurant`** (6 accounts) — service-charge payable/revenue (no BD
|
|
96
|
+
Labour Act mandate for staff distribution could be verified — modeled as
|
|
97
|
+
a policy choice, not compliance), cross-border franchise royalty payable
|
|
98
|
+
(20% WHT), aggregator-commission contra-revenue (confirmed net-settlement
|
|
99
|
+
via actual foodpanda invoice samples), beverage inventory.
|
|
100
|
+
- **`rmg-enhancement`** (5 accounts) — corrects two misconceptions from an
|
|
101
|
+
earlier draft: FDBP is bank bill-discounting/financing, NOT a "~0.6%
|
|
102
|
+
incentive"; UD (Utilization Declaration) is a compliance filing with no
|
|
103
|
+
cash event, NOT a subsidy trigger. Adds the genuine gap — a cash-incentive
|
|
104
|
+
receivable for the real, sourced 180-day+ realization-to-disbursement lag.
|
|
105
|
+
- **`hospital-enhancement`** (3 accounts) — consultant/doctor fee payable
|
|
106
|
+
(legitimate collect-and-remit model) and patient admission deposit.
|
|
107
|
+
Deliberately does NOT ship a "diagnostic referral commission" account —
|
|
108
|
+
real and material (20-50% of test cost, well-documented) but explicitly
|
|
109
|
+
prohibited under BMDC's Code of Professional Conduct §4.3.1; building
|
|
110
|
+
dedicated tooling for it would mean designing software to facilitate a
|
|
111
|
+
documented ethics violation.
|
|
112
|
+
|
|
113
|
+
### Added — NBR canonical schedule (`src/reporting/nbr-schedule/`, subpath `./reporting/nbr-schedule`)
|
|
114
|
+
|
|
115
|
+
A fixed numeric reporting taxonomy — confirmed via research that no such
|
|
116
|
+
crosswalk exists anywhere in Bangladesh's legal lineage (Companies Act 1994
|
|
117
|
+
Schedule XI, like India's Schedule III and the UK's Schedule 4, uses
|
|
118
|
+
positional letter/Roman/Arabic outline labels, never a persistent numeric
|
|
119
|
+
code — the same role Canada's GIFI plays there has no BD equivalent to
|
|
120
|
+
adopt). Built against the closest real analog: NBR's IT-11GHA company tax
|
|
121
|
+
return, whose Part IV carries a fixed, currently-filed, numbered Balance
|
|
122
|
+
Sheet/P&L box schema (47-67) — hence the name.
|
|
123
|
+
|
|
124
|
+
- `resolveScheduleBox(account)` — classifies ANY `AccountType`, core chart
|
|
125
|
+
or vertical extension, onto a box. Covers the entire chart, not just new
|
|
126
|
+
accounts, per explicit design requirement.
|
|
127
|
+
- `buildNbrScheduleReport(trialBalance, accountTypes)` — aggregates a trial
|
|
128
|
+
balance into the schedule.
|
|
129
|
+
- `getUnmappedAccounts(accountTypes)` — coverage audit; the test suite
|
|
130
|
+
asserts zero unmapped accounts (excluding tax expense, which is computed
|
|
131
|
+
after Box 60 and has no box among 47-59) across the core chart AND all
|
|
132
|
+
seven verticals combined.
|
|
133
|
+
- Explicitly flagged as this package's own interpretive judgment, not a
|
|
134
|
+
government-published crosswalk — see `src/reporting/nbr-schedule/README.md`
|
|
135
|
+
for what's gazette/circular-verified vs. inferred.
|
|
136
|
+
|
|
137
|
+
### Fixed — mapping refinements found via a full-chart audit
|
|
138
|
+
|
|
139
|
+
The initial mapping passed all narrow spot-check tests, but dumping the
|
|
140
|
+
resolved box for all 757 accounts and reviewing it end-to-end (not just the
|
|
141
|
+
handful of codes the first test pass happened to touch) surfaced 4 real
|
|
142
|
+
misclassifications, now fixed and covered by dedicated regression tests:
|
|
143
|
+
|
|
144
|
+
- Bonds/Debentures/Sukuk (2322/2323) were falling into the generic 65B
|
|
145
|
+
"long-term borrowings" bucket; the schedule has a dedicated 65A "Bonds/
|
|
146
|
+
Debentures" box that nothing was ever routed to.
|
|
147
|
+
- Current Portion of Long-Term Debt (2200) landed in 66D "other" instead of
|
|
148
|
+
66A "short-term borrowings" — it's literally the current-year slice of
|
|
149
|
+
actual borrowings.
|
|
150
|
+
- L/C Margin Liability (2205) was swept into 66C "provisions" alongside
|
|
151
|
+
warranty/returns/legal-claims accruals, but it's a real bank-held deposit,
|
|
152
|
+
not an estimate.
|
|
153
|
+
- A blanket rule routing every account tagged `parentCode: 'Other Expenses'`
|
|
154
|
+
into box 57 (Financial expenses) incorrectly caught 7 non-financial
|
|
155
|
+
one-off losses (loss on sale of assets, penalties, demurrage, theft,
|
|
156
|
+
natural disaster, crop loss — 6810-6817) that share that parentCode with
|
|
157
|
+
genuine interest/FX-cost accounts in the core chart, but belong in 55
|
|
158
|
+
(Other operating expenses). Replaced with pure numeric-range classification
|
|
159
|
+
for the whole Income Statement-Expense category.
|
|
160
|
+
|
|
161
|
+
### Tests
|
|
162
|
+
|
|
163
|
+
68 passing (43 existing + 25 new: 6 vertical code-collision/composition
|
|
164
|
+
tests, 19 NBR canonical schedule mapping/coverage/report tests, including
|
|
165
|
+
4 regression tests for the audit findings above).
|
|
166
|
+
|
|
167
|
+
## [0.4.0] - 2026-07-02
|
|
168
|
+
|
|
169
|
+
Tax-layer sync with `@classytic/bd-tax` 0.3.0 — the code table, the Mushak
|
|
170
|
+
9.1 template, and the chart now cover the same law the calculator does.
|
|
171
|
+
|
|
172
|
+
### Added — tax codes
|
|
173
|
+
|
|
174
|
+
- **Trading-stage VAT codes**: `BD-VAT-4.5`, `BD-VAT-2.4`, `BD-VAT-2`,
|
|
175
|
+
`BD-VAT-1.5` (no input credit; report on the new template lines 20–23).
|
|
176
|
+
- **`BD-TOT-FIXED`** — the FY2026-27 fixed-amount turnover-tax model
|
|
177
|
+
(rate 0; post the assessed amount). `BD-TOT-4` stays for historical
|
|
178
|
+
postings, renamed "(historical)".
|
|
179
|
+
- **`BD-AT-IMP`** — advance VAT at customs (7.5% commercial / 2%
|
|
180
|
+
manufacturer), `recoverable`, reporting on line 24.
|
|
181
|
+
- **VDS codes** (`BD-VDS-15/10/7.5/5/2`) — percent of service value per
|
|
182
|
+
the VDS Rules 2025 service table, all reporting on line 25.
|
|
183
|
+
- **New TDS codes**: `BD-TDS-PROF-IND` (15%), `BD-TDS-INT-IND` (10%),
|
|
184
|
+
`BD-TDS-DIV-IND` (10%), `BD-TDS-TECH` (10%), `BD-TDS-TRANSPORT` (2%,
|
|
185
|
+
FY2026-27), `BD-TDS-EXP` (1%, s.123).
|
|
186
|
+
|
|
187
|
+
### Fixed — TDS code rates (Income Tax Act 2023)
|
|
188
|
+
|
|
189
|
+
The table still carried ITO-1984-era rates that contradicted bd-tax's
|
|
190
|
+
matrix: `BD-TDS-PROF` 10% → **7.5%** (entities; s.90), `BD-TDS-RENT`
|
|
191
|
+
5% → **10%** (s.109), `BD-TDS-INT` 10% → **20%** (companies; s.102),
|
|
192
|
+
`BD-TDS-DIV` 10% → **20%** (companies; s.117), `BD-TDS-ADV` 4% → **3%**.
|
|
193
|
+
2135 TDS sub-account rates/descriptions updated to match, plus new
|
|
194
|
+
`2135.TDS.TECH` and `2135.TDS.TRANSPORT` accounts.
|
|
195
|
+
|
|
196
|
+
### Added — receivable-side tax accounts (`TAX_RECEIVABLE_ACCOUNTS`)
|
|
197
|
+
|
|
198
|
+
`1151.AIT.IMPORT`, `1151.AIT.OTHER`, `1152.TDS.SUFFERED`,
|
|
199
|
+
`1153.VDS.SUFFERED`, `1153.AT.IMPORT` — the withholding-SUFFERED side.
|
|
200
|
+
Matters from 1 Jul 2026: the Finance Act 2026 withdrew minimum-tax
|
|
201
|
+
treatment, so TDS/AIT suffered is a true adjustable asset, not an expense.
|
|
202
|
+
|
|
203
|
+
### Changed — Mushak 9.1 template
|
|
204
|
+
|
|
205
|
+
Lines **20–23** (trading-stage outputs, summed into line 9), **24** (AT
|
|
206
|
+
credit on imports) and **25** (VDS increasing adjustment) appended; line
|
|
207
|
+
17 now computes `12 + 13 + 16 + 25 − 24`. Existing line numbers are
|
|
208
|
+
untouched and the old math is preserved when the new lines are absent.
|
|
209
|
+
Line 6 re-described for the fixed TOT model.
|
|
210
|
+
|
|
211
|
+
### Gazette verification (3 Jul 2026)
|
|
212
|
+
|
|
213
|
+
`BD-TDS-ADV` corrected 3% → **5%** (ITA 2023 s.92 — media advertising
|
|
214
|
+
bills; media buying agents route via `BD-TDS-COMM`), with the matching
|
|
215
|
+
`2135.TDS.ADV` account update. All other 0.4.0 rates confirmed against
|
|
216
|
+
the verification pass (see `@classytic/bd-tax`
|
|
217
|
+
`research/FY2026-27/06-gazette-verification.md`).
|
|
218
|
+
|
|
219
|
+
### Build
|
|
220
|
+
|
|
221
|
+
- tsdown → **^0.22.3**, aligned with `@classytic/arc`'s pattern:
|
|
222
|
+
`skipNodeModulesBundle: true` + `neverBundle: [/^@classytic\//]`
|
|
223
|
+
(a bundled second `@classytic/ledger` copy would break
|
|
224
|
+
`defineCountryPack` identity), explicit `target: node22`.
|
|
225
|
+
- Peer unchanged and verified: `@classytic/ledger >= 0.12.0` is the sole
|
|
226
|
+
runtime import (`defineCountryPack`); everything else is type-only.
|
|
227
|
+
|
|
228
|
+
### Peers / dev stack (pre-publish refresh)
|
|
229
|
+
|
|
230
|
+
- Peer: `@classytic/ledger >= 0.15.0` (was >= 0.12.0) — validated against
|
|
231
|
+
the PUBLISHED 0.15.0 (43/43 on a clean registry install). Dev stack
|
|
232
|
+
refreshed to published lines: ledger ^0.15.0, repo-core ^0.7.0,
|
|
233
|
+
primitives ^0.9.1, mongokit ^3.17.0 (resolves 3.18).
|
|
234
|
+
|
|
235
|
+
### Tests
|
|
236
|
+
|
|
237
|
+
43 passing (15 existing + 28 new code/template/account pins).
|
|
238
|
+
|
|
239
|
+
## [0.3.2] - 2026-07-02
|
|
240
|
+
|
|
241
|
+
### Added
|
|
242
|
+
|
|
243
|
+
Four VAT-collected tax sub-accounts under 2132 matching `@classytic/bd-tax`
|
|
244
|
+
0.2.0's new Third-Schedule trading-stage rate codes:
|
|
245
|
+
|
|
246
|
+
- `2132.VAT4.5.COLLECTED` — real estate >1,600 sqft
|
|
247
|
+
- `2132.VAT2.4.COLLECTED` — medicine trading stage (pharmacies)
|
|
248
|
+
- `2132.VAT2.COLLECTED` — petroleum trading / real estate ≤1,600 sqft
|
|
249
|
+
- `2132.VAT1.5.COLLECTED` — wholesale trading stage
|
|
250
|
+
|
|
251
|
+
`2132.TOT4.COLLECTED` description updated for the FY2026-27 fixed-amount
|
|
252
|
+
turnover-tax model (post assessed fixed amounts to the same head).
|
|
253
|
+
|
|
254
|
+
## [0.2.3]
|
|
255
|
+
|
|
256
|
+
### Added
|
|
257
|
+
|
|
258
|
+
**Expanded `BD_ACCOUNT_CODES`** to expose 25 more codes that were
|
|
259
|
+
already seeded in `BD_ACCOUNT_TYPES` (since 0.1.0–0.2.2) but missing
|
|
260
|
+
from the typed map. Hosts that previously hand-coded these as string
|
|
261
|
+
literals in posting contracts can now reference them through the
|
|
262
|
+
canonical export. The chart itself is unchanged — only the typed
|
|
263
|
+
exports grew.
|
|
264
|
+
|
|
265
|
+
#### Cash & Receivables
|
|
266
|
+
- **`BANK_CHARGES: '6328'`** — gateway processing fees, mobile-money
|
|
267
|
+
merchant deductions, ad-hoc bank charges.
|
|
268
|
+
- **`CHARGEBACK_RECEIVABLE: '1159'`** — card-network dispute holding.
|
|
269
|
+
|
|
270
|
+
#### Liabilities
|
|
271
|
+
- **`COMMISSION_PAYABLE: '2122'`** — accrued sales/agent commission.
|
|
272
|
+
- **`REVERSE_LOGISTICS_PAYABLE: '2162'`** — return-handling accrual.
|
|
273
|
+
- **`CUSTOMER_ADVANCE: '2191'`** — IFRS 15 contract liability.
|
|
274
|
+
|
|
275
|
+
#### Revenue / Other Income
|
|
276
|
+
- **`TRANSPORT_REVENUE: '4147'`** — line-item delivery charge billed to customer.
|
|
277
|
+
- **`COURIER_REVENUE: '4159'`** — in-house courier service revenue.
|
|
278
|
+
- **`BAD_DEBT_RECOVERY: '4310'`** — recovery of previously written-off debt.
|
|
279
|
+
|
|
280
|
+
#### COGS / Landed Cost
|
|
281
|
+
- **`IMPORT_LANDED_COST: '5116'`** — capitalized duty + freight + insurance.
|
|
282
|
+
- **`CARRIAGE_INWARD: '5117'`** — domestic inbound freight (capitalized).
|
|
283
|
+
- **`PACKAGING_PRODUCTION: '5317'`** — production-time primary packaging.
|
|
284
|
+
- **`CUSTOMS_DUTY: '5505'`** — NBR import duty (when not capitalized).
|
|
285
|
+
- **`CF_AGENT_COMMISSION: '5507'`** — clearing/forwarding agent fee.
|
|
286
|
+
|
|
287
|
+
#### Operating Expenses
|
|
288
|
+
- **`POSTAGE_ADMIN: '6302'`** — admin postage (NOT customer delivery).
|
|
289
|
+
- **`SALES_COMMISSION: '6403'`** — internal commercial team commission.
|
|
290
|
+
- **`FREIGHT_OUTWARD: '6405'`** — outbound delivery cost (domestic).
|
|
291
|
+
- **`SHIPPING_LOGISTICS_EXPORT: '6406'`** — DHL / FedEx weight-priced export.
|
|
292
|
+
- **`PACKAGING_DISPATCH: '6407'`** — outbound packaging consumables.
|
|
293
|
+
- **`MARKETPLACE_COMMISSION: '6422'`** — Daraz / Chaldal / Pickaboo cut.
|
|
294
|
+
- **`COURIER_COD_COMMISSION: '6423'`** — Pathao / RedX / Steadfast COD cut.
|
|
295
|
+
- **`LOGISTICS_HUB_RENT: '6426'`** — sortation-hub / depot rent.
|
|
296
|
+
- **`COURIER_DRIVER_BONUS: '6428'`** — variable courier performance pay.
|
|
297
|
+
- **`BAD_DEBT_WRITTEN_OFF: '6702'`** — unrecoverable A/R / shortfall.
|
|
298
|
+
- **`MARKETPLACE_ADS: '6823'`** — platform-specific ad-engine fees.
|
|
299
|
+
- **`MARKETPLACE_COMPLIANCE_FEE: '6824'`** — recurring seller-platform fees.
|
|
300
|
+
|
|
301
|
+
Together these cover the typical 3PL / DHL-style export / marketplace-
|
|
302
|
+
aggregator accounting flows. The full chart still has ~120 more accounts
|
|
303
|
+
(industry-specific: RMG, pharma, agro-processing, telecom, etc.) — reach
|
|
304
|
+
for those via `BD_ACCOUNT_TYPES` directly when an industry-specific
|
|
305
|
+
posting needs them; bring them into `BD_ACCOUNT_CODES` when a host-
|
|
306
|
+
agnostic posting contract starts referencing them.
|
|
307
|
+
|
|
308
|
+
## [0.2.2]
|
|
309
|
+
|
|
310
|
+
### Added
|
|
311
|
+
|
|
312
|
+
**`BD_ACCOUNT_CODES` map** — canonical export of domain-meaningful keys
|
|
313
|
+
to 4-digit chart codes (e.g. `BD_ACCOUNT_CODES.AR === '1141'`). Hosts
|
|
314
|
+
build their posting contracts against this map instead of hand-coding
|
|
315
|
+
chart-code literals. The map covers the codes most posting layers
|
|
316
|
+
reference (cash/AR/AP/inventory/COGS/revenue/tax/clearings) and is
|
|
317
|
+
typed with `BDAccountCode` and `BDAccountKey` helpers.
|
|
318
|
+
|
|
319
|
+
Hosts that need different default mappings (e.g. a manufacturer
|
|
320
|
+
defaulting `MERCHANDISE → FINISHED_GOODS`) layer their own thin alias
|
|
321
|
+
module on top — the chart is the same; the host's "default inventory
|
|
322
|
+
account" is policy. See `BDAccountCode` for the typed key list.
|
|
323
|
+
|
|
324
|
+
**Two clearing-account codes** in the liability section (2125 / 2126),
|
|
325
|
+
matching SAP / Oracle / ERPNext placement (clearings have credit-natural
|
|
326
|
+
balances, so they belong in 2xxx, not 1xxx):
|
|
327
|
+
|
|
328
|
+
- **`2125` — Goods Received / Invoice Received (GR/IR)** — accrued
|
|
329
|
+
liability for physical goods receipt pending vendor invoice. Decouples
|
|
330
|
+
physical receipt from financial posting:
|
|
331
|
+
- Receipt: `Dr Inventory / Cr 2125`
|
|
332
|
+
- Vendor bill: `Dr 2125 / Cr AP`
|
|
333
|
+
- Period-end balance = receipts pending invoice (accrual reportable
|
|
334
|
+
on the balance sheet). Cleared on 3-way match (PO ↔ receipt ↔
|
|
335
|
+
invoice).
|
|
336
|
+
|
|
337
|
+
- **`2126` — Transfer Cost Clearing (Inter-Branch)** — accrued liability
|
|
338
|
+
for inter-branch transit costs capitalized into receiver inventory per
|
|
339
|
+
IAS 2:
|
|
340
|
+
- Receive leg: `Dr 1164 (goods + transit) / Cr 1179 (goods) / Cr 2126 (transit)`
|
|
341
|
+
- Host clears against actual freight invoice: `Dr 2126 / Cr AP`
|
|
342
|
+
|
|
343
|
+
Both codes slot into the previously-empty 2125–2126 gap in the chart
|
|
344
|
+
(between 2124 Freight & Shipping Payable and 2131 Income Tax Payable),
|
|
345
|
+
so no existing seeded codes shift.
|
|
346
|
+
|
|
347
|
+
### Migration
|
|
348
|
+
|
|
349
|
+
Pure additive change. Run `seedAccounts()` once after upgrade to pick up
|
|
350
|
+
the two new codes — `accountRepository.seedAccounts()` is idempotent and
|
|
351
|
+
will not modify pre-existing accounts.
|
|
352
|
+
|
|
353
|
+
## [0.2.1]
|
|
354
|
+
|
|
355
|
+
### Added
|
|
356
|
+
|
|
357
|
+
- Chart of accounts: new expense code **`6423 — Courier COD Commission`**
|
|
358
|
+
under `SELLING_DISTRIBUTION`. Captures commission deductions from
|
|
359
|
+
cash-on-delivery collections by BD courier partners (Pathao, RedX,
|
|
360
|
+
Steadfast, Sundarban).
|
|
361
|
+
|
|
362
|
+
### Fixed
|
|
363
|
+
|
|
364
|
+
- Packaging hygiene — added `README.md` and `CHANGELOG.md` to the `files`
|
|
365
|
+
array, added `repository` / `bugs` / `homepage` / `publishConfig.access`
|
|
366
|
+
to `package.json`, expanded `.gitignore` to cover `.env`, `.env.*`,
|
|
367
|
+
`/.claude`, `.mcp.json`, and the other standard safety patterns.
|
|
368
|
+
|
|
369
|
+
## [0.2.0]
|
|
370
|
+
|
|
371
|
+
Initial public release. Bangladesh country pack for `@classytic/ledger`.
|
|
372
|
+
|
|
373
|
+
### Ships
|
|
374
|
+
|
|
375
|
+
- **BFRS chart of accounts** — full post-0.8 tree (assets 1xxx, liabilities
|
|
376
|
+
2xxx, equity 3xxx, revenue 4xxx, cost-of-sales 5xxx, expenses 6xxx).
|
|
377
|
+
- **NBR VAT / TDS tax codes** — standard 15% VAT + supplementary-duty
|
|
378
|
+
brackets + withholding rates per §52/§53 tables.
|
|
379
|
+
- **Mushak 9.1 monthly return** scaffolding.
|
|
380
|
+
- **Default journal templates** — sales, purchase, VDS, TDS, cash, bank.
|
|
381
|
+
|
|
382
|
+
### Peer
|
|
383
|
+
|
|
384
|
+
- `@classytic/ledger >= 0.7.0` — ledger 0.7 introduced the
|
|
385
|
+
`journalTemplates` contract this pack relies on.
|