Purchase for Service Items

In Purchase, we invoiced a service item, the cost is added under “Cost of Goods Sold”. Here we are not selling that service. How can i nullify that balance under “Cost of Goods Sold”. Provisional Accounting enabled under Company

Can anyone help me on this?