Average cost in DEAR is for informational purposes only and is automatically calculated when any inventory movement (buy, sell, etc.) happens to the product. It is displayed next to the price values on each Product screen. It is included to show your % margin. Average cost in DEAR is calculated as Value on Hand/Quantity on hand for every given product.
Average cost in DEAR does NOT affect your P&L statement. All COGS calculations are done using accounting costing methods such as FIFO or FEFO. DEAR doesn't use average cost method for P&L calculations at all. Once authorised, the invoice cost is available and distributed to all sales parcels (assuming you sold this product already) on FIFO (or Special) basic and the accounting records are updated accordingly.
Once On Hand quantity of the product drops to 0, DEAR stops updating average cost and leaves the last value intact. Then the only way to change it is via CSV file upload with any value you want. In this case you need to do the update via CSV file if you would like to change current value (which is obviously not true average cost, but we receive inquiries like this from time to time) or wait till you buy some new batch of this item and DEAR will recalculate average cost automatically once purchase invoice is authorised.