Home / Help Center / pos-app-garment / garment / Open-to-Buy
🧮 garment

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.

📍 Menu path: /garment/open-to-buy
👤 Who uses it: Owner,Manager

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

Step-by-Step Guide

1 Calculate your season's Open-to-Buy

  1. Pick the Season label (e.g. "Spring/Summer 2026").
  2. Under Sales Plan, enter Planned Sales (your target for the season) and Actual Sales (to date) if the season is already underway.
  3. Under Markdowns, enter Planned Markdowns and Actual Markdowns if applicable.
  4. 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.
  5. 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

  1. Once Actual Sales differs from Planned Sales, an Adjusted OTB card appears alongside the raw Open-to-Buy figure.
  2. If sales are behind plan, Adjusted OTB reduces the raw OTB by 50% of the shortfall, with a note recommending you cut buying accordingly.
  3. 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

  1. 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.
  2. Look at Remaining Sales Need to see the rupee amount still required to hit your Planned Sales figure.

4 Export or reset

  1. Click the download icon next to Reset to export a CSV named otb-{season}.csv containing every input plus every calculated result.
  2. Click Reset to clear the whole form back to blank and start a fresh calculation.

Every Field & Button, Explained

Field / ButtonWhat it does
SeasonA 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 SalesTotal 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 MarkdownsExpected value of discounts/clearance for the season; added into Planned Purchases.
Actual MarkdownsMarkdowns 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 OrderValue 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 OTBOpen-to-Buy minus half of any sales shortfall (max(0, Planned − Actual) × 0.5); only shown once Sales vs Plan is non-zero.
Planned PurchasesPlanned Sales + Planned Markdowns + Closing Stock Goal − Opening Stock — the total stock value you need to buy this season before subtracting commitments.
Sales vs PlanActual Sales minus Planned Sales; green when non-negative, red when behind.
Plan Burn RateActual Sales ÷ Planned Sales as a percentage (0 if Planned Sales is 0); colour-coded green ≥80%, amber ≥50%, red below 50%.
Remaining Sales NeedPlanned Sales minus Actual Sales — how much more needs to be sold to hit plan.
ResetClears 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 footerA static reference box on the page restating the three formulas used (Planned Purchases, Open-to-Buy, Adjusted OTB).

Tips & Best Practices

Troubleshooting & FAQ

I entered numbers but nothing shows on the results side.
A result only appears once at least one of Planned Sales, Actual Sales or Opening Stock is non-zero — an entirely blank or all-zero form intentionally shows no calculation rather than a meaningless zero result.
My numbers disappeared after I refreshed the page.
This page has no backend and does not persist anything — it is a pure in-session calculator. Export to CSV before navigating away or refreshing if you want to keep a plan.
Adjusted OTB didn't go up even though my sales are ahead of plan.
The adjustment formula only ever subtracts — it reduces OTB by half the shortfall when Actual Sales is behind Planned Sales, but does not add anything back when Actual Sales is ahead. Being ahead of plan is only reflected in the "Sales are ahead of plan by ₹X" note text, not in a higher Adjusted OTB number.
Why does Actual Markdowns not seem to change my Open-to-Buy figure?
By design, the on-screen formula only uses Planned Markdowns (as part of Planned Purchases) — Actual Markdowns is recorded on the form and included in the CSV export for your own reference, but does not feed into either the Open-to-Buy or Adjusted OTB calculations.
The CSV button is missing.
It only appears once a result has been calculated (i.e. at least one of Planned Sales, Actual Sales or Opening Stock is non-zero) — enter at least one of those fields first.

🧑‍💻 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.