When you buy an asset it goes onto your balance sheet, then over the years you apply depreciation to gradually reduce the book value of the asset. When you sell or scrap the asset, your profit (or loss) on disposal is the difference between the net book value at the point of sale and the amount you actually received (which may be zero).
At the point of sale the asset features in two places on your balance sheet - the original asset code for the initial purchase price, and the associated depreciation code for the total accumulated depreciation of this asset since it was purchased. You need to reverse both of those amounts to remove the asset from your BS:
- Credit the asset code for the original purchase price of the asset
- Debit the associated balance sheet depreciation code to reverse the accumulated depreciation
Assuming the asset hasn’t been fully depreciated already, these will not be equal, so you need to debit the difference to “sale of assets” to make it balance.
Now the actual sale of the asset can be done as a normal sales invoice also posted to “sale of assets” rather than the usual “general sales”. After this, the net balance on the “sale of assets” account will be your gain or loss on that asset (depending whether the sale was for more or less than the net book value).
If it’s an overall loss then you might want to move the value to an expense code rather than having a negative value on a sales code, but that’s a minor detail for you and your accountant to sort out.