Merge pull request #15894 from rohitwaghchaure/fix_update_claimed_amount

Column ‘claimed_amount’ cannot be null
This commit is contained in:
rohitwaghchaure
2018-11-02 18:14:08 +05:30
committed by GitHub

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