fixed payment report vat calc
This commit is contained in:
parent
79083c9b23
commit
9016cf1086
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue