I don’t agree with the Purchases argument for reduction in GM.
Let’s assume a company has an inventory of 10 items, for simplicity lets assume that each item costs Rs.1 so the total inventory value is Rs.10. Let this be the opening inventory. During the quarter, let’s say they sold 3 items from this inventory but they expect great sales next quarter, so they replenish the inventory by 5 more items.
So Opening Inventory = 10
Purchases = 5
Closing Inventory = 12 (10 - 3 + 5)
Now COGS in this case we already know is 3 as we sold 3 items. Using your formula as well we get the same number
Opening Inventory + Purchases - Closing Inventory = COGS
10 + 5 - 12 = 3
Now if Purchases are increased to 8 and Opening Inventory and Sales in quarter remains same,
Opening Inventory = 10
Purchases = 8
Closing Inventory = 15 (10 - 3 + 8)
COGS using same formula will be
10 + 8 - 15 = 3
So irrespective of what the Purchases made in the quarter are, the COGS will not change because the Closing inventory already reflects the Purchases made.