IMS. ← All docs

Selling — business logic

Selling is a shipment to a customer with revenue recorded. Technically it's
the same mechanism as expenditure (see Expenditure and
transfer
— stock check, lot write-off, splitting
across several lots), but with a different business meaning: here the goods
leave the company for good, and this very shipment is a source of income,
not just an asset moving around.

How it differs from expenditure

An order closes automatically

If a selling line was picked against an open order position, the
corresponding order position closes automatically after processing (fully
or partially, based on the quantity actually shipped). The user doesn't
need to separately mark the order as fulfilled — that's a consequence of
the sale itself, not a separate action.

Debt or payment

If an account is specified in the header, a cash document twin is
automatically created on processing for the sale amount: money is
considered received right away, with no separate "record payment" step, and
the customer's balance isn't adjusted. If no account is specified but a
customer is, the sale amount is subtracted from their balance, creating a
debt ("sale on credit").

A receipt isn't a separate entity

A receipt or invoice to the customer is a printed form of an already-saved
sale document, not an independent physical object with its own state. If a
customer loses their paper receipt, there's no "restore" operation needed —
the same document is printed again, as many times as needed, from the same
data. This is a direct consequence of the "reports are computed, not
stored" principle (see Concept):
a printed form is just another way to display data that already exists in
the document.