From 92dd87f0fef0b78922089a5660d424886d041c90 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 3 Oct 2012 13:33:13 +0530 Subject: [PATCH] debit-credit tolerance increased to .005 --- accounts/doctype/gl_control/gl_control.py | 2 +- patches/october_2012/find_wrong_voucher.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/accounts/doctype/gl_control/gl_control.py b/accounts/doctype/gl_control/gl_control.py index 470f813777..005567e761 100644 --- a/accounts/doctype/gl_control/gl_control.py +++ b/accounts/doctype/gl_control/gl_control.py @@ -192,7 +192,7 @@ class DocType: # check total debit / credit # Due to old wrong entries (total debit != total credit) some voucher could be cancelled - if abs(self.td - self.tc) > 0.001 and not cancel: + if abs(self.td - self.tc) > 0.005 and not cancel: msgprint("Debit and Credit not equal for this voucher: Diff (Debit) is %s" % (self.td-self.tc)) raise Exception diff --git a/patches/october_2012/find_wrong_voucher.py b/patches/october_2012/find_wrong_voucher.py index f4436224f9..ce744c6d55 100644 --- a/patches/october_2012/find_wrong_voucher.py +++ b/patches/october_2012/find_wrong_voucher.py @@ -1,7 +1,7 @@ def execute(): import webnotes vouchers = webnotes.conn.sql(""" - select parent from `tabPurchase Taxes and Charges` + select parent, parenttype, modified from `tabPurchase Taxes and Charges` where modified >= '2012-10-02' and (category = 'Total' or category = 'Valuation') and parenttype != 'Purchase Taxes and Charges Master'