A shop has the following transactions related to its top-selling rackets for the month of August. The shop uses a periodic inventory system.
Aug 1, Beginning inventory 8 units, cost 145 Ea. total cost 1160.
Aug 4, Sale (150 Each), 5 units.
Aug 11, purchase 10 units, cost 135 ea. Total cost 1350.
Aug 13, Sale (165 each), 8 units. 
Aug 20, Purchase 10 units, cost 125 Ea. Total cost 1250.
Aug 26, Sale (175 Each), 11 units.
Aug 29, Purchase 12 units, cost 115 ea. Total cost 1380
Total cost of inventory 5140

Calculate ending inventory and cost of goods sold at Aug 31, using the lifo method 
Using LIFO, we assume inventory is sold in the opposite order that we purchased it: The last purchase is sold first, and part of the second-to-last purchase is sold second.