cost is assigned to inventory type items when you purchase the item, it becomes COGS as it should when you sell the item.
All other items post to the expense account listed on the item screen when you purchase it, you may have that set to COGS or some other expense account.
The above is normal accounting, I am not sure what you are asking to do.
and it would help if you explained what you did and why?