They are sold this year, and therefore are a cost of this years sales. (The cost this year is the opening inventory plus purchases less closing inventories)
Have you watched my free lectures on budgeting? The lectures are a complete free course and cover everything needed to be able to pass the exam well.