To appreciate both views, let's assume that a retailer begins the year with inventory having a cost of $800. It ends the year with inventory having a cost of $900. During the year the retailer purchased goods having a cost of $7,000. Let's also assume that the cost per unit did not change during the year.
Retailer X may view the $7,000 of purchases as an expense (cost of goods sold) except for $100, which was the cost of the goods added to its inventory ($900 vs. $800). Retailer X's income statement reports its cost of goods sold as: purchases of $7,000 minus the $100 increase in inventory = $6,900.
Retailer Y may view the $7,000 of purchases as an increase to its asset inventory and will report its cost of goods sold as: beginning inventory of $800 + purchases of $7,000 = cost of goods available of $7,800 minus the ending inventory of $900 = $6,900.
Regardless of whether the goods purchased are initially recorded in an inventory account or in a cost of goods sold account, the amounts reported on the financial statements must be the same: the expense (reported as the cost of goods sold on the income statement for the year) is $6,900 and the asset inventory (reported on the balance sheet as of the end of the year) is $900.