Calculation of refund amount
The pro-rata principle is applied for refund calculations.
The SRO must specify the amount that should be returned to the customer, and which item or items in the original SO that are included in the return. The present Litium implementation of return management applies the pro-rata principle to calculate the amount. This is a simplified calculation that excludes complex campaign scenarios. This can, however, be customized to fit the business logic of individual merchants.
Example: The refund amount for a partial order return calculated on a pro-rata basis, including any fee or delivery cost.
- The customer buys 3 shirts at $100 each and pays a $15 delivery cost, a total of $315.
- The customer returns one of the shirts.
- The refund is calculated to $100 for the shirt and $100/$300 * $15 = $5 for the delivery cost, a total of $105.
The same principle applies for any extra cost or fee that was included in the SO. If the entire SO is returned in multiple batches, the original total amount will be equal to the sum of the amounts in the individual SROs. Please see this spreadsheet for a more detailed example of how refunds are calculated on a pro-rata basis.
Orders not payment captured
Payment capture is not a pre-requisite for an order return. If the payment has not been captured yet, it will be cancelled. The payment provider will be instructed to handle the payment accordingly.
Override Refund Value calculation to not refund the shipping cost
By default, refund value for shipping cost was return by pro-rata basis. Depends on each implementation, delivery cost also be set to zero by adding an override class to Litium.Accelerator.Mvc project like this:
public class NewSalesReturnOrderCalculator : SalesReturnOrderCalculator
{
public NewSalesReturnOrderCalculator(ISalesReturnOrderPaymentInfoBuilder salesReturnPaymentInfoBuilder) : base(salesReturnPaymentInfoBuilder)
{
}
protected override void CalculateDelivery(OrderCarrier sroCarrier, decimal proRataPct, Order saleOrder)
{
foreach (var delivery in sroCarrier.Deliveries)
{
delivery.DeliveryCost = 0;
delivery.DeliveryCostWithVAT = 0;
delivery.TotalVATAmount = 0;
delivery.TotalDeliveryCost = 0;
}
sroCarrier.TotalDeliveryCost = 0;
sroCarrier.TotalDeliveryCostVAT = 0;
}
}
This override class will set delivery cost to 0 for sales return order.
