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