In the perpetual inventory system, inventory and cost of goods sold are updated for each sale/purchase and return transaction.
A transaction of sale is noted through two journal entries in perpetual inventory system. The first journal entry is the sale value of inventory and the second journal entry is the cost of goods sold and reduces the inventory balance.
The first entry would be:
Accounts Receivable 440
Sales 440
The second entry would be:
Cost of Goods Sold 238
Merchandise Inventory 238