At the end of trading period, cost of goods sold is debited to the trading…