Editing an entry which affects inventory costing
Can we edit an entry which affects inventory costing. For example I posted a Purchase Transaction on 30-Jun-2018 in this purchase transaction I entered Stock Quantity of 10 @ of USD 100. After this I entered some Sale Invoices and cost of goods sold of this stock items will be @ of USD 100. Now I realized that Rate in Purchase Transaction was wrong and I want to edit it and change the rate to USD 120. Can I edit purchase transaction and if it is possible to edit then will it affect cost of goods sold in subsequent Sale Invoices?
Thanks for help