fixes for gl entries in purchase invoice
diff --git a/accounts/doctype/purchase_invoice/purchase_invoice.py b/accounts/doctype/purchase_invoice/purchase_invoice.py
index 0db7ea8..4d582e3 100644
--- a/accounts/doctype/purchase_invoice/purchase_invoice.py
+++ b/accounts/doctype/purchase_invoice/purchase_invoice.py
@@ -435,7 +435,7 @@
# tax table gl entries
for tax in getlist(self.doclist, "other_charges"):
- if tax.category in ("Total", "Valuation and Total"):
+ if tax.category in ("Total", "Valuation and Total") and flt(tax.tax_amount):
valuation_tax += flt(tax.tax_amount)
gl_entries.append(