Workshop System Guide
How a job gets into the shop, how capacity is counted, and what to check when the numbers look wrong.
1. The one rule
Every job takes a real place in the shop. Whichever way it arrives, the system:
- Works out how many hours the job costs (never zero).
- Checks the chosen day has those hours free.
- Puts the job in the calendar in the first free gap between 09:00 and 17:00.
- Takes the same hours off the day and off the weekly gauge.
Both brands (Samco and Van Seats) share one pool of hours. A Van Seats fitting uses Samco shop time.
2. The four ways a job gets booked
- Enquiry → Book — a customer said yes to a date. Checks parts, airbag warning, deposit and capacity, then books the day and a slot.
- Invoice → Release to Workshop — invoice raised, job goes to production. Creates (or reuses) the job and books its hours on its date, or the next day with room, in an auto-placed slot.
- Booking Inbox → Confirm — a booking request that came in by email. Books the slot and hours before anything is sent to the customer.
- Shop Capacity → Add Job — walk-ins or anything entered by hand. Creates the job and books its hours on the day.
All four use the same checks, so they can't disagree.
3. How many hours a job costs
The system takes the first of these it finds:
- Hours you typed in when booking.
- The job's own estimated hours.
- The labour hours set on the invoice.
- A standard figure for the job type (for example Single Seat Trim 6h, Full Interior 40h, repair 3h).
If it had to use the standard figure, you'll see a note saying so — edit the job and put the real hours in.
4. How capacity is counted
- Weekly hours come from the Shop Capacity setting.
- Daily hours = weekly hours ÷ 5 working days.
- Staff absences reduce the day. If a staff member is off (absence, approved leave, or an all-staff block), their hours are taken off that day's capacity before any booking is checked. With no absences recorded, the day is unchanged.
- A day's used hours = every booked job on that day (not cancelled, not rejected, not a draft).
- The weekly gauge on Shop Capacity uses the same hours as the calendar.
Cancelled bookings give their hours back to the day.
5. When a day is full
You'll see a message listing why (for example "Tuesday has 2h left and this job needs 6h").
- Cancel — nothing is booked. Pick another date.
- Type a reason — the job is booked anyway, but only by an authorised admin (the owner's accounts). The reason, who booked it, and when are written on the booking so it's never hidden later.
Weekends are treated the same way: allowed only with a reason.
6. The calendar and Google
- Each booking gets a start and end time, placed in the first free gap of the day.
- A job longer than one working day is split across consecutive working days — each day gets its own slot and its own block of hours, and the weekly gauge counts the full job once. You confirm the start date; the split is automatic.
- If there is no free gap left, the slot overlaps and you're warned.
- Timed bookings go to Google Calendar through the normal two-way sync. The same booking is updated, never copied.
- Moving a booking in Google moves the job too. If you drag a booking to another day in Google Calendar, the linked job's date follows on the next sync — the workshop board and the gauge stay in agreement.
7. Troubleshooting — the blind spots we closed
- Released invoices took 0 hours off the day. Release never passed the hours to the calendar. Now it books the invoice's labour hours.
- Gauge showed jobs as 4h whatever their size. The gauge ignored invoice labour hours. Now it reads the same hours as the calendar.
- Booking Inbox overbooked days. Confirm never checked capacity. Now it checks first and asks for a reason if full.
- Manual jobs never showed on the day. Add Job only made a job card. Now it books the day too.
- Undated backlog on Shop Capacity. Jobs created before this fix have no date. Release the invoice again (or re-add the job) to give it a slot.
- Old bookings had no hours. Bookings made before the fix carried zero hours, so the day ledger read empty even when the shop was full. A one-time backfill gave every live Job Booking a real hour figure and a slot.
- Big jobs overran one day. A 30-hour job used to sit on a single day. Now jobs longer than one working day split across consecutive working days automatically.
- Staff absences were ignored. A day with two staff off still showed full capacity. Now approved absences, leave and all-staff blocks reduce that day's capacity before bookings are checked.
- Moving a booking in Google left the job behind. The calendar changed but the job kept its old date. Now a booking moved in Google moves the linked job's date on the next sync.
Gauge and calendar don't match? The job was probably created before this change. Releasing it again (or re-adding) books it properly.
8. For whoever maintains the system
- One backend check does all of this: reserveWorkshopSlot. Every booking path calls it.
- Capacity setting: ShopCapacityConfig (weekly hours).
- Day slot: CalendarEvent (hours_required, start_time, end_time).
- Weekly gauge: Job (estimated_labor_hours).
- Override reasons are appended to the booking's notes, starting CAPACITY OVERRIDE.