# Hotel POS Update — 28 November 2026

This update builds on the supplied `CHECKLABS_HOTEL_POS_REPORT_NULL_FIX_2026-11-25(1).zip` and the supplied `jagycyud_phoria.sql` schema.

## Changes

1. **Butchery product-style stock screen**
   - Butchery screens now identify stock by meat product name (for example, Goat Meat or Cow Meat), not by batch number.
   - Batch records remain internal so historical cost, FIFO stock deductions, receiving wastage and stock valuation remain traceable.
   - Sales and wastage are deducted from the oldest available internal stock records for the selected meat product.

2. **Multiple expense rows and analysis**
   - The general Expenses form accepts multiple rows in one submission (up to 30).
   - Each row has its own category, date, amount, payment method, payee, description and optional receipt attachment.
   - Rows are saved in one database transaction and retain the existing pending-approval workflow.
   - Expense analysis on the Expenses page groups this month's entries by category and shows count and total amount.

3. **Sales movement analysis**
   - Sales report now ranks fast-moving products by quantity sold.
   - A daily quantity trend chart is shown for the leading products in the selected reporting period.
   - Fast-moving product results are also included in the sales report export.

4. **Branch-specific POS selling prices**
   - Restaurant POS menu and search results display the active branch's `branch_product.selling_price` where set.
   - Bar POS menu displays the active branch's selling price.
   - The POS transaction services already resolve the effective branch price when adding an item; this update aligns the visible POS price with the saved transaction price.

5. **Consolidated branch Profit & Loss**
   - Financial report now shows one branch-wide result rather than separate Restaurant and Bar P&L blocks.
   - It consolidates restaurant/floor orders, bar tabs, butchery sales and guest-room payments.
   - It includes approved general expenses, guest-room expenses and butchery expenses.
   - It provides a product/income profitability table with quantity, sales, cost and gross profit.
   - Filters include Today, This week, This month, This year and Custom date range.

## Database / deployment

- No schema migration is required for these changes; the supplied SQL already contains the required branch, butchery, expense and guest-room tables/columns.
- Back up the application files and database before deployment.
- Preserve the production `.env`, uploaded files, storage contents and customer branding.
- Upload the updated application files and run `php artisan optimize:clear` after deployment.

## Validation performed

- PHP syntax checks passed for all modified controllers and the period resolver.
- The supplied SQL schema was inspected for the relevant table/column names.
- ZIP integrity should be checked after packaging.
- Full Laravel Blade/runtime validation could not be completed in this build environment because PHP extensions `mbstring` and `dom` are unavailable. Run the report screens and multi-row expense submission in staging before production rollout.

## Important accounting note

Guest-room income is included from actual guest-room payment records (`guest_room_payments`), not the booking's full face value. Butchery cost of sales is calculated from the internal receiving-cost records. Main expenses continue to enter P&L only after approval; guest-room and butchery expense tables do not have an approval-status field in the supplied schema and are included as recorded.
