COGS computation presented on the Chart of Accounts

When I click on my COGS on the chart of accounts, it shows the COGS entry from the Sales Invoice
SI NO. 01 - DR. 2,300

But I saw someone using manager with COGS presentation like this:

There is another layer of purchases and closing balance.

What was the difference? Is that the set up of the chart of accounts? Looking forward to your insights. Thank you!

Yes, this is how it is done

So how can I set it up like that?

Like this by adding a new Subgroup (COGS) under Income:

Or like this by adding COGS Group and Subtotal Net Income: