Skip to content

Commit

Permalink
FIX, error base_amount declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
kittiu committed Jan 31, 2024
1 parent 4f7584b commit 08e04ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thai_tax/custom/custom_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ def get_withholding_tax(filters, doc):
pay = json.loads(doc)
wht = frappe.get_doc("Withholding Tax Type", filters["wht_type"])
company = frappe.get_doc("Company", pay["company"])
base_amount = 0
for ref in pay.get("references"):
if ref.get("reference_doctype") not in [
"Purchase Invoice",
Expand All @@ -489,7 +490,6 @@ def get_withholding_tax(filters, doc):
"credit",
],
)
base_amount = 0
for gl in gl_entries:
credit = gl["credit"]
debit = gl["debit"]
Expand Down

0 comments on commit 08e04ec

Please sign in to comment.