Prevent Employee to delete last Personal Payment Method
Summary:
My Client has requirement to Prevent delete Personal Payment method when count of Personal Payment Method is one, to ensure that employees have at least one personal Payment method .
Business logic as below
When a delete action is triggered for a personal payment method:
- Count the number of personal payment methods the employee currently has.
- If the count is 1, block the deletion and display a message:
“You must have at least one personal payment method. Please add another before deleting this one.” - If the count is greater than 1, allow the deletion.
Content (please ensure you mask any confidential information):
Tagged:
0