find wrong vouchers
This commit is contained in:
parent
bd037ab540
commit
3af321fa59
@ -1,9 +1,15 @@
|
||||
def execute():
|
||||
import webnotes
|
||||
vouchers = webnotes.conn.sql("""
|
||||
select parent, parenttype, modified from `tabPurchase Taxes and Charges`
|
||||
select parent, parenttype, modified, sum(tax_amount) as tax from `tabPurchase Taxes and Charges`
|
||||
where modified >= '2012-07-12'
|
||||
and category = 'Valuation' and tax_amount != 0
|
||||
and category in ('Total', 'Valuation and Total')
|
||||
and parenttype != 'Purchase Taxes and Charges Master'
|
||||
group by parenttype, parent
|
||||
""")
|
||||
print vouchers
|
||||
|
||||
for d in vouchers:
|
||||
total_tax = webnotes.conn.sql("""select tax_amount from `tab%s` where name = %s""" %
|
||||
(d[1], '%s'), d[0])
|
||||
if flt(total_tax[0][0]) != flt(d[3]):
|
||||
print d
|
Loading…
Reference in New Issue
Block a user