note the underlined entries below 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Purchase : Dr inventory     xxx

                           Cr cash          xxx

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

sale:          Dr cash              yyy

                           Cr Sale           yyy

                  Dr cogs                 xxx (figure is the same as your purchase entry)

                           Cr inventory      xxx

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


All purchases go to inventory. You only record COGS when a unit of that item is sold.




For xero, 

  • ensure you use the ITEM CODE + QUANTITY column for the sale and purchase entries relating to inventory and cogs
    • purchase use ITEM CODE + QUANTITY against inventory ac
    • sale use 
      • ITEM CODE + QUANTITY on the sale account (this will reflect on inventory report of the quantity and unit price of disposal)
      •  dr cogs cr inventory per image below