cogs function

Cost of goods sold and ending inventory under three methods (FIFO,LIFO,Weighted average)