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_type,
|
||||||
pe.party,
|
pe.party,
|
||||||
pe.party_name,
|
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,
|
pe.received_amount,
|
||||||
COALESCE(SUM(CASE
|
COALESCE(SUM(CASE
|
||||||
WHEN stc.account_head = '521.3 - ƏDV' OR acc.account_number = '521.3'
|
WHEN stc.account_head = '521.3 - ƏDV' OR acc.account_number = '521.3'
|
||||||
THEN stc.tax_amount
|
THEN stc.tax_amount
|
||||||
ELSE 0
|
ELSE 0
|
||||||
END), 0) as vat_amount,
|
END), 0) as vat_amount,
|
||||||
pe.received_amount + COALESCE(SUM(CASE
|
pe.paid_amount as grand_total,
|
||||||
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.mode_of_payment,
|
pe.mode_of_payment,
|
||||||
pe.reference_no,
|
pe.reference_no,
|
||||||
pe.reference_date
|
pe.reference_date
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue