| | 14 | == Views |
| | 15 | |
| | 16 | [[attachment:views.sql]] |
| | 17 | |
| | 18 | === View description |
| | 19 | |
| | 20 | * `vw_order_overview` — Shows every order with its waiter, table, order type, and status. Your main "what's going on" summary. |
| | 21 | * `vw_order_items_detail` — Breaks down each order into its individual products with quantities, unit price, total price, and who prepared it. |
| | 22 | * `vw_invoice_summary` — Financial snapshot per invoice — total, tax, and net amount, linked to the order and waiter. |
| | 23 | * `vw_active_menu` — Everything currently on the menu with prices and member types. Only shows active menus. |
| | 24 | * `vw_table_availability` — Lists all tables with their type, capacity, and whether they're available. |
| | 25 | * `vw_inventory` — Current stock levels for every stored product, showing quantity and its base unit. |
| | 26 | * `vw_todays_reservations` — All reservations for today sorted by start time, with guest info and which employee handled it. |
| | 27 | * `vw_revenue_per_waiter` — Sales performance per waiter — total orders, total revenue, and average order value. |
| | 28 | * `vw_product_usage_history` — Full log of stock movements per product, showing how much changed, when, and whether it was a positive or negative change (via ct.Sign). |
| | 29 | * `vw_active_staff` — All currently employed staff (no resignation date) with their role and permissions. |