Sales Return leaves a question about outstanding delivery qty

Hello ERPNext community,

I’m trying to understand the standard Sales Return flow for a partial delivery. Here’s the case: Sales Order for 10 units, first Delivery Note for 6, second for the remaining 4. Two units from the first delivery are returned afterwards.

If the customer only wants a refund and not replacement stock, should the Sales Order still show 2 units to deliver? I’m trying to keep the stock and invoice side consistent without adding a custom script. Thanks in advance.

I’d start by noting what you expect the delivered and outstanding quantities to be before the return. Makes it much easier to spot which document changes the numbers.

Are the two returned units still saleable? Or are they damaged and going into a separate warehouse? That matters for the stock side.

For this case the two units can go straight back into the original warehouse. Refund only is the main case, but I’d also like to understand the replacement route.

Compare the Sales Order, both Delivery Notes and the Stock Ledger after the return. I’d avoid assuming that the return itself closes the remaining delivery obligation.

Was the original delivery already invoiced? If yes, you’ll need to look at the credit note side too, not only the stock movement.

Good point. I’ll keep the invoiced qty, returned qty and remaining fulfillment qty separate in the reconciliation. They aren’t necessarily the same thing.

For a replacement, the extra two units being outstanding might make sense. For refund only, check the order status and how you close any quantity you no longer intend to ship.

Agreed. I’d try both flows in a test company first, then check stock and receivables after each document. Much easier than untangling it later! :+1:

For a refund-only scenario, I would use the standard ERPNext workflow:

  1. Create a Sales Return against the original Delivery Note for the two units.
  2. If already invoiced, create a Credit Note with “Update Stock” unchecked, since the Sales Return has already handled the inventory movement.
  3. Process the refund if the customer has already paid.
  4. On the Sales Order, select Status → Close once all required accounting transactions are completed.

For a replacement, leave the Sales Order open and create another Delivery Note for the two outstanding units.

Closing the Sales Order preserves the original transaction history while removing the remaining fulfillment obligation. There’s no need to artificially adjust the delivered quantity or introduce a custom script.