feat: Thai Tax Withholding Category fixtures with per-company accounts

Add 22 Tax Withholding Category fixtures covering Thailand domestic
withholding (Taw.Paw. 4/2528, Sec. 50(2), Sec. 70) with rates and
thresholds. Fixtures ship without accounts; on import each Thai company
gets "Withholding Tax Payable" (Liability) and "Withholding Tax
Receivable" (Asset) created and the payable account linked. Company
on_update does the same for companies created later. Site-configured
accounts survive fixture re-import on migrate.
This commit is contained in:
2026-09-11 09:13:45 +00:00
parent 8d3b843da8
commit 8b3cf9af1e
3 changed files with 686 additions and 1 deletions
+8 -1
View File
@@ -92,6 +92,7 @@ fixtures = [
"doctype": "Property Setter",
"filters": [["name", "in", ["Sales Invoice-main-default_print_format"]]],
},
{"doctype": "Tax Withholding Category", "filters": [["name", "like", "WHT %"]]},
]
# Installation
@@ -156,7 +157,13 @@ doc_events = {
"Letter Head": {
"before_import": "default_thai_company.utils.stash_letter_head_source",
"before_insert": "default_thai_company.utils.restore_letter_head_source",
}
},
"Tax Withholding Category": {
"before_import": "default_thai_company.tax_withholding.prepare_fixture_accounts",
},
"Company": {
"on_update": "default_thai_company.tax_withholding.setup_company",
},
}
# Scheduled Tasks