Shipments
A shipment is the unit of work: who sends what to whom, in how many parcels, and where it is right now.
The form
Sender and recipient carry a name, street, postal code, municipality, phone and e-mail. Typing a postal code resolves the address through the geo lists — the municipality, its district and region, the point on the map — and shows the zone the recipient falls into with its next served days. An unknown code keeps what was typed and flags the shipment unresolved; a resolved place without a zone flags it unzoned. Both flags are visible on the board and the list, and both clear on edit.
Parcels carry a weight, dimensions and a temperature regime (ambient, chilled, frozen); the shipment's regime is the strictest of its parcels. A customer (one of the firm's partners) and a service are optional; a walk-in shipment names nobody.
The plan
On saving, the shipment gets the recipient's zone, the first served
day after the cutoff as its delivery day (never before a requested
day), the zone's window, and a number — ACME-2026-000123K,
unique across the installation, never reused.
The status machine
| From | To | Who |
|---|---|---|
| received | planned | dispatcher, the route builder |
| received, planned | cancelled | dispatcher, the customer (before pickup) |
| planned | picked up | driver, dispatcher |
| picked up | at depot | driver, dispatcher, the route start |
| planned, at depot | out for delivery | the route start, dispatcher |
| out for delivery | delivered | driver, dispatcher |
| out for delivery | failed | driver, dispatcher |
| failed | planned | dispatcher (re-plan) |
| failed | returned | dispatcher |
Anything else is refused with the list of moves allowed from the current status. Every move writes an event with the actor, the instant, a note and the place — the shipment's timeline, shown on its page and, at municipality precision, on the public tracking page. The shipment page offers exactly the moves the table allows; a delivered move takes the name of the person who signed, a failed one the reason.
Labels
Labels (PDF) prints one page per parcel: the number, a QR code of the tracking address, the parcel index, the regime, recipient and sender.
Mails
The recipient hears of received, planned (with the day), out for
delivery (with the window), delivered, failed (with the reason),
returned and cancelled; the customer of a received shipment hears
too. The wording lives in Configuration → Mail templates under the
keys transport_received … transport_driver_assigned, per installation
and editable; every send is logged on the shipment.
Billing export
Delivered shipments are billed once a month, once each. Shipments → Billing export (dispatch right) shows the month — by default the previous one — with a row per customer: how many shipments were delivered, their total, and how many have no price yet. Create invoice drafts writes ONE invoice draft per customer (and currency) into Documents, with a line per shipment: the tracking number, the recipient and place, the delivery day and the customer's reference. The accountant issues the draft under Documents like any other invoice.
- A shipment without a customer or without a price is skipped and counted in the notice; give it a price (or a customer) and the next export picks it up.
- An exported shipment remembers its document, so running the export twice adds nothing.
- The VAT rate on the lines is the firm's standard rate; the accountant may change it on the draft.
- The trail records every export as transport.billing_exported on the document.