Goods sold being returned is quite a common practice in business. They could be returned by the customer on quality issues, non-delivery on agreed date, or any other reason.
In ERPNext, you can create a Sales Return by simply making a Delivery Note / Sales Invoice with negative quantity.
First open the original Delivery Note / Sales Invoice, against which customer returned the items.
Then click on "Make Sales Return", it will open a new Delivery Note with "Is Return" checked, items and taxes with negative amount.
You can also create the return entry against original Sales Invoice, to return stock along with credit note, check "Update Stock" option in Return Sales Invoice.
On submission of Return Delivery Note / Sales Invoice, system will increase stock balance in the mentioned warehouse. To maintain correct stock valuation, stock balance will go up according to the original purchase rate of the returned items.
In case of Return Sales Invoice, Customer account will be credited and associated income and tax account will be debited.
If Perpetual Inventory enabled, system will also post accounting entry against warehouse account to sync warehouse account balance with stock balance as per Stock Ledger.