When a credit memo is created with a customer return or an invoice as its origin, the cost price proposed is the cost price from the original document. If it is a direct credit memo, the cost price is calculated from the margin calculation rule defined by the Product-site valuation method.