It depends on what you want to do. Is this for reporting or having a cost assigned to a sales transaction?
The inventory purchase receipts table stores the costs coming in and going out. This data might help you create a report to determine what the cost was.
From a transaction standpoint, the cost is updated when you post a transaction.