mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 11:19:09 +00:00
fix: include grand_total in journal entry and handle taxes correctly in invoice total calculation
This commit is contained in:
@@ -409,6 +409,7 @@ class JournalEntry(AccountsController):
|
|||||||
"posting_date": self.posting_date,
|
"posting_date": self.posting_date,
|
||||||
"tax_withholding_net_total": net_total,
|
"tax_withholding_net_total": net_total,
|
||||||
"base_tax_withholding_net_total": net_total,
|
"base_tax_withholding_net_total": net_total,
|
||||||
|
"grand_total": net_total,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -724,7 +724,7 @@ def get_advance_adjusted_in_invoice(inv):
|
|||||||
|
|
||||||
|
|
||||||
def get_invoice_total_without_tcs(inv, tax_details):
|
def get_invoice_total_without_tcs(inv, tax_details):
|
||||||
tcs_tax_row = [d for d in inv.taxes if d.account_head == tax_details.account_head]
|
tcs_tax_row = [d for d in inv.get("taxes") or [] if d.account_head == tax_details.account_head]
|
||||||
tcs_tax_row_amount = tcs_tax_row[0].base_tax_amount if tcs_tax_row else 0
|
tcs_tax_row_amount = tcs_tax_row[0].base_tax_amount if tcs_tax_row else 0
|
||||||
|
|
||||||
return inv.grand_total - tcs_tax_row_amount
|
return inv.grand_total - tcs_tax_row_amount
|
||||||
|
|||||||
Reference in New Issue
Block a user