Tobacco & liquor store owner - festival stocking capital calculator - single-file web page, last year's festival sales in, this year's stocking capital need, funding gap, and post-festival carryover out, with returnable and non-returnable stock risk split into two columns
You are a coding agent building a tool for a tobacco
& liquor store owner. Build a single-file HTML tool
(all inline, no external dependencies, no network
calls, opens by double-click): a festival stocking
capital calculator.
The owner's problem, stated in the tool's
positioning: the year is won or lost across two
festival seasons, and stocking for them swallows
most of the year's capital. Under-stock and you
run dry mid-festival and lose the big orders;
over-stock and the carryover sits until next
season - a single pallet of premium bottles can
tie up what an ordinary shop does in a day of
sales. This cannot be decided by gut.
Input section (one set per festival, switchable
on the same page):
- Last year's festival sales by category:
cigarettes / premium liquor / everyday
liquor / beverages and sundries; two prior
years is better than one
- Locked demand this year: confirmed corporate
orders, wedding intentions (count x estimated
value per event, with a haircut slider)
- Supplier policies, one entry each: cash-only
non-returnable / returnable at cost after the
festival (what percentage) / volume rebate
(threshold and rate)
- Capital side: available own funds, the working
reserve that must never be touched, credit
line and rate if any
Calculations and output:
1. Three stocking plans side by side:
conservative (locked demand plus a little
walk-in), match-last-year, aggressive (last
year plus an adjustable uplift percentage) -
each showing stocking value by category,
total capital need, and the gap against
own funds
2. Returnable vs non-returnable columns: split
the stocking value by supplier policy into
"returnable after the festival" and
"non-returnable" - returnable stock ties up
cash but carries no carryover risk,
non-returnable is the real exposure. Two
columns, big numbers, never merged into one
total
3. Post-festival carryover sensitivity: if actual
festival sales land 5% / 10% / 20% under
plan, how much stock sticks per category,
and how many weeks of normal (off-season)
sell-through it takes to digest - premium
liquor flagged separately, because weeks
stuck times unit price is the number that
hurts
4. Cost of the gap: if the gap is financed,
interest at the entered rate over the
expected holding months, printed under the
plan cards
Boundaries (printed on the page):
- No forecasting of this year's market - the
tool does arithmetic, the human judges the
market
- Volume rebates are discounted to what you
actually expect to earn - a rebate whose
threshold you won't reach is zero
- The working reserve is not available for
stocking - raid it and you can't pay the
weekly tobacco invoice mid-festival
Hard requirements:
- Data stays local (localStorage), exportable
and resettable
- Both festivals on one page with a switch;
preloaded sample data so results are visible
on open; plan cards print cleanly
Why it is written this way
Splitting returnable from non-returnable into two columns is the tool's most important cut. Owners talk about stocking as one number - "I've bought 300k of goods" - but if 200k of it can go back to suppliers at cost after the festival, the risk profile is entirely different: returnable stock is a free option that costs interest, not losses; the non-returnable 100k is the actual bet. Merged into one total, the owner loses sleep over fake risk while ignoring the real one. Rebates get the same treatment - a three-point rebate behind a threshold you won't clear is worth zero, and planning against the headline rate is budgeting for a hallucination.
The carryover sensitivity table translates "I over-bought" into time. The hidden cost of over-stocking is never the invoice, it's the digestion period - after the festival, premium liquor sell-through drops to a fraction of normal, and "26 weeks to clear at current velocity" is what over-buying actually means. Premium liquor is flagged on its own row because weeks stuck must be multiplied by unit price to equal money stuck: ten weeks of premium bottles and ten weeks of beer look identical in unit counts and sit in different universes of capital.
The untouchable working reserve, written as a hard boundary, guards the most common way festival stocking goes wrong: the owner pours every yuan into liquor, and then the tobacco invoice, the utilities, and the rent come due mid-festival. Stock the shelves until daily operations suffocate and the cash chain snaps before the festival ends. Financing interest on the gap is printed under the plan cards rather than hidden, so the aggressive plan exposes its own price: does the extra stock's margin actually beat the extra interest plus carryover risk? One screen answers it.
Variables
| Variable | Description |
|---|---|
| Post-festival returnable percentage | What each supplier has actually agreed to take back - a verbal "we'll take back what doesn't sell" must be on paper before the festival; anything not documented is entered as non-returnable |
| Walk-in uplift | How far the aggressive plan rises above last year - set it from local signals like new developments nearby or corporate order growth, not from market gossip |