Cost of good sold (COGS) in erpnext

Hello everyone. I would like to know how can ERPNEXT count Cost of good sold (COGS)? Thank you for answering my question.

Please ref Accounting Of Inventory Stock

Does COGS in ERPNEXT already count all of the expenses from the item that we buy?