Open-to-Buy
Open-to-Buy is a self-contained calculator (no data is saved or loaded from the server) that turns your season's sales plan, markdown plan and stock levels into a single number — how much money you still have available to spend on new purchases this season — plus a variance-adjusted version that accounts for how sales are actually tracking.
Overview
Unlike every other page in this help section, Open-to-Buy makes no API calls at all — it is a pure client-side form-and-formula tool; nothing you enter here is saved anywhere, and refreshing the page resets it back to blank.
You choose a Season (Spring/Summer or Autumn/Winter, for the current or next calendar year) purely as a label for the export file name — it does not change how the calculation itself works.
The core formula implemented is: Planned Purchases = Planned Sales + Planned Markdowns + Closing Stock Goal (EOP) − Opening Stock (BOP), and Open-to-Buy = Planned Purchases − Already on Order — this matches the standard retail OTB formula, using planned figures rather than actuals for the core number.
A second, variance-aware figure — Adjusted OTB — is also shown: it subtracts half of any sales shortfall (Actual Sales below Planned Sales) from the raw Open-to-Buy, as a built-in caution against over-buying when the season is tracking behind plan. It does not add anything back when sales are ahead of plan.
A live "Plan Burn Rate" (Actual Sales ÷ Planned Sales) and "Remaining Sales Need" (Planned − Actual) are also shown to give a sense of how the season is pacing, independent of the OTB figures themselves.
Every numeric result recalculates instantly as you type, via a plain React useEffect watching the form — there is no explicit "Calculate" button.
Before You Start
- None — the page has no server dependency and works purely from whatever you type into it in the current session.
- At least one of Planned Sales, Actual Sales or Opening Stock must be non-zero for any result to display at all; leaving the whole form blank shows no calculation.
Step-by-Step Guide
1 Calculate your season's Open-to-Buy
- Pick the Season label (e.g. "Spring/Summer 2026").
- Under Sales Plan, enter Planned Sales (your target for the season) and Actual Sales (to date) if the season is already underway.
- Under Markdowns, enter Planned Markdowns and Actual Markdowns if applicable.
- Under Stock Levels, enter Opening Stock (BOP) — what you had at season start, Closing Stock Goal (EOP) — what you want left at season end, and Already on Order — stock ordered but not yet received.
- The Open-to-Buy hero figure updates live: green and "Budget remaining to buy" when positive, red and "Over-bought — cut orders" when negative.
2 Use the variance-adjusted figure once the season is underway
- Once Actual Sales differs from Planned Sales, an Adjusted OTB card appears alongside the raw Open-to-Buy figure.
- If sales are behind plan, Adjusted OTB reduces the raw OTB by 50% of the shortfall, with a note recommending you cut buying accordingly.
- If sales are ahead of plan, the note simply states sales are ahead — Adjusted OTB is not increased above the raw OTB figure in this case (see devNotes).
3 Check pacing metrics
- Look at Plan Burn Rate (colour-coded green ≥80%, amber ≥50%, red below) to see how much of the sales plan has been achieved so far as a percentage.
- Look at Remaining Sales Need to see the rupee amount still required to hit your Planned Sales figure.
4 Export or reset
- Click the download icon next to Reset to export a CSV named
otb-{season}.csvcontaining every input plus every calculated result. - Click Reset to clear the whole form back to blank and start a fresh calculation.
Every Field & Button, Explained
| Field / Button | What it does |
|---|---|
Season | A label only (Spring/Summer or Autumn/Winter, current or next year) — used solely in the exported CSV filename, it has no effect on the calculation. |
Planned Sales | Total sales you planned to achieve for the season; the base of the Planned Purchases formula. |
Actual Sales (to date) | How much you have actually sold so far; drives Sales vs Plan, Plan Burn Rate, Remaining Sales Need, and the Adjusted OTB reduction. |
Planned Markdowns | Expected value of discounts/clearance for the season; added into Planned Purchases. |
Actual Markdowns | Markdowns already taken; captured on the form and in the CSV export but not used in the on-screen OTB formula itself. |
Opening Stock (BOP) | Stock value at the beginning of the season ("Beginning of Period"); subtracted in the Planned Purchases formula. |
Closing Stock Goal (EOP) | Stock value you want to carry into next season ("End of Period"); added in the Planned Purchases formula. |
Already on Order | Value of stock already committed/ordered but not yet received; subtracted from Planned Purchases to get Open-to-Buy. |
Open-to-Buy (hero figure) | Planned Purchases minus Already on Order; green when positive (budget remaining), red when negative (over-bought), grey at exactly zero. |
Adjusted OTB | Open-to-Buy minus half of any sales shortfall (max(0, Planned − Actual) × 0.5); only shown once Sales vs Plan is non-zero. |
Planned Purchases | Planned Sales + Planned Markdowns + Closing Stock Goal − Opening Stock — the total stock value you need to buy this season before subtracting commitments. |
Sales vs Plan | Actual Sales minus Planned Sales; green when non-negative, red when behind. |
Plan Burn Rate | Actual Sales ÷ Planned Sales as a percentage (0 if Planned Sales is 0); colour-coded green ≥80%, amber ≥50%, red below 50%. |
Remaining Sales Need | Planned Sales minus Actual Sales — how much more needs to be sold to hit plan. |
Reset | Clears every field back to blank/default season. |
CSV export (download icon) | Exports every input and every computed result to otb-{season}.csv; only appears once a result has been calculated. |
Formula explainer footer | A static reference box on the page restating the three formulas used (Planned Purchases, Open-to-Buy, Adjusted OTB). |
Tips & Best Practices
- Update Actual Sales and Actual Markdowns regularly through the season (weekly or monthly) and re-run the calculation rather than only doing it once at season start — Adjusted OTB is only meaningful once real sales data is entered.
- Because this tool saves nothing, export to CSV as soon as you land on a plan you intend to act on — closing the tab or refreshing the page discards everything you entered.
- Remember Actual Markdowns has no effect on the on-screen OTB math even though it is captured and exported — if you want markdowns-to-date to influence your buying decision, factor it in manually alongside the Adjusted OTB figure.
Troubleshooting & FAQ
I entered numbers but nothing shows on the results side.
My numbers disappeared after I refreshed the page.
Adjusted OTB didn't go up even though my sales are ahead of plan.
Why does Actual Markdowns not seem to change my Open-to-Buy figure?
The CSV button is missing.
🧑💻 Developer Notes
Source component(s):
frontend-app/pos-app-garment/src/pages/garment/OpenToBuyPage.jsx
Backend endpoints used:
None — this page makes no network calls at all; it is a pure client-side calculator with no dedicated garment backend route.
Related tables (db-core repositories):
None
Redux slices:
None — local component state only (useState + useEffect recalculation)
Feature flag key: reports
Unusual among the garment pages: there is no controller function, no route in garment.routes.js, and no persistence layer whatsoever for this page — every value lives only in React state (form/result) for the lifetime of the tab. The Adjusted OTB formula is a simple client-side heuristic (openToBuy - Math.max(0, -salesVariance * 0.5)) rather than any real merchandising-finance model — it is asymmetric by design (only ever reduces the figure, never increases it for over-performance), which is worth calling out to anyone extending this since it could look like a bug if compared against a symmetric adjustment. Actual Markdowns is collected and exported to CSV but is dead input for the on-screen calculation — only Planned Markdowns feeds the Planned Purchases formula, so wiring Actual Markdowns into a "true" stock-to-sales calculation would be a reasonable future enhancement. Because nothing is saved, this tool cannot be used to compare plans across sessions or staff members — a real OTB workflow that persists season plans and reloads them would need a dedicated backend table and endpoints, neither of which currently exist.