Employee Advance Payment

Hi,

After an Employee gets an Advance Payment, he/she always needs to do a retirement at some point. Sometimes they claim the exact amount but many times, it’s above or below the Advance Amount based on realities in the field

When the amount to be claimed is equal to the Advance Amount, everything is okay apart from the fact that the Make Payment button is persistent (even though the status of the Expense Claim is ‘Paid’). I’ve made a separate issue for this

When the amount to be claimed is above the Advance Amount, everything works fine. The excess amount is recognized as outstanding and the status remains ‘Unpaid’. Clicking on the Make Payment button calls up a Payment Entry form with the Outstanding Amount properly allocated against the Expense Claim. This is all fine

When the amount to be claimed is less than the Advance Amount and the employee actually has to make a refund, the system performs woefully! There is no clear way to handle this and it’s often the greatest source of confusion when it comes to using the Employee Advance feature

SUGGESTION:

Add a Button for ‘Make => Refund’ in the Employee Advance form
Clicking on this link should call up a Payment/Journal Entry with the Unclaimed Amount value
Add a field in the Employee Advance form that shows ‘Refunded Amount’ similar to what we have for ‘Claimed Amount’
Add a validation to ensure that Refund Amount is never greater than Unclaimed Amount
Also, sum of Refund Amount and Claimed Amount should not be greater than Advance Amount
Add a field in the Employee Advance form for ‘Outstanding Amount’. This is the Difference between the Advance Amount and the sum of Claimed and Refunded Amounts
This should set us in the right direction

Thanks
https://github.com/frappe/erpnext/issues/14215