Calculation of Cost of Goods Sold