frappe/frappe#478 erpnext install works

This commit is contained in:
Rushabh Mehta
2014-04-02 18:09:34 +05:30
parent 943e614810
commit f191f854cd
55 changed files with 165 additions and 167 deletions

View File

@@ -378,8 +378,8 @@ class AccountsController(TransactionBase):
return gl_dict
def clear_unallocated_advances(self, childtype, parentfield):
self.doclist.remove_items({"parentfield": parentfield, "allocated_amount": ["in", [0, None, ""]]})
self.set(parentfield, self.get(parentfield, {"allocated_amount": ["not in", [0, None, ""]]}))
frappe.db.sql("""delete from `tab%s` where parentfield=%s and parent = %s
and ifnull(allocated_amount, 0) = 0""" % (childtype, '%s', '%s'), (parentfield, self.name))