From 4a261b5cef5062f3472634f1e6c92202cd6a0083 Mon Sep 17 00:00:00 2001 From: Smit Vora Date: Wed, 11 Dec 2024 17:57:47 +0530 Subject: [PATCH 1/2] fix: better indicator base amount for Tax Witholding in Journal Entry (cherry picked from commit 56a0a0db18fb16ce4a30a92a0fc271351def3894) --- .../report/tds_payable_monthly/tds_payable_monthly.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.py b/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.py index 465c300a8ef..03a5259b96f 100644 --- a/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.py +++ b/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.py @@ -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 voucher_type == "Journal Entry" and tax_amount and rate: # back calcalute total amount from rate and tax_amount - if rate: - total_amount = grand_total = base_total = tax_amount / (rate / 100) + base_total = min(tax_amount / (rate / 100), net_total_map.get((voucher_type, name))[0]) + total_amount = grand_total = base_total elif voucher_type == "Purchase Invoice": total_amount, grand_total, base_total, bill_no, bill_date = net_total_map.get( (voucher_type, name) @@ -405,7 +405,7 @@ def get_doc_info(vouchers, doctype, tax_category_map, net_total_map=None): "paid_amount_after_tax", "base_paid_amount", ], - "Journal Entry": ["total_amount"], + "Journal Entry": ["total_debit"], } 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": value = [entry.paid_amount, entry.paid_amount_after_tax, entry.base_paid_amount] else: - value = [entry.total_amount] * 3 + value = [entry.total_debit] * 3 net_total_map[(doctype, entry.name)] = value From c86174d0f2bfa3171ea9f56c4c7f4bfed9611a36 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 17 Dec 2024 14:48:15 +0530 Subject: [PATCH 2/2] fix: broken CI - pin ubuntu-22.04 --- .github/workflows/patch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml index d6a03af535f..c39b4be9acb 100644 --- a/.github/workflows/patch.yml +++ b/.github/workflows/patch.yml @@ -16,7 +16,7 @@ concurrency: jobs: test: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 timeout-minutes: 60 name: Patch Test