Which of the following is correct about cost of goods sold?