1. easy solution for profit calculation
When the product design is defective, profit calculation will be a nightmare, because the commodity purchase price is actually changed (the prices for different purchases at different times will be different), which will lead to changes in the product cost; for example, the cost of a product sold in March is 10 yuan, and may change to 10.5 yuan in March. The cost in March or other months may be X yuan, therefore, if you do not handle the cost well, It is very troublesome to calculate the profit, and it is difficult to maintain complicated business code. For example, 1 ~ How do you calculate the profit in March? If ~ How do you calculate the return and replacement in March?
Next I will briefly explain how to simplify the profit statistics. For personal opinions, please be gentle if you want to lose your shoes. If you have different opinions, please leave a message.
Solution: purchase warehouse re-calculates the cost price, order delivery records the cost price, and exchange as the idea of [returning new orders. Return is the idea of returning a product.
First, re-calculate the cost price (cost price: weighted average price]) of the purchased goods during warehouse receiving.
Purpose: extract the real cost of the order item during delivery.
Second, when the order is delivered, set the cost price of the order item (the cost price of the item at the time of delivery ). Note: you do not need to set a replacement order. It is already set when a replacement ticket is generated.
Purpose: Calculate the profit at the time of the order. The profit check is the same at any time to avoid the inability to count the actual profit at the time of the order due to cost changes.
3. When an order is returned, a return order is generated (the structure is similar to the order table structure). Enter the order number and the returned goods and quantity (the price and cost are the value of the original order ).
Purpose: Calculate the profit and view the return information.
4. When an order is exchanged, a return order is generated (the structure is similar to the order table structure). Enter the order number and the product and quantity to be exchanged (the price and cost are based on the original order value ), at the same time, a new order is generated (sales and cost of the same product are marked as exchange orders by the value of the original order, and different products are marked as orders by the system's current sales price ).
Purpose: Calculate the profit and view the return information.
NOTE: For the same product replacement, the new order is marked as: replacement order, the product uses the price and cost price of the product in the original order, avoid profit calculation errors (the cost price of the purchased product may change at this time, so use the original order cost to avoid product profit ).
The new order ID generated for different products is: Order, the current system price of the product, the cost price is not set (set at the time of delivery)