Scenario - the item cost and the cost applied to the sales transaction is incorrect due to the wrong purchase cost is recorded in posted purchase invoice.
Option 1 - Create Purchase Credit Memo by copy document function
Remarks: Choose this option if the item it included in the PI have been shipped out from the location
...
In general, the exchange rate to be according to the posting date
5. Post the purchase credit memo
...
Select the document for apply the correct cost to the sales entry then click OK,