Skip to main content

Reading a sale

Reached from: the eye icon on any row of Direct sales


1. What the drawer shows​

Figure 1 — One invoice, expanded.
SectionContents
HeaderInvoice reference, date, customer name and phone
PaymentThe method pill
LinesProduct, variation, quantity, unit price, line total
TotalsSubtotal, discount, tax, grand total

Everything except the lines is decoded from the remarks field of the underlying ledger rows — there are no dedicated columns for any of it.


2. What groups an invoice​

FieldRole
batch_idThe real grouping key. A UUID generated per Complete, never displayed
reference_noYour invoice number. Human-readable, not unique
remarksThe encoded customer/payment/discount/tax block, repeated on every line
Two invoices can share a reference

Nothing enforces uniqueness on reference_no. The default value is derived from the clock — INV-<yyyymmdd>-<seconds since midnight> — so collisions are unlikely but possible, and editing the field removes even that protection.


3. What you cannot do​

Not availableWhy
Edit a posted saleNo edit path exists
Void or refundNo such permission and no such action
Print or email an invoiceNot in this module — storefront orders have printing, direct sales do not
Link the sale to a customer recordThe name and phone are free text
There is no receipt to give the customer

Direct sales produce a ledger entry, not a document. If a printed receipt matters, the storefront order path has order printing; this screen has nothing equivalent.


4. Correcting a mistake​

The ledger is append-only, so the remedy is a counter-entry:

MistakeFix
Wrong quantityPost a stock adjustment for the difference
Entirely wrong salePost an adjustment reversing every line
Wrong customer or payment methodCannot be corrected — the remarks are immutable

Both the error and the correction stay visible, which is the point of an audit trail even when it is inconvenient.


5. Troubleshooting​

SymptomCause
Customer shows blankNo name was entered when the sale was posted
Totals do not match the line sumDiscount and tax are applied to the cart, not per line
Two rows for one saleTwo separate posts; each Complete is its own batch
The ledger shows this sale as several rowsCorrect — one row per line, sharing a batch_id
Customer name visible in the ledger's RemarksThe ledger does not decode the [CUST:…] tag — see Reading a movement