When identical units of an item are purchased at different costs: an inventory cost flow method must be used under both a perpetual and a periodic inventory system.
A perpetual inventory system will update your inventory on hand after each sale or purchase of inventory is made. A periodic inventory system is updated periodically, meaning, a company will give a time period they would like their sales and purchases to update in and the system will perform that. Both systems are great for a business but it's their option of how they are generated.