You accountant is correct. Ending inventory is counted to determine the cost of goods sold during the year. The cost of what is left in inventory is not a deductible expense for that business period. The purchase cost of your ending inventory is deducted when it is sold in the future.
Thank you for your question. Please Reply if you need additional help.