feat: missmatching amount in GST Sales report and itemised sales report (#19119)

This commit is contained in:
Anurag Mishra
2019-09-20 22:59:26 +05:30
committed by Nabin Hait
parent 5169dc1566
commit b62e17f7f2
2 changed files with 3 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum
filters.update({"from_date": filters.get("date_range") and filters.get("date_range")[0], "to_date": filters.get("date_range") and filters.get("date_range")[1]}) filters.update({"from_date": filters.get("date_range") and filters.get("date_range")[0], "to_date": filters.get("date_range") and filters.get("date_range")[1]})
columns = get_columns(additional_table_columns) columns = get_columns(additional_table_columns)
company_currency = erpnext.get_company_currency(filters.get('company')) company_currency = frappe.get_cached_value('Company', filters.get("company"), "default_currency")
item_list = get_items(filters, additional_query_columns) item_list = get_items(filters, additional_query_columns)
if item_list: if item_list:

View File

@@ -67,8 +67,8 @@ def _execute(filters, additional_table_columns=None, additional_query_columns=No
total_tax = 0 total_tax = 0
for tax_acc in tax_accounts: for tax_acc in tax_accounts:
if tax_acc not in income_accounts: if tax_acc not in income_accounts:
tax_amount = flt(invoice_tax_map.get(inv.name, {}).get(tax_acc)) tax_amount_precision = get_field_precision(frappe.get_meta("Sales Taxes and Charges").get_field("tax_amount"), currency=company_currency) or 2
total_tax += tax_amount tax_amount = flt(invoice_tax_map.get(inv.name, {}).get(tax_acc), tax_amount_precision)
row.append(tax_amount) row.append(tax_amount)
# total tax, grand total, outstanding amount & rounded total # total tax, grand total, outstanding amount & rounded total