# CLOUDYTE F&B ADVANCED PACK (restaurant, bar, kitchen)
Goal: 5-star restaurant service and tight stock control. Selling line: "Know every naira, even when you're not there."
Comes AFTER the F&B extras block. Group A first, then Group B. Group C only on a VPS.

RULES FOR EVERY PART
- Inspect first: restaurant POS, new till, KDS, modifiers, recipes, stock items, stores, stock counts, requisitions, SG8 cost %, waste register, bar measures, L1 leakage radar, L2 transfer verification, Guest360, notification log, audit log. Reuse; no duplicates.
- Each part its own small run, OFF by default, guarded install, full gate ALL PASS, money checksum f944cdcdf472 unchanged unless I approve, own commit, HANDOVER.
- Stop and ask before any change to prices, tax, money posting, ledger or the checksum.
- Never delete sales, stock or money records: void or reverse with a reason (5-255), audited.
- Nobody approves their own transaction, Super Admin included. Auditors are read-only.
- Credentials and API keys only in .env.
- No installs between 23:00 and 00:30. Literal rm paths only.

FA0 - GAP REPORT FIRST (no code): Built / Partial / Missing for each part below, DB changes, risks, order, time estimate. Stop for approval.

=== GROUP A (do first) ===

FA1 - EXPECTED VS ACTUAL STOCK (variance)
- Per outlet store and per period (shift, day, week): opening stock + received/issued in - expected use (recipes x sales, bar measures, waste register, comps/staff meals) = expected closing; compare with the stock count.
- Show variance in quantity, naira and %, per item, per outlet, per shift, with who was on duty.
- Tolerance per category (e.g. food 2%, drinks 0.5%); above tolerance = a flag that feeds the L1 leakage radar.
- A flag is explained by someone other than the outlet staff on duty; GM or Income Auditor closes it.
- Shows which menu items have no recipe (they make the variance blind).
- Read-only report; no ledger posting.

FA2 - MENU ENGINEERING REPORT
- From SG8 recipe cost and sales mix, per outlet and period: each dish's sales count, menu price, cost, margin, cost %, popularity.
- Classify: Star (popular, high margin), Workhorse (popular, low margin), Puzzle (unpopular, high margin), Dog (unpopular, low margin).
- Suggestions only (push, reprice, re-recipe, drop); never changes prices.
- Read-only; Print and Excel export check the export permission.

FA4 - WAITER / CASHIER PERFORMANCE
- Per staff and period: sales, covers, average per cover, items per order, top sellers, voids, cancels after send-to-kitchen, discounts, comps, refunds, average service time (KDS), complaints.
- Highlights staff above the void/discount tolerance.
- Read-only; staff can see only their own; managers see all.

FA5 - RETURNABLE EMPTIES (bottles and crates)
- Per drink stock item: returnable yes/no, deposit per bottle and per crate (set by GM, audited).
- Sale with deposit: deposit shown as a separate line, not revenue (held as a liability).
- Returns: guest or supplier returns empties; deposit refunded or credited; counts of empties in stock per store.
- Supplier side: empties returned to supplier against deliveries; difference flagged.
- Empties count in stock counts; missing empties = a variance flag.
- Reuse ideas from the Cloudyte POS ReturnableEmpties module; do not copy code blindly.
- Touches money: show me the posting plan and stop for approval before building.

FA7 - RECEIPT CHECK CODE
- Each printed receipt carries a short code and QR.
- A check page (login required for staff; a public page showing only "genuine / not genuine, date, outlet, total") confirms the receipt is real and not voided.
- Reprints are marked "COPY" with count; voided receipts show VOID.
- Never shows guest personal data.

=== GROUP B (after Group A) ===

FA3 - QR TABLE ORDERING
- QR per table (reuse room/table QR list). Guest sees the menu with prices including tax as configured, picks items and options, sends.
- The order goes to the waiter's screen as "pending"; a waiter confirms before it reaches the kitchen (no direct-to-kitchen from guests).
- Rate limit and table session code to stop prank orders.
- Payment stays with staff (cash, POS, transfer pending verification through L2).

FA6 - HAPPY HOUR, COMBOS AND SET MENUS
- Time-based prices (days and hours) and combos / set menus defined by the GM; menu approval applies.
- The till applies them automatically; cashiers cannot change prices.
- Report: promo sales and discount value. Stop and ask before anything that changes how prices or tax are calculated.

FA8 - TABLE BOOKINGS WITH DEPOSITS
- Book a table: date, time, guests, area, phone, notes; link to Guest360 if the guest exists.
- Optional deposit; transfer deposits follow L2 (pending until verified).
- No-show rule and deposit forfeit need a supervisor with reason.
- Table plan shows booked tables; reminders through the notification log.

FA9 - ALLERGEN AND DIET TAGS
- Tags per dish (nuts, shellfish, gluten, dairy, egg, pork, halal, vegetarian, spicy level).
- Shown on the menu and QR menu; printed in bold on kitchen tickets and the KDS.
- Guest allergy note on the order (and from Guest360, with consent) highlighted on the ticket.

FA10 - PREP SHEET
- Each morning per kitchen: suggested prep quantities from average sales by weekday, occupancy forecast, banquet events and table bookings.
- Par levels per item; chef can adjust; creates a requisition draft (SG9) - never issues stock by itself.

FA11 - COURSES, HOLD-AND-FIRE, SEAT NUMBERS
- Items get a course (starter, main, dessert) and a seat number.
- "Hold" keeps a course off the KDS until the waiter "fires" it; KDS shows course and seat.
- Bill can split by seat.

=== GROUP C (only after moving to a VPS) ===

FA12 - OFFLINE TILL
- Till keeps taking orders when the internet drops (local queue), prints kitchen tickets locally, and syncs when back.
- Unique offline receipt numbers per device; duplicates refused on sync; every offline sale audited.
- Not for shared hosting. Gap report only until we move.

ORDER: FA0 gap report -> FA2 -> FA4 -> FA7 -> FA1 -> FA5 (needs my approval on posting) -> FA9 -> FA6 -> FA3 -> FA8 -> FA10 -> FA11 -> FA12 (VPS only).
(FA2, FA4 and FA7 are small and read-only, so they go first; FA1 needs recipes filled in.)
