TeX source:
\text { Cost of goods sold }=\text { Beginning inventory }+\text { Net cost of purchases }-\text { Ending inventory}