Overview
Cashiers in the Point of Sale interface normally cannot see how much stock is actually available, and the quantities loaded when a session opens quickly go stale as sales orders, purchases and other tills move the same inventory. This module paints a colour-coded availability badge directly on each product card and keeps it accurate by re-fetching the true free-to-use quantity from the database. The badge turns green when stock is on hand, red at zero, and shows an infinity symbol for non-storable products such as services, giving the till operator an at-a-glance signal before adding an item to the order.
Key Features
- Displays a live free-to-use stock quantity badge on every product card in the POS product screen.
- Colours the badge green when quantity is positive and red when it hits zero for instant visual warning.
- Shows an infinity symbol on services and other non-storable products that never run out.
- Re-reads the real free quantity from the database instead of trusting the snapshot loaded at session start.
- Refreshes badges automatically every 60 seconds so figures stay current as other channels move stock.
- Refreshes instantly when the cashier changes category or types a product search.
- Re-checks availability for the items just sold right after an order is validated.
- Exposes a summed free_qty on the product template by aggregating across its variants.
- Fails silently on transient connection errors so the POS screen is never blocked.