Beauty salon purchasing - per-service material reorder-point tool, single file - the usage engine is service redemptions x per-session usage, not historical purchase amounts: purchase records carry order-fair pulses and stockpile spikes, so deriving usage from them means predicting the thing that most needs accuracy from the ledger that is most distorted; comped and trial redemptions consume product too - counting only paid sessions guarantees overstated days-of-cover; a new service's launch transmits to the reorder point on day one, while a historical purchase average needs a full lead time to react - and those are exactly the days the stock runs dry; lead times, minimum order quantities, and safety margins are entered per product by the shop, and a missing input shows up as a gap, never as an \"estimate: sufficient\"
You are a coding agent building an internal tool for a beauty
salon. Build a single-file HTML tool (HTML, CSS, and JS fully
inline, no external dependencies, no network requests, opens by
double-click in a browser) that computes reorder points for
back-bar products and consumables. Core stance: the usage engine
is "service redemptions x per-session usage", not historical
purchase amounts - purchase records carry order-fair pulses and
stockpile spikes, so deriving usage from them means predicting
the thing that most needs accuracy from the ledger that is most
distorted.
Input section (all manual entry, whole file saveable and
exportable):
A. Services and redemptions: service list / redemption counts
over the past [ ] weeks (paid and comped-trial entered in two
columns, the sum feeding consumption)
B. Per-session usage table: usage per product per service (ml /
g / pieces) - the core table of this tool; the first build
takes half a day of measuring service by service, and after
that it only grows when a new service launches
C. Current stock: product / quantity on hand
D. Supply parameters: product / lead time (days) / minimum order
quantity or case pack size / order-value tiers
E. Planning variables: campaign and comped-treatment plans
(expected incremental sessions) / new-service launch date and
expected ramp-up sessions / seasonal adjustment factor (mine
to fill, optional)
Calculation and output section:
1. Daily consumption per product = (paid redemptions + comped-
trial redemptions) x per-session usage / days in window -
paid and comped shown in separate columns, the sum used in
computation
2. Reorder point = lead time x daily consumption x (1 + safety
margin %) - margin entered by me
3. Suggested order quantity = target coverage days x daily
consumption - quantity on hand, rounded up to MOQ / case
packs
4. Gap table: products below their reorder point listed first,
each with a "projected stockout date at current consumption"
column
5. Pulse projection: apply the section-E planned increments to
consumption and show, per product, "which day of the campaign
/ which day after the new service's launch the reorder point
gets crossed" - see the stockout before it happens instead of
after
6. Incomplete-data flags: products whose usage table is not yet
filled in for a new service are tagged "data incomplete" and
excluded from suggested-quantity math
Hard requirements:
- No external CDN, fonts, or icons; no network requests; data
never leaves the machine; the whole file exportable and
importable
- Any input change recomputes in real time; no "calculate"
button
- The tool does arithmetic only - it makes no purchasing
decisions
Prohibitions:
- Pre-fill nothing - no usage volumes, factors, or margins:
every shop's service menu and per-session usage differs, and a
pre-filled number is somebody else's shop
- When a computation cannot run, display which input is missing;
never patch it with an "industry average usage"
- No auto-ordering and no supplier comparison - rebates,
stockpiling, and payment terms are human decisions, and the
moment the tool touches them, accountability blurs
- Shelf-life risk is outside this tool - this tool manages gaps
in "quantity" only; period-after-opening and near-expiry
tracking belongs to the expiry early-warning side. Two
questions blended into one tool means neither half can be
trusted
Why it is written this way
The usage engine must be "redemptions x per-session usage" rather than historical purchase amounts - that is the tool's first design decision. Back-bar products and consumables are not sold directly; they move with treatments. And purchase records carry order-fair pulses, rebate-driven stockpiles, and emergency top-ups - enormous noise. Deriving usage from the average of purchase volume means predicting the thing that most needs accuracy from the ledger that is most distorted. Redemption counts are treatments that actually happened, per-session usage is measured fact, and the product of the two is the only direct answer to "how much will we burn tomorrow".
Counting comped and trial redemptions is where most people stumble. Intuition says "gifted sessions don't count", but every comped treatment consumes serum and mask all the same - thirty sessions gifted in a top-up campaign are thirty very real helpings of product. Count only paid sessions and daily consumption skews low, the reorder point slides later, and the stockout lands precisely on the redemption peak of the campaign. Separate columns in, summed into the math - it keeps "how much product did we give away" permanently on the surface.
A new service must transmit to the reorder point on launch day because the alternative is racing the historical average - and losing. The average lags by exactly one lead time: the new service opens, consumption jumps, the average has not climbed yet, the reorder point has not moved, and the stockout happens inside those days. The pulse projection feeds the planned increments straight into the consumption curve and marks, per product, "reorder point crossed on day N of the launch"; the buyer's whole job is making sure the goods are already shelved before that day.
Shelf-life is drawn explicitly outside the tool's border to keep it from growing into a manages-everything inventory desk. Quantity gaps and expiry risks are two different problems: get the reorder point wrong and you lack goods; miss an expiry and you lose money. Two lenses, two threshold sets, two action paths - blend them into one tool and when a number comes out, nobody knows which half to believe. So this tool owns quantity, and the expiry blade stays in the early-warning tool's hands.
Variables
| Variable | Description |
|---|---|
| Safety margin | Set against your own stockout history: categories that have never run dry in six months can narrow it, ones that have should widen it - it is an exchange rate paid in real money, not an industry figure to copy |
| Target coverage days | Balance cash pressure against storage space: longer coverage means fewer orders and more money sleeping; start from one lead time plus two weeks, run two months, then adjust |
| Per-session usage table | First build: measure every service for a full week (the same esthetician's usage varies day to day - take the average); afterwards add a row per new service and keep rows for retired services - historical redemptions still need reconciling |
| Statistics window | How many weeks of redemptions feed the baseline: eight is common; campaign-heavy shops should lengthen it so one big campaign doesn't inflate the daily average |