I've come across an issue (at least 3 customers have reported this) with COS postings when a return is created from an order. Steps to recreate this below.
1. Create a new stock item, average costing, do not specify an average cost price.
2. Raise a PO for that item.
3. Raise an SO for that item, there will be 0 cost price on the SO line.
4. Receive the stock, record the invoice. The item now has an average cost.
5. Allocate, despatch and invoice the SO. The correct COS posting is made.
6. Create a return from that order, the return will have a 0 cost price on the item line.
7. Receive the goods, record the credit note. No COS posting is made because for a return it is based on the cost price on the item line. Sage doesn't look to the costing method.
The end result is that your stock is incorrectly valued and if not spotted quickly you could end up selling those items again and either an incorrect COS posting (or profit figure) being recorded or no COS at all.
As a lot of customers don't allow their users to see the cost price on an order line it isn't easy to spot. Even if the users can see the cost price having a 0 cost price on an SO line doesn't necessarily cause any other issues as in the example above Sage will ultimately post the correct COS.
At the very least there needs to be a warning when creating a return from the order if the cost price being copied is 0 and the consequences of that happening.