Invoice the week, not the delivery
An order records what left the bakery. On sale or return you do not know what to charge for until days later, when the driver counts what is coming back.
That gap is why per-delivery invoicing does not suit the arrangement. Wholesale Handler collates processed orders into one draft per customer, and a second batch of orders joins that open draft rather than raising a second invoice, so a week of deliveries sits on one document until you finalise it.
Take the unsold off as a discount line
Add an adjustment to the draft, set it to Discount rather than Charge, and give it an amount and a description.
The description is required and prints on the invoice, so it is the whole record of the return - 12 sourdough returned, week of 6 October rather than returns. Neither the order nor the packing slip carries the count anywhere else.
A discount cannot take an invoice below zero. A quiet week where the returns are worth more than the deliveries is refused, and the balance goes on the next invoice instead.
It has to be a draft
A finalised invoice is immutable. Once it is sent, no line can be added, changed or removed, and there is no credit note - crediting a sent invoice is on the roadmap rather than built.
So the returns count has to reach you before you finalise, which puts the invoice a day or two after the last delivery of the period rather than on the same morning.
When a whole delivery comes back
Delete its lines instead of discounting them. Removing the last line belonging to an order unlinks that order, and it returns to the pool of uninvoiced orders rather than disappearing - so it can be invoiced later if the shop sells the stock after all, or left alone.
When the arrangement ends
While sale or return is in force the shop carries no risk on over-ordering, so nothing pulls the order towards the number that actually sells. That is why it is usually bounded - a fixed run of weeks, then firm sale at the figure the returns turned out to show.
The order history on the account holds both halves of that figure. What you delivered each week is on the orders, and what came back is on the invoices as discount lines.
Wholesale Handler



