Response to the following problem:
The following units of a particular item were available for sale during the year:
Beginning inventory 20 units at $45
Sale 15 units at $80
First purchase 31 units at $47
Sale 27 units at $80
Second purchase 40 units at $50
Sale 35 units at $80
The firm uses the perpetual inventory system, and there are 14 units of the item on hand at the end of the year. What is the total cost of the ending inventory according to (a) fifo, (b) lifo?