From 9016cf1086ce04037b28452a137fd2132c59cdb2 Mon Sep 17 00:00:00 2001 From: Ali <010109ali@gmail.com> Date: Tue, 22 Jul 2025 13:24:43 +0400 Subject: [PATCH] fixed payment report vat calc --- .../payment_entry_info_report.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/taxes_az/taxes_az/report/payment_entry_info_report/payment_entry_info_report.py b/taxes_az/taxes_az/report/payment_entry_info_report/payment_entry_info_report.py index e5dabe9..4211627 100644 --- a/taxes_az/taxes_az/report/payment_entry_info_report/payment_entry_info_report.py +++ b/taxes_az/taxes_az/report/payment_entry_info_report/payment_entry_info_report.py @@ -109,18 +109,18 @@ def get_data(filters): pe.party_type, pe.party, pe.party_name, - pe.paid_amount, + pe.paid_amount - COALESCE(SUM(CASE + WHEN stc.account_head = '521.3 - ƏDV' OR acc.account_number = '521.3' + THEN stc.tax_amount + ELSE 0 + END), 0) as paid_amount, pe.received_amount, COALESCE(SUM(CASE WHEN stc.account_head = '521.3 - ƏDV' OR acc.account_number = '521.3' THEN stc.tax_amount ELSE 0 END), 0) as vat_amount, - pe.received_amount + COALESCE(SUM(CASE - WHEN stc.account_head = '521.3 - ƏDV' OR acc.account_number = '521.3' - THEN stc.tax_amount - ELSE 0 - END), 0) as grand_total, + pe.paid_amount as grand_total, pe.mode_of_payment, pe.reference_no, pe.reference_date