diff --git a/thai_tax/custom/custom_api.py b/thai_tax/custom/custom_api.py index 83375fb..619327f 100644 --- a/thai_tax/custom/custom_api.py +++ b/thai_tax/custom/custom_api.py @@ -303,6 +303,7 @@ def clear_invoice_undue_tax(doc, method): ) doc.tax_base_amount = base_total doc.calculate_taxes() + doc.save() def get_undue_tax(doc, ref, gl, tax): diff --git a/thai_tax/hooks.py b/thai_tax/hooks.py index ec589a4..9e90a6a 100644 --- a/thai_tax/hooks.py +++ b/thai_tax/hooks.py @@ -210,7 +210,6 @@ }, "Payment Entry": { "validate": "thai_tax.custom.custom_api.validate_company_address", - "after_insert": "thai_tax.custom.custom_api.clear_invoice_undue_tax", "on_update": "thai_tax.custom.custom_api.clear_invoice_undue_tax", }, "Purchase Invoice": {