mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 03:39:11 +00:00
fixes: show deducted tax in purchase register
This commit is contained in:
@@ -77,14 +77,10 @@ for r in res:
|
|||||||
r.append(net_total)
|
r.append(net_total)
|
||||||
|
|
||||||
#Get tax for account heads
|
#Get tax for account heads
|
||||||
acc_head_tax = sql("""select account_head, sum(tax_amount)
|
acc_head_tax = sql("""select account_head,
|
||||||
from `tabPurchase Taxes and Charges`
|
sum(if(add_deduct_tax='Add', tax_amount, -tax_amount))
|
||||||
where parent = '%s'
|
from `tabPurchase Taxes and Charges` where parent = %s and parenttype = 'Purchase Invoice'
|
||||||
and parenttype = 'Purchase Invoice'
|
and category in ('Total', 'Valuation and Total') group by account_head""", r[col_idx['ID']])
|
||||||
and add_deduct_tax = 'Add'
|
|
||||||
and category in ('Total', 'Valuation and Total')
|
|
||||||
group by account_head
|
|
||||||
""" %(r[col_idx['ID']],))
|
|
||||||
|
|
||||||
#Convert the result to dictionary for easy retrieval
|
#Convert the result to dictionary for easy retrieval
|
||||||
acc_head_tax_dict = {}
|
acc_head_tax_dict = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user