Calculating cost for returned products
The current article describes how the product cost is formed when returning sold products. This is a receipt returning.
This process is very similar to the product transferring (see Calculating cost for transferred products). However, there’s а difference: instead of transferring the products from one store to another in the current enterprise company, the products are taken out of the store and given to the customer. After that, the customer returns them to the same store. So, the receipt cost (on each row) is defined by the following formula:
[receipt cost] = proportional part of the [issue cost]
A proportional part of the issue cost is required as not all products can be returned after being sold. The proportion is defined by the ratio between sold and returned quantity.
Example 1:
A customer buys 10 PCS on 05 Jan 2020 and a few days later returns 3 PCS. The issue transaction is:
- issue, Timestamp: 05 Jan 2020 11:14, 10 PCS, document cost: 90.
Then, in the receipt store order generated by the returning sale order, the following is saved:
3 PCS, document cost: 90 * 3 / 10 = 27
The data for the issue transactions is retrieved as follows:
The value in Return for sales order line is taken into account - it connects us to the original line.
For this line, the system finds all store orders rows referring to it.
For each store order row, the respective non-voided executions are loaded (transactions rows) - the store transactions.
The document cost is copied from the Line document cost field in the transactions rows.
There are some specific cases when the calculations from the example described above are not possible. Here, it is necessary to enter the original sale orders lines in the rows of the returning sales order. Sometimes this is not possible and the original sales order does not exist in the system. If a company started working on ERP.net recently and the original sales order had happened before the shift to ERP.net, the Historical Unit Cost field from the returning sales order is used for the definition of the unit cost in the receipt transaction.
The formula is as follows:
[receipt cost] = [returned quantity] * [historical unit cost]
Example 2:
There is a product return from a customer for 3 PCS and the original sales order does not exist in ERP.net. The Historical Unit Cost field in the returning sales order has to be filled in. If its value is 8, then the receipt store order will have the following:
3 PCS, document cost: 3 * 8 = 24.
Receipt and issue cost balance
As with store transfers, when returning products, the quantity returned can’t be greater than the quantity sold. This is true for the original sale document and all the sales orders for the products returned. Every store transaction for the sales orders is gathered and for each transaction timestamp, validation is performed as in the store transfers:
The costs from all issue transactions with transaction timestamp smaller or equal to the current are summed up;
The costs from all receipt transactions with transaction timestamp smaller or equal to the current are summed up;
The system checks if the issue total is greater or equal to the receipt total.
For more details about this validation, see Receipt and issue balance validation in store transfers.