N NoBullshit.wiki 中文

Fast food restaurant purchasing - order quantity calculator tool: coverage to next delivery, case-pack round-up, and a red light whenever shelf life cannot cover the order cycle

Works with:Claude / GPT-4 classCategories:Fast Food RestaurantLevel:Advanced Updated

You are a coding agent building internal tools for a
fast food restaurant. Build a single-file HTML tool
(inline HTML, CSS, JS; no external dependencies, no
network requests; opens by double-click) that
computes suggested order quantities per SKU for the
person who places orders.

Item sheet (rows add/removable; handle at least
[80] SKUs without lag):
SKU name / unit / average daily usage (my [4]-week
average, typed in) / on-hand / inbound / delivery
interval (days between deliveries; may differ by
supplier) / safety days / case pack (units per case;
blank = loose ordering) / shelf life in days

Calculation logic (must be shown in a "Method"
section on the page, with plain-language formulas):
- Coverage days = delivery interval + safety days
- Theoretical qty = average daily usage x coverage
  days − on-hand − inbound; negatives clamp to 0
  with a note "already covered - skip this cycle"
- Case round-up: items with a case pack round up
  to whole cases, and the tool displays how much
  the round-up added
- Red-line warning (takes precedence over every
  other output): if shelf life < coverage days x
  [1.2], the row turns red with "at this cycle the
  item will expire before it is used - shorten the
  delivery interval or cut the order size," and
  this warning is displayed before the suggested
  quantity
- Any input change recalculates live; no separate
  "calculate" button

Output area:
- Suggestion table: SKU / theoretical qty / rounded
  qty / covered-until date / warning flag - with
  "stockout risk" (suggested qty is 0 but stock
  will not last to next delivery) and "expiry
  risk" sections pinned on top
- Order sheet export: printable full page with date
  and buyer signature line

Hard requirements:
- No external CDN, fonts, or icons; no network
  requests; data never leaves the machine
- Input data can be saved to a file and re-imported
  (JSON or CSV) so next order day needs no re-entry
- Clear-all and undo-last-paste operations included
- No sales forecasting, no "AI suggestions" - this
  tool does arithmetic and raises warnings; a
  transparent method is requirement number one

Why it is written this way

The shelf-life red line takes precedence over the quantity output because that is what separates this from "a multiplication table." Most ordering tools do not fail by computing wrong numbers - they fail by producing a number so confident that people copy it, and for short-shelf-life items that number is poison: order a 3-day item on a 7-day coverage cycle and the more accurate the formula, the more you throw away. So the check runs before the suggestion: a rule-level error (cycle conflicts with shelf life) must stop the human with a red row, not be computed more precisely.

Showing "how much the round-up added" separately matters because round-ups are an invisible waste source: for a slow-moving item with a large case pack, one round-up can add half a case, which on short-shelf-life items converts directly to waste. Making that number visible is what lets the buyer go negotiate a smaller pack size with the supplier - or decide to skip this order and merge into the next cycle - but only if the loss is in front of their eyes.

The coverage-days structure lives in the visible "Method" section for the same reason as every transparent-method tool: the day an owner asks "where did this number come from" is the day this tool dies unless the answer is on the page. Formulas, round-up rules, and the red-line threshold are all visible and adjustable. Save/import matches the real cadence too - the item sheet changes monthly, and a tool that demands full re-entry every order day gets used exactly once.

Variables

Variable Notes
Daily usage basis How many weeks, and whether outlier days are trimmed - align the convention with the store's actual waste and stockout history, and write it into the Method section
Safety days Buffer for delivery slippage and demand noise - the less reliable the supplier, the larger this grows; every added day also raises expiry risk on short-shelf-life items
Shelf-life red-line factor 1.2 is the default margin; tighten to 1.0 for the shortest-life categories - a red light that fires often enough to force a delivery-frequency conversation beats silent expiry

orderingtoolinventory management