PROPOSAL SUMMARY
This proposal is to prevent the deposit amount from fully applying to the invoice and apply only a predefined amount.
REQUIREMENT
Need to apply on particular deposit amount to be applied for invoices.
Scenario: The user will create a deposit attached to a sales order.
The full deposit amount need not be assigned to the invoice but only a predefined amount
It is based on the percentage defined in the standard field in the transaction record.
OUR SOLUTION
We will use the value from the standard percentage field ‘Required Deposit Percentage’ in the Sales orders
This field stores the required percentage of amount to applied to the invoice.
When a deposit application record is created for an invoice, then the amount applied will be calculated as the percentage value (from the required percentage field in sales order) of the total amount of the invoice.
This will prevent the full amount of the invoice to be applied to the deposit application record and thereby only a predefined amount will be applied.
If the percentage amount of invoice is exceeding the available balance of the deposit amount, then remaining amount will be applied to it.
We can use a user event script to accomplish this functionality. We will create a user event script and deploy it to the deposit application record. This will trigger when a deposit application record is created. The userevent script will fetch the percentage value from the sales order and calculate the percentage amount from the invoice and override the actual amount to be applied in deposit application record.
ASSUMPTIONS
- This solution will override the actual amount to be applied.
- If required percentage value is manually changed, it will not affect the already applied deposit amount.
- If required percentage amount is not given, full deposit amount will be assigned to the invoice in standard way.
- Whatever percentage is on sales order, for each of the invoice, we will apply the required percentage of the invoices amount as applied amount in deposit application.
- If the percentage amount of invoice is exceeding the available balance in deposit record, then remainder amount will apply as the applied amount in deposit application record.