Claimed amount is not reset on cancel

This commit is contained in:
Rohit Waghchaure 2018-11-14 13:20:00 +05:30
parent a88eaa6e20
commit 047a7123eb

View File

@ -58,10 +58,9 @@ class EmployeeAdvance(Document):
select sum(ifnull(allocated_amount, 0))
from `tabExpense Claim Advance`
where employee_advance = %s and docstatus=1 and allocated_amount > 0
""", self.name)[0][0]
""", self.name)[0][0] or 0
if claimed_amount:
frappe.db.set_value("Employee Advance", self.name, "claimed_amount", claimed_amount)
frappe.db.set_value("Employee Advance", self.name, "claimed_amount", claimed_amount)
@frappe.whitelist()
def make_bank_entry(dt, dn):