Skip to content

Commit

Permalink
FIX: Deduct WHT not work with JE
Browse files Browse the repository at this point in the history
  • Loading branch information
kittiu committed Jan 18, 2024
1 parent b4b488e commit 0c9d901
Show file tree
Hide file tree
Showing 2 changed files with 225 additions and 221 deletions.
6 changes: 5 additions & 1 deletion thai_tax/custom/custom_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,11 @@ def get_withholding_tax(filters, doc):
wht = frappe.get_doc("Withholding Tax Type", filters["wht_type"])
company = frappe.get_doc("Company", pay["company"])
for ref in pay.get("references"):
if ref.get("reference_doctype") not in ["Purchase Invoice", "Expense Claim"]:
if ref.get("reference_doctype") not in [
"Purchase Invoice",
"Expense Claim",
"Journal Entry"
]:
return
if not ref.get("allocated_amount") or not ref.get("total_amount"):
continue
Expand Down
Loading

0 comments on commit 0c9d901

Please sign in to comment.