Claimed Amount Field Issue

Hi @rohit_w

Trust you’re doing great. The ‘Claimed Amount’ field in the Employee Advance form doesn’t get cleared even after the associated Expense Claim document is cancelled! I believe this issue is linked to your patch for the issue in the following thread:

Kindly help resolve this asap

Thanks

@wale
Thanks for reporting the issue, I have sent the fix of the issue and soon we’ll release it.

1 Like

Many thanks @rohit_w

hoping this gets merged soon…

Kind regards,

Hi @rohit_w

Does this fix affect existing Employee Advances? We still have a number of Advances which are showing claimed amount even though the Expense Claims were cancelled. If the fix won’t work for existing advances, how do we proceed?

Please advise

Thanks

Hi @wale

If they are cancelled please delete them

Hi @rohit_w

Thanks for your response. We have deleted them but the claimed amount is still there on the Employee Advance forms. Because of this, there’s no way to make Expense Claims for those Advances!

How do we proceed?

Kind regards

Hi @rohit_w

Still expecting your feedback pls

Thanks

@wale

Run below code in bench console and check

for d in frappe.get_all('Employee Advance'):
	doc = frappe.get_doc('Employee Advance', d.name)
	doc.update_claimed_amount()
frappe.db.commit()

2 Likes

Hi @rohit_w

You’re the man! Thanks a lot for this. All existing Advances were updated successfully

Kind regards,