No it is not.
If you purchase an inventory item, it is not an expense but an asset. The purchase cost amount is added tot the Inventory on hand account in the balance sheet.
When you sell an inventory item, the value of the sale increases the Inventory - Sales account and the cost of the sold inventory item increases the Inventory - cost account and is subtracted from the Inventory on hand account.
Adding the purchase cost directly to the Inventory - Cost account as you are doing is completely wrong in 99% of cases.
There may be some exceptional circumstances that require you to do this, but normal business practise is not one of them.
If you are doing this, then you are incorrectly accounting for your purchase, sales and stock