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
commit e77f38e7e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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