@classytic/ledger-bd 0.1.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/LICENSE +21 -0
- package/README.md +113 -0
- package/dist/index.d.mts +112 -0
- package/dist/index.mjs +6350 -0
- package/package.json +59 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Classytic
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# @classytic/ledger-bd
|
|
2
|
+
|
|
3
|
+
Bangladesh country pack for [@classytic/ledger](../ledger) -- BFRS-aligned chart of accounts, NBR VAT/TDS tax codes, and Mushak 9.1 return template.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @classytic/ledger-bd @classytic/ledger
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { createAccountingEngine } from '@classytic/ledger';
|
|
15
|
+
import { bangladeshPack } from '@classytic/ledger-bd';
|
|
16
|
+
|
|
17
|
+
const accounting = createAccountingEngine({
|
|
18
|
+
country: bangladeshPack,
|
|
19
|
+
currency: 'BDT',
|
|
20
|
+
multiTenant: { orgField: 'business', orgRef: 'Business' },
|
|
21
|
+
fiscalYearStartMonth: 7, // BD government FY: July–June (use 1 for Jan–Dec)
|
|
22
|
+
});
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
> **Fiscal year is not hardcoded** — set `fiscalYearStartMonth` per your business needs.
|
|
26
|
+
> Most BD businesses use `7` (July–June, government FY). Banks may use `1` (January–December).
|
|
27
|
+
|
|
28
|
+
## What's Included
|
|
29
|
+
|
|
30
|
+
### Chart of Accounts (~610 account types)
|
|
31
|
+
|
|
32
|
+
BFRS-aligned account types covering every major Bangladesh industry (garments/RMG, pharma, agriculture, IT, banking, NGO, real estate, and more).
|
|
33
|
+
|
|
34
|
+
| Category | Code range | Count |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| Assets | 1xxx | ~170 |
|
|
37
|
+
| Liabilities | 2xxx | ~90 |
|
|
38
|
+
| Equity | 3xxx | ~32 |
|
|
39
|
+
| Revenue | 4xxx | ~97 |
|
|
40
|
+
| Cost of Sales | 5xxx | ~66 |
|
|
41
|
+
| Operating Expenses | 6xxx | ~154 |
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
import {
|
|
45
|
+
ASSETS, LIABILITIES, EQUITY, REVENUE, COGS, EXPENSES,
|
|
46
|
+
CURRENT_ASSETS, NON_CURRENT_ASSETS,
|
|
47
|
+
CURRENT_LIABILITIES, NON_CURRENT_LIABILITIES,
|
|
48
|
+
SALES_REVENUE, INDUSTRY_REVENUE, BANKING_REVENUE, NGO_REVENUE, OTHER_INCOME,
|
|
49
|
+
DIRECT_MATERIALS, DIRECT_LABOR, MANUFACTURING_OVERHEAD, COST_OF_SERVICES, PURCHASES,
|
|
50
|
+
EMPLOYEE_COSTS, PREMISES_COSTS, ADMIN_EXPENSES, SELLING_DISTRIBUTION,
|
|
51
|
+
FINANCIAL_EXPENSES, DEPRECIATION, PROVISIONS, OTHER_OPERATING, TAX_EXPENSE,
|
|
52
|
+
} from '@classytic/ledger-bd';
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Tax Codes
|
|
56
|
+
|
|
57
|
+
| Code | Name | Rate | Direction |
|
|
58
|
+
|---|---|---|---|
|
|
59
|
+
| BD-VAT-15 | VAT Standard 15% | 15% | collected |
|
|
60
|
+
| BD-VAT-10 | VAT Reduced 10% | 10% | collected |
|
|
61
|
+
| BD-VAT-7.5 | VAT Reduced 7.5% | 7.5% | collected |
|
|
62
|
+
| BD-VAT-5 | VAT Reduced 5% | 5% | collected |
|
|
63
|
+
| BD-TOT-4 | Turnover Tax 4% | 4% | collected |
|
|
64
|
+
| BD-VAT-0 | Zero-rated (Export) | 0% | collected |
|
|
65
|
+
| BD-EXEMPT | VAT Exempt | 0% | collected |
|
|
66
|
+
| BD-VIN-15 | VAT Input Credit 15% | 15% | recoverable |
|
|
67
|
+
| BD-TDS-CONT | TDS on Contractors | 5% | paid |
|
|
68
|
+
| BD-TDS-PROF | TDS on Professional Fees | 10% | paid |
|
|
69
|
+
| BD-TDS-RENT | TDS on Rent | 5% | paid |
|
|
70
|
+
| BD-TDS-INT | TDS on Interest | 10% | paid |
|
|
71
|
+
| BD-TDS-DIV | TDS on Dividends | 10% | paid |
|
|
72
|
+
| BD-TDS-COMM | TDS on Commission | 10% | paid |
|
|
73
|
+
| BD-TDS-ADV | TDS on Advertising | 4% | paid |
|
|
74
|
+
| BD-TDS-IMP | AIT on Imports | 5% | paid |
|
|
75
|
+
| BD-SD | Supplementary Duty | varies | collected |
|
|
76
|
+
|
|
77
|
+
```typescript
|
|
78
|
+
import { TAX_CODES, getTaxCodeDetails } from '@classytic/ledger-bd';
|
|
79
|
+
|
|
80
|
+
const vat15 = getTaxCodeDetails('BD-VAT-15');
|
|
81
|
+
// { code: 'BD-VAT-15', rate: 0.15, direction: 'collected', ... }
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Mushak 9.1 VAT Return
|
|
85
|
+
|
|
86
|
+
The pack includes a complete Mushak 9.1 monthly VAT return template (19 lines) that maps tax codes to the correct report lines.
|
|
87
|
+
|
|
88
|
+
```typescript
|
|
89
|
+
import { mushakReturnTemplate } from '@classytic/ledger-bd';
|
|
90
|
+
|
|
91
|
+
// Generate the return via the accounting engine
|
|
92
|
+
const vatReturn = await accounting.taxReport.generate({
|
|
93
|
+
organizationId,
|
|
94
|
+
dateOption: 'month',
|
|
95
|
+
dateValue: '2026-03',
|
|
96
|
+
});
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Administrative Divisions
|
|
100
|
+
|
|
101
|
+
All 8 Bangladesh divisions with tax-code mappings:
|
|
102
|
+
|
|
103
|
+
```typescript
|
|
104
|
+
import { DIVISIONS, ALL_DIVISIONS } from '@classytic/ledger-bd';
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Documentation
|
|
108
|
+
|
|
109
|
+
See the [@classytic/ledger](https://github.com/classytic/fajr/tree/main/packages/ledger) package for full engine documentation.
|
|
110
|
+
|
|
111
|
+
## License
|
|
112
|
+
|
|
113
|
+
MIT
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import * as _classytic_ledger0 from "@classytic/ledger";
|
|
2
|
+
import { AccountType, TaxCode, TaxCodesByRegion, TaxReportTemplate } from "@classytic/ledger";
|
|
3
|
+
|
|
4
|
+
//#region src/accounts/assets.d.ts
|
|
5
|
+
declare const CURRENT_ASSETS: AccountType[];
|
|
6
|
+
declare const NON_CURRENT_ASSETS: AccountType[];
|
|
7
|
+
declare const ASSETS: AccountType[];
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/accounts/liabilities.d.ts
|
|
10
|
+
declare const CURRENT_LIABILITIES: AccountType[];
|
|
11
|
+
declare const NON_CURRENT_LIABILITIES: AccountType[];
|
|
12
|
+
declare const LIABILITIES: AccountType[];
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/accounts/equity.d.ts
|
|
15
|
+
declare const EQUITY: AccountType[];
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/accounts/revenue.d.ts
|
|
18
|
+
declare const SALES_REVENUE: AccountType[];
|
|
19
|
+
declare const INDUSTRY_REVENUE: AccountType[];
|
|
20
|
+
declare const BANKING_REVENUE: AccountType[];
|
|
21
|
+
declare const NGO_REVENUE: AccountType[];
|
|
22
|
+
declare const OTHER_INCOME: AccountType[];
|
|
23
|
+
declare const REVENUE: AccountType[];
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/accounts/cogs.d.ts
|
|
26
|
+
declare const DIRECT_MATERIALS: AccountType[];
|
|
27
|
+
declare const DIRECT_LABOR: AccountType[];
|
|
28
|
+
declare const MANUFACTURING_OVERHEAD: AccountType[];
|
|
29
|
+
declare const COST_OF_SERVICES: AccountType[];
|
|
30
|
+
declare const PURCHASES: AccountType[];
|
|
31
|
+
declare const COGS: AccountType[];
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/accounts/expenses.d.ts
|
|
34
|
+
declare const EMPLOYEE_COSTS: AccountType[];
|
|
35
|
+
declare const PREMISES_COSTS: AccountType[];
|
|
36
|
+
declare const ADMIN_EXPENSES: AccountType[];
|
|
37
|
+
declare const SELLING_DISTRIBUTION: AccountType[];
|
|
38
|
+
declare const FINANCIAL_EXPENSES: AccountType[];
|
|
39
|
+
declare const DEPRECIATION: AccountType[];
|
|
40
|
+
declare const PROVISIONS: AccountType[];
|
|
41
|
+
declare const OTHER_OPERATING: AccountType[];
|
|
42
|
+
declare const TAX_EXPENSE: AccountType[];
|
|
43
|
+
declare const EXPENSES: AccountType[];
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/accounts/tax.d.ts
|
|
46
|
+
declare const VAT_LIABILITY_ACCOUNTS: AccountType[];
|
|
47
|
+
declare const VAT_ASSET_ACCOUNTS: AccountType[];
|
|
48
|
+
declare const TDS_LIABILITY_ACCOUNTS: AccountType[];
|
|
49
|
+
declare const VDS_LIABILITY_ACCOUNTS: AccountType[];
|
|
50
|
+
declare const ALL_TAX_ACCOUNTS: AccountType[];
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/accounts/index.d.ts
|
|
53
|
+
/** Complete flat array of all BD account types + tax sub-accounts + group labels */
|
|
54
|
+
declare const BD_ACCOUNT_TYPES: readonly AccountType[];
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/tax/codes.d.ts
|
|
57
|
+
declare const ALL_TAX_CODES: Readonly<Record<string, TaxCode>>;
|
|
58
|
+
/** Look up a tax code by its code string. e.g. getTaxCodeDetails('BD-VAT-15') */
|
|
59
|
+
declare function getTaxCodeDetails(code: string): TaxCode | null;
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/tax/mushak-return.d.ts
|
|
62
|
+
declare const mushakReturnTemplate: TaxReportTemplate;
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region src/tax/index.d.ts
|
|
65
|
+
/**
|
|
66
|
+
* Tax codes by division — Bangladesh has a national VAT/TDS system,
|
|
67
|
+
* so all divisions share the same codes. This mapping exists for
|
|
68
|
+
* consistency with the CountryPack interface.
|
|
69
|
+
*/
|
|
70
|
+
declare const TAX_CODES_BY_DIVISION: TaxCodesByRegion;
|
|
71
|
+
declare const BD_DIVISIONS: ("Dhaka" | "Chittagong" | "Rajshahi" | "Khulna" | "Barisal" | "Sylhet" | "Rangpur" | "Mymensingh")[];
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/divisions.d.ts
|
|
74
|
+
/**
|
|
75
|
+
* Bangladesh Administrative Divisions
|
|
76
|
+
*/
|
|
77
|
+
declare const DIVISIONS: Readonly<{
|
|
78
|
+
DHAKA: "Dhaka";
|
|
79
|
+
CHITTAGONG: "Chittagong";
|
|
80
|
+
RAJSHAHI: "Rajshahi";
|
|
81
|
+
KHULNA: "Khulna";
|
|
82
|
+
BARISAL: "Barisal";
|
|
83
|
+
SYLHET: "Sylhet";
|
|
84
|
+
RANGPUR: "Rangpur";
|
|
85
|
+
MYMENSINGH: "Mymensingh";
|
|
86
|
+
}>;
|
|
87
|
+
declare const ALL_DIVISIONS: ("Dhaka" | "Chittagong" | "Rajshahi" | "Khulna" | "Barisal" | "Sylhet" | "Rangpur" | "Mymensingh")[];
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region src/index.d.ts
|
|
90
|
+
/**
|
|
91
|
+
* @classytic/ledger-bd — Bangladesh Country Pack
|
|
92
|
+
*
|
|
93
|
+
* Provides BFRS-aligned chart of accounts (~500+ types), NBR VAT/TDS tax codes,
|
|
94
|
+
* Mushak 9.1 return template, and coverage for every major BD industry.
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```typescript
|
|
98
|
+
* import { createAccountingEngine } from '@classytic/ledger';
|
|
99
|
+
* import { bangladeshPack } from '@classytic/ledger-bd';
|
|
100
|
+
*
|
|
101
|
+
* const accounting = createAccountingEngine({
|
|
102
|
+
* country: bangladeshPack,
|
|
103
|
+
* currency: 'BDT',
|
|
104
|
+
* multiTenant: { orgField: 'business', orgRef: 'Business' },
|
|
105
|
+
* });
|
|
106
|
+
* ```
|
|
107
|
+
*
|
|
108
|
+
* @module @classytic/ledger-bd
|
|
109
|
+
*/
|
|
110
|
+
declare const bangladeshPack: _classytic_ledger0.CountryPack;
|
|
111
|
+
//#endregion
|
|
112
|
+
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 };
|