From 598d34445f0661b7f8c02467bca126d7f0ed58a0 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 2 Nov 2018 16:02:33 +0530 Subject: [PATCH] =?UTF-8?q?[Fix]=20Column=20=E2=80=98claimed=5Famount?= =?UTF-8?q?=E2=80=99=20cannot=20be=20null?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- erpnext/hr/doctype/employee_advance/employee_advance.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/hr/doctype/employee_advance/employee_advance.py b/erpnext/hr/doctype/employee_advance/employee_advance.py index 28547fb285..29aae05ba3 100644 --- a/erpnext/hr/doctype/employee_advance/employee_advance.py +++ b/erpnext/hr/doctype/employee_advance/employee_advance.py @@ -60,7 +60,8 @@ class EmployeeAdvance(Document): where employee_advance = %s and docstatus=1 and allocated_amount > 0 """, self.name)[0][0] - frappe.db.set_value("Employee Advance", self.name, "claimed_amount", claimed_amount) + if claimed_amount: + frappe.db.set_value("Employee Advance", self.name, "claimed_amount", claimed_amount) @frappe.whitelist() def make_bank_entry(dt, dn):