- checkoutSale's stock-availability loop called pb.getOne() with no try/catch, so a stale/deleted stock_item_id in a persisted cart threw all the way up to a bare 500 with no useful message. Now caught and returned as a clear pb_error the till can display. - Removed the insufficient-stock block entirely: the till is used ahead of a physical stock take, so a sale must never be blocked for lack of stock — current_qty is now allowed to go negative and gets corrected at the next stock take. Drops the now-dead insufficient_stock/shortages branches from the route, service types, and client error handling. |
||
|---|---|---|
| .. | ||
| (app) | ||
| (auth) | ||
| (counter) | ||
| (mobile) | ||
| (print) | ||
| (tv) | ||
| api | ||
| favicon.ico | ||
| globals.css | ||
| layout.tsx | ||
| offline.tsx | ||
| page.tsx | ||