feat: Thai VAT schemes as Sales/Purchase Taxes and Charges Templates
Per Thai company: Thailand VAT 7%, Thailand VAT 7% (Included) for VAT-inclusive pricing, Thailand VAT 0% for zero-rated supplies. Sales schemes post to Output VAT, purchase schemes to Input VAT (category Total, so recoverable VAT stays out of valuation). The 7% scheme is the default when the company has none. Created on Company save, after install, and by a patch for existing companies.
This commit is contained in:
@@ -118,9 +118,14 @@ def prepare_fixture_accounts(doc, method=None):
|
||||
link_company(doc, company, ensure_company_accounts(company))
|
||||
|
||||
|
||||
def company_ready(doc):
|
||||
"""A Thai company whose chart of accounts exists."""
|
||||
return doc.country == "Thailand" and frappe.db.exists("Account", {"company": doc.name})
|
||||
|
||||
|
||||
def setup_company(doc, method=None):
|
||||
"""Company.on_update: create the tax accounts and link every WHT category."""
|
||||
if doc.country != "Thailand" or not frappe.db.exists("Account", {"company": doc.name}):
|
||||
if not company_ready(doc):
|
||||
return
|
||||
|
||||
account = ensure_company_accounts(doc.name)
|
||||
|
||||
Reference in New Issue
Block a user