@mudraforge/statutory 2.10.0 → 2.11.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 +60 -0
- package/CONTRIBUTING.md +1 -0
- package/README.md +41 -38
- package/SECURITY.md +2 -2
- package/bin/cli.js +0 -2
- package/docs/ARCHITECTURE.md +8 -8
- package/docs/ARCHITECTURE_DECISIONS.md +3 -3
- package/docs/CATALOG.md +489 -89
- package/docs/CORPUS_QUALITY.md +17 -9
- package/docs/DATA_LICENSING.md +1 -1
- package/docs/DOMAIN_BREADTH_AND_DEPTH_COMPARISON.md +35 -33
- package/docs/OKF_MAINTENANCE_SOP.md +12 -12
- package/docs/PROVENANCE.md +2 -2
- package/docs/VERIFICATION.md +6 -6
- package/okf/corporate_ma_restructuring/tax_clearance_sec281/circulars/cbdt_circular_04_2011_sec281_clearance.md +57 -0
- package/okf/corporate_ma_restructuring/tax_clearance_sec281/forms/form_281_tax_clearance_application.json +42 -0
- package/okf/corporate_ma_restructuring/tax_clearance_sec281/section.json +70 -0
- package/okf/direct_tax/statutory_disallowance_43b/circulars/supreme_court_checkmate_services_2022.md +64 -0
- package/okf/direct_tax/statutory_disallowance_43b/forms/tax_audit_form_3cd_clause_26_schedule.json +71 -0
- package/okf/direct_tax/statutory_disallowance_43b/section.json +77 -0
- package/okf/direct_tax/tds_ecommerce_194o/circulars/cbdt_circular_20_2020_guidelines_194o.md +36 -0
- package/okf/direct_tax/tds_ecommerce_194o/forms/form_26q_ecommerce_schedule.json +75 -0
- package/okf/direct_tax/tds_ecommerce_194o/section.json +65 -0
- package/okf/direct_tax/tds_individual_contract_194m/circulars/finance_act_2024_194m_rate_cut_memo.md +24 -0
- package/okf/direct_tax/tds_individual_contract_194m/forms/form_26qd_contractor_statement.json +64 -0
- package/okf/direct_tax/tds_individual_contract_194m/section.json +58 -0
- package/okf/direct_tax/tds_interest_194a/circulars/cbdt_circular_03_2010_interest_tds.md +28 -0
- package/okf/direct_tax/tds_interest_194a/forms/form_15g_15h_interest_declaration.json +55 -0
- package/okf/direct_tax/tds_interest_194a/forms/form_26q_interest_schedule.json +72 -0
- package/okf/direct_tax/tds_interest_194a/section.json +64 -0
- package/okf/direct_tax/tds_perquisites_194r/forms/form_26q_perquisites_schedule.json +83 -0
- package/okf/direct_tax/tds_perquisites_194r/section.json +1 -1
- package/okf/direct_tax/tds_property_194ia/circulars/cbdt_notification_67_2022_property_tds.md +57 -0
- package/okf/direct_tax/tds_property_194ia/forms/form_26qb_property_tds_challan.json +43 -0
- package/okf/direct_tax/tds_property_194ia/section.json +73 -0
- package/okf/direct_tax/tds_rent_individual_194ib/circulars/finance_act_2024_rent_rate_cut_memo.md +24 -0
- package/okf/direct_tax/tds_rent_individual_194ib/forms/form_26qc_challan_cum_statement.json +74 -0
- package/okf/direct_tax/tds_rent_individual_194ib/section.json +57 -0
- package/okf/indirect_tax_gst/itc_reversal_rule37_37a/circulars/cbic_notification_19_2022_rule37.md +31 -0
- package/okf/indirect_tax_gst/itc_reversal_rule37_37a/forms/gstr_3b_table_4b_reversal.json +81 -0
- package/okf/indirect_tax_gst/itc_reversal_rule37_37a/section.json +64 -0
- package/okf/manifest.json +48 -6
- package/package.json +1 -1
- package/src/calculators.js +5374 -49
- package/src/constants.js +1 -1
- package/src/index.js +198 -1
- package/types/index.d.ts +40 -0
package/src/constants.js
CHANGED
package/src/index.js
CHANGED
|
@@ -21,7 +21,36 @@ import {
|
|
|
21
21
|
evaluatePlaceOfSupplyAndLut,
|
|
22
22
|
calculateTransferPricingAlp,
|
|
23
23
|
evaluateSection79LossContinuity,
|
|
24
|
-
|
|
24
|
+
evaluateSection281TaxClearance,
|
|
25
|
+
revalueForeignExchangeIndAs109,
|
|
26
|
+
evaluateSection194Q,
|
|
27
|
+
evaluateSection194C,
|
|
28
|
+
evaluateSection194H,
|
|
29
|
+
evaluateSection194I,
|
|
30
|
+
evaluateSection194J,
|
|
31
|
+
evaluateSection194A,
|
|
32
|
+
evaluateSection194O,
|
|
33
|
+
evaluateSection194IA,
|
|
34
|
+
evaluateSection194IB,
|
|
35
|
+
evaluateSection194M,
|
|
36
|
+
evaluateSection194R,
|
|
37
|
+
evaluateSection43BStatutoryPayables,
|
|
38
|
+
calculateItcReversalRule37,
|
|
39
|
+
calculateRule37ASupplierNonFilingReversal,
|
|
40
|
+
evaluateSection206C1H,
|
|
41
|
+
evaluateSection43bH,
|
|
42
|
+
calculateMsmeCompoundInterest,
|
|
43
|
+
calculateAdvanceTaxAndInterest,
|
|
44
|
+
calculateGstItcApportionmentRule42_43,
|
|
45
|
+
evaluateCrossBorderRemittance,
|
|
46
|
+
generateMsme1AndScheduleThreeAging,
|
|
47
|
+
evaluateLowerDeductionCertificateValidity,
|
|
48
|
+
getRbiBankRateForDate,
|
|
49
|
+
DEFAULT_RBI_BANK_RATE,
|
|
50
|
+
MSMED_RATE_MULTIPLIER,
|
|
51
|
+
RBI_BANK_RATE_SCHEDULE,
|
|
52
|
+
AUTHORITATIVE_STATUTORY_RATES,
|
|
53
|
+
VALID_194J_CATEGORIES
|
|
25
54
|
} from './calculators.js';
|
|
26
55
|
import {
|
|
27
56
|
getStatutoryOutcomes,
|
|
@@ -45,11 +74,24 @@ try {
|
|
|
45
74
|
export const DEFAULT_LOCAL_OKF_DIR = defaultOkfDir;
|
|
46
75
|
export { STATUTORY_CLIENT_VERSION, DEFAULT_BASE_URL };
|
|
47
76
|
|
|
77
|
+
/**
|
|
78
|
+
* Current verified Merkle root digest for the active OKF v0.2 corpus.
|
|
79
|
+
*/
|
|
80
|
+
export const CURRENT_RELEASE_MERKLE_ROOT = 'sha256-bf547512a57f26eae9a5ebcb9f0ec41c397421366b1b4223ab9e17d282721ca7';
|
|
81
|
+
export const MERKLE_ROOT_OKF_V2 = CURRENT_RELEASE_MERKLE_ROOT;
|
|
82
|
+
|
|
48
83
|
/**
|
|
49
84
|
* Pinned official release Merkle root digests.
|
|
50
85
|
* Prevents unauthorized bundle substitution attacks even if an attacker controls the remote endpoint.
|
|
51
86
|
*/
|
|
52
87
|
export const PINNED_RELEASE_ROOTS = new Set([
|
|
88
|
+
'sha256-feb1555f10c9f5c70de18ef340e0ba6cf1f060fb19cae866aa36240345c46f3a', // feat/rent-194ib-contract-194m (37 Sections across 5 Domains)
|
|
89
|
+
'sha256-02090e4063a863e3486401215469350c911dc0c9a24855e1d9db2903946aa644', // feat/perquisites-194r (35 Sections across 5 Domains)
|
|
90
|
+
'sha256-bd351719a8235c44f2bac87cc347423baa8ac3ecb74c0ee63d1fffa9f33dbebe', // feat/property-194ia (35 Sections across 5 Domains)
|
|
91
|
+
'sha256-fc208ff012bfc3044cfc6edc5fcbf1c0e445e387a8c7d806e271968b511919ce', // feat/mna-sec281 (34 Sections across 5 Domains)
|
|
92
|
+
'sha256-7f2bd99d81a261743773230d2ab3e21717ac9ca02a55c867545f5777b1a7d69f', // feat/statutory-43b-payroll (33 Sections across 5 Domains)
|
|
93
|
+
'sha256-bf547512a57f26eae9a5ebcb9f0ec41c397421366b1b4223ab9e17d282721ca7', // feat/ecommerce-194o (32 Sections across 5 Domains)
|
|
94
|
+
'sha256-b12fab61f0ddcc8852a7db1b4831151163d1d0ff97112168d8dccf693cfe70a7', // v2.11.0 Complete Accounts Payable (31 Sections across 5 Domains)
|
|
53
95
|
'sha256-4bbe36c3db841b833dd2bebbd6c1c5ed735498e7b20d1221c323ceb211529fe0', // v2.9.0 Corporate Finance 5 Domains Merkle Root (29 Sections across 5 Domains)
|
|
54
96
|
'sha256-3fb34bdcd34eec794b1f8e6abb2c0e0e87664746ec2f50ad2599c34bf57565b3', // v2.8.1 Finance Act, 2025 Section 206AB Sunset Root (24 Sections across 5 Domains)
|
|
55
97
|
'sha256-239641de2bef05917673f693f9ba4d14bd5e137d64554fba5db87e426bc13e14', // v2.8.0 Deep Semantic Citation Merkle Root (24 Sections across 5 Domains)
|
|
@@ -1805,6 +1847,132 @@ export class StatutoryClient {
|
|
|
1805
1847
|
return revalueForeignExchangeIndAs109(payload);
|
|
1806
1848
|
}
|
|
1807
1849
|
|
|
1850
|
+
/**
|
|
1851
|
+
* Section 194Q: Deduction of tax at source on purchase of goods exceeding ₹50 Lakh.
|
|
1852
|
+
*/
|
|
1853
|
+
evaluateSection194Q(payload) {
|
|
1854
|
+
return evaluateSection194Q(payload);
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1857
|
+
/**
|
|
1858
|
+
* Section 194C: Withholding on contractor and sub-contractor payments.
|
|
1859
|
+
*/
|
|
1860
|
+
evaluateSection194C(payload) {
|
|
1861
|
+
return evaluateSection194C(payload);
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
/**
|
|
1865
|
+
* Section 194H: Withholding on commission and brokerage payments.
|
|
1866
|
+
*/
|
|
1867
|
+
evaluateSection194H(payload) {
|
|
1868
|
+
return evaluateSection194H(payload);
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1871
|
+
/**
|
|
1872
|
+
* Section 194I: Withholding on rent (land/building vs plant/machinery).
|
|
1873
|
+
*/
|
|
1874
|
+
evaluateSection194I(payload) {
|
|
1875
|
+
return evaluateSection194I(payload);
|
|
1876
|
+
}
|
|
1877
|
+
|
|
1878
|
+
/**
|
|
1879
|
+
* Section 194J: Withholding on professional and technical services (FTS).
|
|
1880
|
+
*/
|
|
1881
|
+
evaluateSection194J(payload) {
|
|
1882
|
+
return evaluateSection194J(payload);
|
|
1883
|
+
}
|
|
1884
|
+
|
|
1885
|
+
/**
|
|
1886
|
+
* Section 194A: Withholding on interest other than interest on securities.
|
|
1887
|
+
*/
|
|
1888
|
+
evaluateSection194A(payload) {
|
|
1889
|
+
return evaluateSection194A(payload);
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
/**
|
|
1893
|
+
* Section 194O: E-commerce operator marketplace withholding & 194Q/206C(1H) override.
|
|
1894
|
+
*/
|
|
1895
|
+
evaluateSection194O(payload) {
|
|
1896
|
+
return evaluateSection194O(payload);
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1899
|
+
/**
|
|
1900
|
+
* Section 194-IA: Immovable property transfer TDS (higher of consideration or SDV) & Form 26QB.
|
|
1901
|
+
*/
|
|
1902
|
+
evaluateSection194IA(payload) {
|
|
1903
|
+
return evaluateSection194IA(payload);
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1906
|
+
/**
|
|
1907
|
+
* Section 194-IB: Individual/HUF rent TDS, 2% rate cut, Form 26QC, and Section 194-IB(4) last-month rent ceiling.
|
|
1908
|
+
*/
|
|
1909
|
+
evaluateSection194IB(payload) {
|
|
1910
|
+
return evaluateSection194IB(payload);
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1913
|
+
/**
|
|
1914
|
+
* Section 194M: Individual/HUF contract/commission/professional TDS, 2% rate cut, Form 26QD, and 50L threshold.
|
|
1915
|
+
*/
|
|
1916
|
+
evaluateSection194M(payload) {
|
|
1917
|
+
return evaluateSection194M(payload);
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1920
|
+
/**
|
|
1921
|
+
* Section 194R: Benefit or perquisite in business or profession TDS, in-kind advance tax, and de minimis threshold.
|
|
1922
|
+
*/
|
|
1923
|
+
evaluateSection194R(payload) {
|
|
1924
|
+
return evaluateSection194R(payload);
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1927
|
+
/**
|
|
1928
|
+
* Section 43B / Section 36(1)(va): Statutory payables disallowance & Supreme Court Checkmate Doctrine.
|
|
1929
|
+
*/
|
|
1930
|
+
evaluateSection43B(payload) {
|
|
1931
|
+
return evaluateSection43BStatutoryPayables(payload);
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1934
|
+
/**
|
|
1935
|
+
* Section 281: M&A asset transfer tax clearance & voidability evaluation under CBDT Circular 04/2011.
|
|
1936
|
+
*/
|
|
1937
|
+
evaluateSection281(payload) {
|
|
1938
|
+
return evaluateSection281TaxClearance(payload);
|
|
1939
|
+
}
|
|
1940
|
+
|
|
1941
|
+
/**
|
|
1942
|
+
* Rule 37: 180-day vendor non-payment ITC reversal & Section 50(1) 18% interest.
|
|
1943
|
+
*/
|
|
1944
|
+
calculateItcReversalRule37(payload) {
|
|
1945
|
+
return calculateItcReversalRule37(payload);
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
/**
|
|
1949
|
+
* Rule 37A: Reversal of ITC where supplier failed to furnish Form GSTR-3B by November 30.
|
|
1950
|
+
*/
|
|
1951
|
+
calculateRule37ASupplierNonFilingReversal(payload) {
|
|
1952
|
+
return calculateRule37ASupplierNonFilingReversal(payload);
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
|
+
/**
|
|
1956
|
+
* MSMED Act Section 16: Compound interest with monthly rests at 3x RBI Bank Rate.
|
|
1957
|
+
*/
|
|
1958
|
+
calculateMsmeCompoundInterest(payload) {
|
|
1959
|
+
return calculateMsmeCompoundInterest(payload);
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1962
|
+
/**
|
|
1963
|
+
* Section 43B(h): Year-end tax disallowance on overdue MSME invoices.
|
|
1964
|
+
*/
|
|
1965
|
+
evaluateSection43bH(payload) {
|
|
1966
|
+
return evaluateSection43bH(payload);
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1969
|
+
/**
|
|
1970
|
+
* Section 195: Cross-border foreign remittance tax withholding.
|
|
1971
|
+
*/
|
|
1972
|
+
evaluateCrossBorderRemittance(payload) {
|
|
1973
|
+
return evaluateCrossBorderRemittance(payload);
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1808
1976
|
/**
|
|
1809
1977
|
* Retrieve statutory outcomes and disposition codes.
|
|
1810
1978
|
* @param {string} [provision] Optional section code or provision alias
|
|
@@ -2827,7 +2995,36 @@ export {
|
|
|
2827
2995
|
evaluatePlaceOfSupplyAndLut,
|
|
2828
2996
|
calculateTransferPricingAlp,
|
|
2829
2997
|
evaluateSection79LossContinuity,
|
|
2998
|
+
evaluateSection281TaxClearance,
|
|
2830
2999
|
revalueForeignExchangeIndAs109,
|
|
3000
|
+
evaluateSection194Q,
|
|
3001
|
+
evaluateSection194C,
|
|
3002
|
+
evaluateSection194H,
|
|
3003
|
+
evaluateSection194I,
|
|
3004
|
+
evaluateSection194J,
|
|
3005
|
+
evaluateSection194A,
|
|
3006
|
+
evaluateSection194O,
|
|
3007
|
+
evaluateSection194IA,
|
|
3008
|
+
evaluateSection194IB,
|
|
3009
|
+
evaluateSection194M,
|
|
3010
|
+
evaluateSection194R,
|
|
3011
|
+
evaluateSection43BStatutoryPayables,
|
|
3012
|
+
calculateItcReversalRule37,
|
|
3013
|
+
calculateRule37ASupplierNonFilingReversal,
|
|
3014
|
+
evaluateSection206C1H,
|
|
3015
|
+
evaluateSection43bH,
|
|
3016
|
+
calculateMsmeCompoundInterest,
|
|
3017
|
+
calculateAdvanceTaxAndInterest,
|
|
3018
|
+
calculateGstItcApportionmentRule42_43,
|
|
3019
|
+
evaluateCrossBorderRemittance,
|
|
3020
|
+
generateMsme1AndScheduleThreeAging,
|
|
3021
|
+
evaluateLowerDeductionCertificateValidity,
|
|
3022
|
+
getRbiBankRateForDate,
|
|
3023
|
+
DEFAULT_RBI_BANK_RATE,
|
|
3024
|
+
MSMED_RATE_MULTIPLIER,
|
|
3025
|
+
RBI_BANK_RATE_SCHEDULE,
|
|
3026
|
+
AUTHORITATIVE_STATUTORY_RATES,
|
|
3027
|
+
VALID_194J_CATEGORIES,
|
|
2831
3028
|
getStatutoryOutcomes,
|
|
2832
3029
|
explainStatutoryDisposition,
|
|
2833
3030
|
STATUTORY_OUTCOMES_DICTIONARY,
|
package/types/index.d.ts
CHANGED
|
@@ -199,6 +199,16 @@ export declare class StatutoryClient {
|
|
|
199
199
|
calculateTransferPricingAlp(payload?: any): any;
|
|
200
200
|
evaluateSection79LossContinuity(payload?: any): any;
|
|
201
201
|
revalueForeignExchangeIndAs109(payload?: any): any;
|
|
202
|
+
evaluateSection194A(payload?: any): any;
|
|
203
|
+
evaluateSection194O(payload?: any): any;
|
|
204
|
+
evaluateSection194IA(payload?: any): any;
|
|
205
|
+
evaluateSection194IB(payload?: any): any;
|
|
206
|
+
evaluateSection194M(payload?: any): any;
|
|
207
|
+
evaluateSection194R(payload?: any): any;
|
|
208
|
+
evaluateSection43B(payload?: any): any;
|
|
209
|
+
evaluateSection281(payload?: any): any;
|
|
210
|
+
calculateItcReversalRule37(payload?: any): any;
|
|
211
|
+
calculateRule37ASupplierNonFilingReversal(payload?: any): any;
|
|
202
212
|
getOutcomes(provision?: string, options?: StatutoryOutcomesOptions): Promise<StatutoryOutcomesResult>;
|
|
203
213
|
explain(codeOrQuery: string, options?: any): any;
|
|
204
214
|
}
|
|
@@ -323,13 +333,43 @@ export declare const PAN_ENTITY_TYPES: Record<string, { code: string; name: stri
|
|
|
323
333
|
export declare function isValidGstinChecksum(gstin: string): boolean;
|
|
324
334
|
export declare function decodeTaxIdentifier(rawId: string): TaxIdentifierResult;
|
|
325
335
|
|
|
336
|
+
export declare const CURRENT_RELEASE_MERKLE_ROOT: string;
|
|
337
|
+
export declare const MERKLE_ROOT_OKF_V2: string;
|
|
338
|
+
|
|
326
339
|
export declare function roundToPaisa(amount: number | string): number;
|
|
327
340
|
export declare function roundSection288B(amount: number | string): number;
|
|
328
341
|
export declare function calculateCorporateTaxMatVsConcessional(payload?: any): any;
|
|
329
342
|
export declare function evaluatePlaceOfSupplyAndLut(payload?: any): any;
|
|
330
343
|
export declare function calculateTransferPricingAlp(payload?: any): any;
|
|
331
344
|
export declare function evaluateSection79LossContinuity(payload?: any): any;
|
|
345
|
+
export declare function evaluateSection281TaxClearance(payload: any): any;
|
|
332
346
|
export declare function revalueForeignExchangeIndAs109(payload?: any): any;
|
|
347
|
+
export declare function evaluateSection194Q(payload: any): any;
|
|
348
|
+
export declare function evaluateSection194C(payload: any): any;
|
|
349
|
+
export declare function evaluateSection194H(payload: any): any;
|
|
350
|
+
export declare function evaluateSection194I(payload: any): any;
|
|
351
|
+
export declare function evaluateSection194J(payload: any): any;
|
|
352
|
+
export declare function evaluateSection194A(payload: any): any;
|
|
353
|
+
export declare function evaluateSection194O(payload: any): any;
|
|
354
|
+
export declare function evaluateSection194IA(payload: any): any;
|
|
355
|
+
export declare function evaluateSection194IB(payload: any): any;
|
|
356
|
+
export declare function evaluateSection194M(payload: any): any;
|
|
357
|
+
export declare function evaluateSection194R(payload: any): any;
|
|
358
|
+
export declare function evaluateSection43BStatutoryPayables(payload: any): any;
|
|
359
|
+
export declare function calculateItcReversalRule37(payload: any): any;
|
|
360
|
+
export declare function calculateRule37ASupplierNonFilingReversal(payload: any): any;
|
|
361
|
+
export declare function evaluateSection206C1H(payload: any): any;
|
|
362
|
+
export declare function evaluateSection43bH(payload: any): any;
|
|
363
|
+
export declare function calculateMsmeCompoundInterest(payload: any): any;
|
|
364
|
+
export declare function calculateAdvanceTaxAndInterest(payload: any): any;
|
|
365
|
+
export declare function calculateGstItcApportionmentRule42_43(payload: any): any;
|
|
366
|
+
export declare function evaluateCrossBorderRemittance(payload: any): any;
|
|
367
|
+
export declare function getRbiBankRateForDate(dateString?: string): number;
|
|
368
|
+
export declare const DEFAULT_RBI_BANK_RATE: number;
|
|
369
|
+
export declare const MSMED_RATE_MULTIPLIER: number;
|
|
370
|
+
export declare const RBI_BANK_RATE_SCHEDULE: Array<{ effectiveFrom: string; effectiveTo: string | null; rate: number; notificationRef: string }>;
|
|
371
|
+
export declare const AUTHORITATIVE_STATUTORY_RATES: Record<string, any>;
|
|
372
|
+
export declare const VALID_194J_CATEGORIES: string[];
|
|
333
373
|
|
|
334
374
|
export interface StatutoryOutcome {
|
|
335
375
|
code: string;
|