From 42db5d76a9d709749f4a0ff161cbbeff4dac48f9 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 6 Jan 2014 11:20:37 +0530 Subject: [PATCH 1/2] Fixes in overbilling validation --- controllers/accounts_controller.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/controllers/accounts_controller.py b/controllers/accounts_controller.py index 1a399219e4..778348d3cc 100644 --- a/controllers/accounts_controller.py +++ b/controllers/accounts_controller.py @@ -388,8 +388,9 @@ class AccountsController(TransactionBase): for item in self.doclist.get({"parentfield": "entries"}): if item.fields.get(item_ref_dn): already_billed = webnotes.conn.sql("""select sum(%s) from `tab%s` - where %s=%s and docstatus=1""" % (based_on, self.tname, item_ref_dn, '%s'), - item.fields[item_ref_dn])[0][0] + where %s=%s and docstatus=1 and parent != %s""" % + (based_on, self.tname, item_ref_dn, '%s', '%s'), + (item.fields[item_ref_dn], self.doc.name), debug=1)[0][0] total_billed_amt = flt(flt(already_billed) + flt(item.fields[based_on]), self.precision(based_on, item)) From b882fa14f4de7b7cc1ac8d5e946093b3ce78aa5d Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Mon, 6 Jan 2014 12:48:58 +0600 Subject: [PATCH 2/2] bumped to version 3.4.7 --- config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.json b/config.json index 536e5af1ba..26fc50dbb8 100644 --- a/config.json +++ b/config.json @@ -1,6 +1,6 @@ { "app_name": "ERPNext", - "app_version": "3.4.6", + "app_version": "3.4.7", "base_template": "app/portal/templates/base.html", "modules": { "Accounts": {