Average buying item in gross profit report

Hello All,
Average buying rate is 0 in gross profit report for some delivery note for 2011 and 2012 .
I have check the code, for those delivery notes the stock ledger entry does not exist.
The stock ledger entry is not created if the item is not stock item.
Those items is stock item =‘Yes’. It might be modified later.

Is there any way to update (create stock ledger entries for those delivery note.) stock ledger entries?

You have to cancel and amend all the Purchase Receipts, Stock Entry and Delivery Notes for that item.