diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 981ca9a510..d6bb2d7aab 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -5,7 +5,7 @@ import frappe from erpnext.hooks import regional_overrides from frappe.utils import getdate -__version__ = '10.1.71' +__version__ = '10.1.72' def get_default_company(user=None): '''Get default company for user''' diff --git a/erpnext/hr/doctype/employee_advance/employee_advance.py b/erpnext/hr/doctype/employee_advance/employee_advance.py index 29aae05ba3..c90e5dbbde 100644 --- a/erpnext/hr/doctype/employee_advance/employee_advance.py +++ b/erpnext/hr/doctype/employee_advance/employee_advance.py @@ -58,10 +58,9 @@ class EmployeeAdvance(Document): select sum(ifnull(allocated_amount, 0)) from `tabExpense Claim Advance` where employee_advance = %s and docstatus=1 and allocated_amount > 0 - """, self.name)[0][0] + """, self.name)[0][0] or 0 - if claimed_amount: - frappe.db.set_value("Employee Advance", self.name, "claimed_amount", claimed_amount) + frappe.db.set_value("Employee Advance", self.name, "claimed_amount", claimed_amount) @frappe.whitelist() def make_bank_entry(dt, dn):