Route Delivery
Route Delivery groups every delivery order scheduled for a chosen date by delivery route, so you can hand a driver a single packing list, mark orders delivered as they go out, and log any unsold items they bring back at the end of the run.
Overview
Pick a date and the page loads that day's delivery orders, then automatically groups them by their Delivery Route field — orders with no route set are grouped under "No Route Assigned".
Each route is shown as a collapsible card with its own order count, line-item count, total value and a "pending" count of orders not yet delivered; a "Mark all delivered" shortcut appears until every order in that route is done.
Every order row can expand to show its line items (product, quantity, unit, line total), and shows a Delivered button that flips just that order's status.
A dedicated Log driver return flow lets you record unsold items a driver brings back from a route — each logged item posts to the Wastage Log and adjusts inventory in the same step.
Before You Start
- Requires the Enterprise plan tier; below Enterprise, Route Delivery is hidden from the Bakery sidebar entirely.
- Delivery orders must exist with an order date matching the date you have selected, or the page shows an empty state.
- Set a Delivery Route value on delivery orders if you want them grouped under a named route instead of "No Route Assigned".
Step-by-Step Guide
1 Review today's (or any date's) routes
- Use the date picker at the top (defaults to today) to choose which day's deliveries to view.
- Read the summary bar: Total orders, Routes, Delivered x / total, and Total value.
- Click a route card's header to expand or collapse its list of orders; click again to collapse.
2 Work through a route and mark deliveries done
- Expand a route card to see each order — customer name, order number, status badge, and any notes.
- Click the "N items · ₹total ▼" line on an order to expand its individual line items (product × quantity, unit, line total).
- Click Delivered on an order once it is handed over — its status flips immediately.
- Use Mark all delivered in the route header to close out every remaining order on that route in one click; this button disappears once the whole route is done.
3 Print a packing list
- Click Packing list on a route, or Print all in the page header, to open your browser's print dialog.
- The printed sheet shows a "Packing List — {date}" header and the order/route counts; everything else on the page is hidden from the printout via print-only styling.
4 Share a driver-facing link
- Click Driver link to copy a link (pointing at a driver view for the selected date) to your clipboard.
- If your browser blocks clipboard access, a prompt dialog appears instead with the link ready to copy manually.
5 Log a driver return
- Click Log driver return to open the return form for the current date.
- Optionally enter the Driver name.
- For each unsold item, search for and select the Product (or type a name directly), enter the Qty and Unit, and choose a Reason: Stale, Damaged, Customer Refused, Overstock, or Other.
- Click Add item to log more than one product in the same return, and remove a line with the ✕ icon (only enabled when there is more than one line).
- Add any Notes, then click Log Returns — each valid line (with both a product name and a quantity) is posted to the Wastage Log, adjusting inventory as part of the same action.
Every Field & Button, Explained
| Field / Button | What it does |
|---|---|
Date picker | Chooses which day's delivery orders to load and group into routes; defaults to today. |
Log driver return | Opens the Driver Return form for logging unsold items brought back from deliveries. |
Driver link | Copies a driver-facing link for the selected date to the clipboard (or shows it in a prompt if clipboard access fails). |
Print all | Opens the browser print dialog for the whole page (print-only view shows a packing-list header and the order/route summary). |
Summary bar — Total orders / Routes / Delivered / Total value | Aggregate counts and value across every order loaded for the selected date. |
Route card header | Shows the route name (or "No Route Assigned"), order count, line-item count, total value, and a pending-orders count; click to expand/collapse. |
Mark all delivered | Marks every non-terminal order on that route as Delivered in one action; hidden once the route has no pending orders left. |
Packing list (per route) | Triggers the same whole-page print as Print all. |
Order row | Customer name, order number (or #id), status badge, and a truncated note if one was recorded on the order. |
Status badge | New, Confirmed, Preparing, Ready, Out (for delivery), Dispatched, Delivered, or Cancelled — colour-coded per status. |
"N items · total ▼/▲" | Toggles the order's line items open/closed within the row. |
Delivered button | Marks a single order as Delivered; hidden once the order is already Delivered or Cancelled. |
Balance due (on a row) | Shown in red only when the order still has an amount outstanding. |
Route totals footer | Route total value and total balance due, shown at the bottom of an expanded route card. |
Driver Return — Product search | Type-ahead search against your product catalogue; free-typed text is still accepted even if no match is picked. |
Driver Return — Qty / Unit / Reason | Quantity returned, its unit, and the return reason (Stale / Damaged / Customer Refused / Overstock / Other). |
Add item (Driver Return) | Adds another product line to the same return. |
Log Returns | Saves every valid line as a Wastage Log entry, adjusting inventory in the same step. |
Tips & Best Practices
- Set a consistent Delivery Route value (e.g. "North Zone", "Van 2") on delivery orders so they group meaningfully here instead of piling up under "No Route Assigned".
- Use Mark all delivered at the end of a route run instead of clicking Delivered on every single order.
- Log driver returns the same day the driver gets back — the reason field (Stale/Damaged/Customer Refused/Overstock/Other) is what makes your wastage reporting useful later.
Troubleshooting & FAQ
Everything is grouped under "No Route Assigned".
Print all and a route's Packing list button seem to print the exact same thing.
I logged a driver return but I'm not sure inventory changed.
Driver link button didn't visibly do anything.
No deliveries show up for a date I know has orders.
🧑💻 Developer Notes
Source component(s):
frontend-app/packages/pos-react-lib/src/pages/fnb/RouteDeliveryPage.jsx
Backend endpoints used:
GET /bakery/delivery-orders?date=PATCH /bakery/delivery-orders/:id/statusPOST /bakery/wastageGET /products
Related tables (db-core repositories):
BakeryOrderBakeryWastageLogProduct
Feature flag key: route_delivery (requires enterprise plan tier or above)
Orders are grouped client-side by the deliveryRoute field returned from GET /bakery/delivery-orders; cancelled orders are filtered out before grouping. The component accepts an apiBase prop (default /bakery). Driver Return items are sent as one POST /bakery/wastage call per line item (not a single batched call), each carrying a combined note of the route name, driver name and any free-text notes so the Wastage Log entry is traceable back to this delivery run.