Tips on standard sell price and cost price update behaviour

Tips
1. When a product is updated from OneX, we update the "Cost Price 1" (aka the "Current Cost") and the sell prices
2. If a sell price is updated, we will also update the price on any outstanding sale orders or shipments where the price has not manually been changed by the user. Do do NOT update the cost price on outstanding purchase orders though.
3. When you invoice a purchase receipt, you have the option of updating the "Cost Price 1" with the price you've invoiced at. By default, Readysell will update.
4. The cost that shows on a sale order line is the "Cost Price 1" at the time the line was added. This is simply a "placeholder" cost until such time that FIFO occurs (when a "real" cost can be calculated).
5. The cost on sales is replaced with the FIFO cost for all stocked lines on the sale when the sale is posted. Any cost showing on the sale before the sale is posted is replaced. We have to do this to make the cost on the sale line up with the cost of the stock from the purchase receipt which is actually being allocated to the sale. We don't know this until the sale shipment is posed
6. The cost on a sale may change after it is posted if the stock on the sale was receipted but not purchase invoiced before the sale shipment was posted. The purchase invoice may have a different price than the receipt. When this happens we recalculate the cost and margin of any sales that have been posted but which were allocated to stock from the receipt when the purchase invoice price has a difference from the purchase receipt.