[Fix] Column ‘claimed_amount’ cannot be null

This commit is contained in:
Rohit Waghchaure 2018-11-02 16:02:33 +05:30
parent 768513f2f9
commit 598d34445f

View File

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