4. Orders & invoices¶
Order lifecycle¶
Cart (customer adds items)
│
▼
Order placed status = "pending"
│
▼
Payment │
├─ card via Nets status flips to "paid" automatically
│ invoice flips to "paid" too
└─ invoice (15-day net) status stays "pending" until you receive payment
│
▼
Fulfilment you ship the goods manually
│
▼
Order closed
We send a confirmation email to the customer on every order, regardless of payment method.
Looking at orders¶
Customers → Orders - table of every order:
- Order number -
RMS-2026-00042style, sequential. - Date - when the order was placed.
- Customer - email; click through to their profile.
- Total - incl VAT, in the order's region currency.
- Payment - card / invoice / pending.
- Status - pending / paid / shipped / cancelled / refunded.
- Source - storefront / internal / proforma (see below).
Click a row to open the order detail with: line items, customer + shipping address, invoice link, payment events.
Order sources¶
- storefront - placed via the public website by the customer.
- internal - created by an admin in KCMS on behalf of the customer (phone order, walk-in). No payment is taken automatically; the customer pays later.
- proforma - imported from a CSV (e.g. legacy system migration). These don't trigger payment or email.
Marking an order paid manually¶
Most orders flip to "paid" automatically (card via Nets, or when you receive bank-giro payment with the OCR reference on an invoice).
To mark manually:
- Open the order.
- Payment section → Mark as paid.
- Pick the payment method (cash / bank transfer / other).
- Save.
This also flips the invoice (if any) to paid and stamps the payment date.
Invoices¶
Invoices are auto-generated only for orders that paid by invoice (15-day net). Card-paid orders get an invoice too - flagged as "paid" on creation - because we need the document for accounting.
To see them: Finance → Accounting → Invoices.
Each invoice has:
- Number -
2026-00042sequential. - Issued - date.
- Due - issued + payment_terms (capped at 15 days).
- Status - draft / sent / paid / overdue / credited.
- OCR reference - the 8-12 digit number with MOD-10 checksum that customers type when paying via bankgiro. Required by Swedish banks.
- PDF - click to view (rendered server-side, embedded in iframe).
- Customer ledger link - for FX-converted invoices, we show the SEK total alongside the original-currency total.
Resending an invoice¶
Open the invoice → Resend email. The customer receives the same PDF as before (attached to the email).
Creating a manual invoice¶
For one-off billing not tied to an order (consulting fee, services not in the shop):
Finance → Accounting → Invoices → New invoice:
- Pick the customer.
- Add lines manually: description, qty, unit price (öre), VAT rate.
- Save. The system generates the number + OCR ref + PDF + emails it.
Credit invoices (kreditfaktura)¶
If an invoice was wrong, don't edit it (that breaks the audit trail). Credit it instead:
- Open the original invoice → Create credit invoice.
- Adjust quantities on the credit (default = mirror of original).
- Save. You now have a positive original and a negative credit; the net is what the customer owes.
The credit invoice gets its own number and PDF.
Internal orders¶
For phone orders, walk-ins, or anything you place on behalf of a customer:
- Customers → Orders → New internal order.
- Pick the customer (or create one).
- Add lines: search the product catalog, pick variant + qty. You can override the price per line (for negotiated discounts).
-
Pick payment method:
- Invoice - generates an invoice with 15-day terms.
- Card (manual) - you've taken the payment offline.
- Cash / Bank transfer - same.
-
Save. The order is placed under source=internal.
Internal orders don't trigger Nets checkout (no card prompt). They DO trigger the order confirmation email if you tick "send email".
Pro-forma invoice import (CSV)¶
For migrating legacy invoices into the new accounting system:
- Prepare a CSV with columns: customer_email, order_number, invoice_number, issued_at, due_at, line_description, qty, unit_amount, vat_rate, currency.
- Finance → Accounting → Import proforma → upload CSV.
- We dry-run first (preview which rows will create what); confirm to apply.
Imported invoices are flagged source=proforma - they don't generate new PDFs, don't send emails. They're for accounting completeness only.
Abandoned carts¶
If a customer adds items but doesn't complete checkout, after a delay (default: 24h) our system emails them a recovery link.
Customers → Abandoned carts shows:
- Cart created at.
- Customer email (if known) or anonymous session.
- Last activity.
- Email sent at + opened?
- Converted? (did they later place an order from this cart?)
You can manually trigger an email from the row, or just wait for the scheduled job.
Common gotchas¶
- Order numbers are forever: cancelled orders keep their number. Don't reuse.
- Invoices on cancelled orders aren't deleted: credit them instead.
- Payment terms are capped at 15 days: even if a customer's account is set to 30 days, the invoice will show 15. Hard limit.
- OCR reference uniqueness: every invoice gets a unique OCR. We use MOD-10 checksum so banks accept it.