# CLOUDYTE LEAKAGE GUARD - NIGERIA REVENUE PROTECTION PACK
Selling line: "Know every naira, even when you're not there."

RULES FOR EVERY PART
- Inspect existing code first; reuse existing tables (rooms, room status, housekeeping, key manager, payments, settlements, bank statement import, notification log, expenses, night audit). No duplicates.
- Each part is its own small run, OFF by default, guarded install, full gate ALL PASS, money checksum unchanged unless the owner approves, own commit, HANDOVER.
- Nothing is ever deleted; every flag, override and explanation is audited with user, time and reason.
- Nobody explains or clears their own flag (Super Admin included).

L0 - GAP REPORT FIRST (no code): mark Built / Partial / Missing for each part below, list database changes, risks, and a run order. Stop for approval.

L1 - LEAKAGE RADAR (rooms used but not sold)
- Every morning (after the night audit) compare, per room, for the closed business day:
  a) signs of use: housekeeping marked the room dirty/cleaned/serviced, a key was issued, linen/amenities issued to the room, minibar or room-service charge, room status changed from vacant clean;
  b) a recorded sale: an in-house stay, day use, hourly stay, comp or house-use record covering that room and time.
- Any room with (a) but not (b) = a flag, with the evidence (who cleaned, which key, which staff on duty at the desk).
- Also flag: room status changed vacant->dirty with no checkout that day; check-in then cancel within N minutes; room moved to "out of order" and back within one day with signs of use.
- Flags list: open / explained / confirmed loss / false alarm. Explaining needs a reason (5-255) by someone other than the desk staff on duty; the GM or Income Auditor closes it.
- Settings: on/off, which signals count, minutes threshold. Shown on the night audit report and the owner report.
- Housekeepers must record each room they service (existing task sheet / my rooms console) - if not on, the radar warns that it is blind.

L2 - TRANSFER AND POS VERIFICATION
- Payments by bank transfer and POS/card are saved as PENDING VERIFICATION, not as received cash.
- Verified only by: (1) matching a bank statement import line or provider settlement (Moniepoint, OPay, Palmpay, Paystack), amount and date within tolerance; or (2) a supervisor/accountant (not the person who took the payment) confirming with the bank reference, audited.
- Optional: Paystack / provider webhooks where an API key is configured (keys in .env only, never hard-coded).
- Check-out with only pending transfers needs a supervisor override with reason; the night audit lists unverified payments; ageing after 24/48 hours.
- Reports: unverified payments by cashier, duplicate references (the same transfer reference used twice), mismatched amounts.
- Do not change how verified cash is posted; checksum must stay identical with the feature off.

L3 - OWNER'S MORNING WHATSAPP REPORT
- One message at a set time (default 07:00 Lagos) after the night audit closes, to the owner/GM numbers configured by the Super Admin.
- Contents: business date, rooms sold / occupancy %, ADR, room revenue, F&B revenue, total revenue, cash collected, transfers verified vs unverified, discounts, voids, comps, refunds, cashier shortages/overages, leakage radar flags, diesel cost per occupied room, high balances, night audit status, any blocking issues.
- Channel through the existing notification log; provider configurable (WhatsApp Cloud API or a Nigerian provider such as Termii); email fallback. Credentials in .env.
- Link to a phone-friendly read-only page (login required) with the same figures.
- If sending fails, retry and record it; never send guest ID or personal data.

L4 - SHORT STAYS AND HOURLY ROOMS
- Check what exists first (day use, early/late fees).
- Hourly / short-rest rates per room type (e.g. 2h, 3h, 4h blocks) set by the GM; price, tax and service charge like a normal stay.
- Start and end time recorded; the room turns "due out" at the end; overstay alerts to the desk and supervisor; overstay charged by the configured rule, waiver needs approval with reason.
- Counted correctly in occupancy, night audit, police report and the leakage radar.
- Never lets a short stay be recorded after the guest has left (no back-dating beyond N minutes without approval).

L5 - DIESEL AND POWER COST
- Daily generator log: generator, start/stop hours, litres added, litres in tank (dip reading), litres used, price per litre, supplier/receipt, recorded by.
- Fuel purchases linked to expenses/stores (no double posting).
- Daily: litres per running hour vs the generator's expected rate; energy cost per occupied room; grid (PHCN/DisCo) bill entry optional.
- Warnings when litres per hour or cost per occupied room is above the set tolerance, or tank readings don't add up (possible theft).
- Shown on the owner report and GM dashboard.

ORDER: L0 gap report -> L2 -> L1 -> L3 -> L4 -> L5 (L2 first because it protects cash directly; L3 last of the money ones because it reads the others).
