Calculation of ending inventory and cost of goods sold