Skip to content

Commit

Permalink
Merge pull request #15894 from rohitwaghchaure/fix_update_claimed_amount
Browse files Browse the repository at this point in the history
Column ‘claimed_amount’ cannot be null
  • Loading branch information
rohitwaghchaure committed Nov 2, 2018
2 parents 768513f + 598d344 commit e77f38e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion erpnext/hr/doctype/employee_advance/employee_advance.py
Expand Up @@ -60,7 +60,8 @@ def update_claimed_amount(self):
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):
Expand Down

0 comments on commit e77f38e

Please sign in to comment.