# CHECKLABS POS stock and billing fixes — 11 November 2026

- Fixed undefined `$departmentSlug` in StoreProductRequest validation.
- Single-branch opening stock can use the branch's canonical stock store without choosing a separate store.
- Stock service locks rows during adjustments, blocks negative non-sale adjustments, and continues to respect overselling setting for sales.
- Waiter item posting now checks stock-controlled products against the active branch's canonical stock, counting items already on the same order, unless overselling is enabled. Errors are shown rather than causing a server exception.
- Stock transfer checks canonical source branch stock and reports when older department stores still hold stock; the existing migration consolidates old store balances. Source is deducted and destination credited in one transaction.
- Stock transfer quantity inputs are wider and responsive.
- Stock Adjustments is a separate sidebar page with its own history, separate from the Stock on Hand listing.
- Direct billing with payment now redirects back to the POS order and provides a receipt-print URL instead of routing through held-order printing.
- Restaurant POS sidebar label is now 'POS'.
- POS catalogue stock sums use the canonical branch stock store, and merge-candidate query is limited to the active branch.

## Deployment
Back up the database and site. Run `php artisan migrate --force`, then `php artisan optimize:clear` and `php artisan optimize`. The existing 2026_11_10_000001 migration consolidates legacy department store balances. If it already ran before legacy stock was added again, investigate those balances before another transfer; this package does not silently merge potentially duplicated quantities.

## Limitations
Static PHP lint passed. No live DB/browser testing was possible. The precise cause of the reported direct billing exception was not provided, so its redirect path was corrected but other billing exceptions may require the Laravel log. Stock checks on recipe products remain governed by ingredient consumption on billing, not reservation at posting.
