mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
Merge pull request #44734 from frappe/mergify/bp/version-14-hotfix/pr-44660
fix: better indicator base amount for Tax Witholding in Journal Entry (backport #44660)
This commit is contained in:
2
.github/workflows/patch.yml
vendored
2
.github/workflows/patch.yml
vendored
@@ -16,7 +16,7 @@ concurrency:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
|
|
||||||
name: Patch Test
|
name: Patch Test
|
||||||
|
|||||||
@@ -72,8 +72,8 @@ def get_result(filters, tds_docs, tds_accounts, tax_category_map, journal_entry_
|
|||||||
if net_total_map.get((voucher_type, name)):
|
if net_total_map.get((voucher_type, name)):
|
||||||
if voucher_type == "Journal Entry" and tax_amount and rate:
|
if voucher_type == "Journal Entry" and tax_amount and rate:
|
||||||
# back calcalute total amount from rate and tax_amount
|
# back calcalute total amount from rate and tax_amount
|
||||||
if rate:
|
base_total = min(tax_amount / (rate / 100), net_total_map.get((voucher_type, name))[0])
|
||||||
total_amount = grand_total = base_total = tax_amount / (rate / 100)
|
total_amount = grand_total = base_total
|
||||||
elif voucher_type == "Purchase Invoice":
|
elif voucher_type == "Purchase Invoice":
|
||||||
total_amount, grand_total, base_total, bill_no, bill_date = net_total_map.get(
|
total_amount, grand_total, base_total, bill_no, bill_date = net_total_map.get(
|
||||||
(voucher_type, name)
|
(voucher_type, name)
|
||||||
@@ -405,7 +405,7 @@ def get_doc_info(vouchers, doctype, tax_category_map, net_total_map=None):
|
|||||||
"paid_amount_after_tax",
|
"paid_amount_after_tax",
|
||||||
"base_paid_amount",
|
"base_paid_amount",
|
||||||
],
|
],
|
||||||
"Journal Entry": ["total_amount"],
|
"Journal Entry": ["total_debit"],
|
||||||
}
|
}
|
||||||
|
|
||||||
entries = frappe.get_all(
|
entries = frappe.get_all(
|
||||||
@@ -427,7 +427,7 @@ def get_doc_info(vouchers, doctype, tax_category_map, net_total_map=None):
|
|||||||
elif doctype == "Payment Entry":
|
elif doctype == "Payment Entry":
|
||||||
value = [entry.paid_amount, entry.paid_amount_after_tax, entry.base_paid_amount]
|
value = [entry.paid_amount, entry.paid_amount_after_tax, entry.base_paid_amount]
|
||||||
else:
|
else:
|
||||||
value = [entry.total_amount] * 3
|
value = [entry.total_debit] * 3
|
||||||
|
|
||||||
net_total_map[(doctype, entry.name)] = value
|
net_total_map[(doctype, entry.name)] = value
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user