N NoBullshit.wiki 中文

Fast food inventory count specialist - variance report generator tool: unit and dollar variances side by side as dual gauges, over-threshold rows auto-sorted into the re-count list, and the printout ships with signature lines

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 generates the variance report
for the inventory count specialist after a count.

Input area:
- Paste box: paste straight from a spreadsheet
  (tab-separated), columns: item / unit / book
  qty / counted qty / unit price
- Threshold settings (adjustable): two lines per
  category - a quantity line (e.g. ±3 units) and
  a value line (e.g. ±100); category comes in as
  a data column or gets tagged by hand afterwards
- Optional: last month's variance table in the
  same format - only with it can "two consecutive
  months same direction" be computed

Calculation and classification (must be shown in
a "Method" section on the page):
- Per row: variance qty = counted − book;
  variance value = variance qty x unit price;
  variance rate = variance value ÷ book value of
  the item (book value zero: show the value only,
  rate "—" - never divide by zero, never print
  infinity)
- Dual gauges side by side: the quantity and
  value variance columns always render together;
  default sort by absolute value, with a toggle
  to sort by quantity
- Auto re-count list; a row enters if it meets
  any one of: over the quantity line, over the
  value line, or same-direction variance two
  months running (needs last month's data)
- Surplus and deficit subtotal separately - no
  merged "net variance" total, ever; three big
  numbers at the top: total surplus value /
  total deficit value / count of rows needing
  re-count

Output area:
- Variance detail table: item / unit / book /
  counted / variance qty / variance value /
  variance rate / verdict (normal / re-count /
  repeating) - only rows with variance; flat rows
  are not listed
- Re-count list: a separate table, the core
  printed page - with blank "re-counted by /
  date / re-count result" lines at the foot,
  ready for the archive straight off the printer
- Method section: formulas, thresholds, and
  classification rules in full

Hard requirements:
- No external CDN, fonts, or icons; no network
  requests; data never leaves the machine
- Handle at least [300] pasted rows without lag
- Clear-all and undo-last-paste included
- Export: detail table and re-count list each
  printable as a full page, sized for signing
  and filing
- No charts, no trend forecasting - this tool
  does reconciliation arithmetic and sorting; a
  transparent method is requirement number one

Why it is written this way

Dual gauges with netting banned is the most consequential design decision in the tool. Variance reads two completely different ways: by count, bulk low-value items (boxes, cups, drinks) dominate forever; by value, one miss on a high-price short-shelf-life item (meat, oil) outweighs half a year of everything else. Sort by count alone and the money is invisible; sort by value alone and the loss surface is invisible. The ban on a "net variance" total goes further, because netting is administratively convenient and managerially catastrophic: receiving/posting errors (the usual surplus source) and real leakage (the deficit side) are two different problems, and one net number cancels both wires - which is exactly why hand-era variances never got resolved.

"Two consecutive months same direction" as the third entry condition for the re-count list turns monthly counts from isolated events into a trend: 2 units off in one month is nothing; 2 units off two months running is a system - but nobody cross-references two months of two tables by hand, while the tool needs one paste. The watch list surfaces itself instead of depending on the specialist's memory.

The re-count list with signature lines as the core printed page reflects the tool's real delivery endpoint: the downstream of a variance count is re-counting (fresh eyes) and archiving (traceability), and the report has to go from printer to folder without retyping. The boundary is drawn there too - arithmetic and sorting only. Adding "AI-generated variance explanations" would salt the report with plausible, uncheckable stories that dilute the credibility of the numbers themselves.

Variables

Variable Notes
Dual thresholds Quantity and value lines per category - tighten the value line and loosen quantity for high-price items, the reverse for low-value bulk; run two months loose before tightening
Last month's variance table Powers the "same direction" test - export and keep every month's output; next month it pastes back in as trend data
Category tagging A category column in the data, or post-hoc manual tags - untagged data forces one global threshold pair and coarser sorting

inventory counttoolvariance report