Merge branch 'develop'

This commit is contained in:
Pratik Vyas 2014-01-06 12:18:58 +05:30
commit 955902ccad
2 changed files with 4 additions and 3 deletions

View File

@ -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": {

View File

@ -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))