Project

General

Profile

Actions

Feature #257

open
NP NP

Canteen: sell remaining stock across the next slot, with a live quantity count at POS

Feature #257: Canteen: sell remaining stock across the next slot, with a live quantity count at POS

Added by Navya P. about 1 month ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Start date:
10/06/2026
Due date:
% Done:

100%

Estimated time:
Resolved By:

Description

Follow-on idea from Navya, 6 Oct 2026 - needs senior sign-off before building, not started.

Problem: a menu item like Masala Dosa is bound to exactly one MealSlot (Breakfast). If stock remains unsold by the end of breakfast, it cannot be sold at lunch even though it physically still exists - confirmed live against the POS, error: Masala Dosa is only sold at Breakfast; it is Lunch now. Leftover stock becomes wastage instead of revenue.

Proposed rule: an item with remaining quantity can keep selling through the next slot (breakfast into lunch), with a hard stop before evening tea and dinner - never extends that far. Separately, Navya wants the POS to show a live remaining-quantity count per item (e.g. Masala Dosa, 2 left) and refuse an order that exceeds it.

Investigated current code - both asks point at the same real gap: MenuItem has no numeric quantity field at all today, only a manual boolean IsAvailable toggle a cashier flips by hand. There is no link anywhere between what the kitchen cooks and what the POS can sell - no ProductionPlan entity exists, and SaleService never checks or decrements any quantity. AvailableSlot today is a single MealSlotKey, not a set, which is why the slot-extension half also needs a schema change.

Proposed direction (not decided): give MenuItem a real daily quantity count, decremented per sale, with sellability driven by quantity > 0 up to a configured cutoff slot, rather than two separate features. That single change would satisfy both asks at once.

Also flagged for whoever picks this up: a breakfast item held from roughly 8am prep to 1pm sale is 5+ hours of hold time - worth a hygiene/food-safety policy check before building, not just a software decision.

Not scoped or planned yet. Revisit once Navya has discussed with her seniors.

NP Updated by Navya P. about 1 month ago Actions #1

  • Assignee set to Navya P.

NP Updated by Navya P. about 1 month ago Actions #2

  • Status changed from New to Resolved
  • Resolved By set to Navya P.

NP Updated by Navya P. about 1 month ago Actions #3

  • % Done changed from 0 to 100
Actions

Also available in: PDF Atom