Size Run Packs
A Size Run Pack is a saved buying ratio — for example S:M:L:XL = 1:2:2:1 — that mirrors how a supplier actually packs and sells a garment style. Save the ratio once, then use the calculator to work out exactly how many of each size to order for any total quantity you want to buy.
Overview
Suppliers of stitched garments almost never sell single units of a style — they sell in fixed size-ratio packs (a "run"), e.g. one pack might be 1×S, 2×M, 2×L, 1×XL. This page lets a shop save that ratio once as a named pack (with an optional category like "Shirts" or "Kurtis") instead of re-deriving the math every time a purchase order is placed.
Six built-in presets are offered when creating a pack — Standard (S-XL), Extended (XS-XXL), Indian Women (S-XL), Indian Men (M-XXL), Kids (2-12) and Kurta (S-4XL) — each pre-filling a typical ratio that can then be freely edited, and custom sizes (e.g. "5XL") can be added on top of any preset.
Every pack stores its ratio as a plain size → integer-units object; the page computes and displays the percentage share of each size live as you edit the ratio, so you can sanity-check a pack (e.g. "M and L together are 66% of this pack") before saving.
The calculator (the calculator-icon button on each saved pack) is where the ratio becomes actionable: enter a total number of units you want to buy, and it distributes that total across sizes proportionally, then lets you copy the resulting size-by-size breakdown to paste into a supplier order or WhatsApp message.
Before You Start
- No plan-tier restriction beyond the route's "inventory" feature gate.
- A pack needs a Pack Name and at least one size in its ratio to be saved — everything else (category, notes) is optional.
- The calculator is purely a planning tool — applying it does not create a Purchase Order or touch stock in BazaarPOS; it only produces a number breakdown to copy elsewhere.
Step-by-Step Guide
1 Create a size run pack
- Click New Pack.
- Enter a Pack Name * (e.g. "Standard S-XL Pack") and an optional Category (e.g. "Shirts", "Kurtis").
- Either pick a preset from the Load preset… dropdown (Standard, Extended, Indian Women, Indian Men, Kids, Kurta) to pre-fill a typical ratio, or build one from scratch.
- Adjust each size's ratio number using the small number input next to it, remove a size with its × button, or type a new size code (e.g. "5XL") and click + Add Size to add it.
- Add any Notes and click Save Pack.
2 Calculate order quantities from a pack
- Click the calculator icon on any saved pack.
- Enter the Total Units to Order you want to buy for this style (defaults to 120).
- The Order Quantities table shows, for every size in the pack, its ratio and the resulting Qty to Order — the total units are distributed proportionally to each size's ratio share, with any leftover units (from rounding down) handed to the largest-ratio sizes first so the total always adds up exactly.
- Click Copy to copy a plain-text size-by-size breakdown to the clipboard (e.g. to paste into a supplier WhatsApp chat or a purchase order line), or Done to close.
3 Edit or delete a pack
- Click the edit (pencil) icon on a pack to reopen the same form pre-filled with its current name, category, ratio and notes.
- Click the trash icon and confirm to permanently delete a pack.
Every Field & Button, Explained
| Field / Button | What it does |
|---|---|
New Pack | Opens the blank pack creation form. |
Pack Name * | Required label for the pack, e.g. "Standard S-XL Pack". |
Category | Optional free-text grouping such as "Shirts" or "Kurtis"; shown on the pack card. |
Load preset… | Instantly fills the ratio editor with one of six built-in ratios: Standard (S-XL) 1:2:2:1, Extended (XS-XXL), Indian Women (S-XL), Indian Men (M-XXL), Kids (2-12), Kurta (S-4XL). |
Size Ratios editor | A chip per size showing its ratio number (editable, 0-99) and a × to remove it; a text box plus "+ Add Size" to add a new size code (max 5 characters, e.g. "5XL"). |
Total ratio units / percentage line | Live summary under the ratio editor showing the sum of all ratio numbers and each size's share as a rounded percentage. |
Notes | Free-text notes on the pack. |
Calculator icon | Opens the Apply Pack quantity calculator for that pack. |
Total Units to Order | The total quantity you intend to buy for this style; drives the calculator's per-size breakdown. |
Order Quantities table | Size, Ratio and calculated Qty to Order columns, with a Total row confirming the quantities sum to the entered total. |
Copy button | Copies a plain-text "Size: Qty" list (one per line) for every size in the pack to the clipboard. |
Edit / Delete icons | Edit reopens the pack form pre-filled; Delete permanently removes the pack after a confirmation prompt. |
Tips & Best Practices
- Name packs after the style or category they apply to (e.g. "Formal Shirts S-XL", "Kids Ethnic 2-12") rather than generically — it becomes much easier to pick the right one months later when reordering.
- Use the percentage line under the ratio editor to eyeball a pack before saving — if one size is wildly over- or under-represented compared to your actual sales mix, adjust the ratio numbers before committing.
- Use Copy after calculating quantities and paste the breakdown directly into your supplier communication — it saves re-typing size-by-size numbers by hand for every order.
Troubleshooting & FAQ
The calculator's quantities don't add up to exactly what I typed.
I can't save a pack.
A preset doesn't match what my supplier actually ships.
Applying a pack didn't create a purchase order.
🧑💻 Developer Notes
Source component(s):
frontend-app/pos-app-garment/src/pages/garment/SizeRunPackPage.jsx
Backend endpoints used:
GET /garment/size-run-packsPOST /garment/size-run-packsPUT /garment/size-run-packs/:idDELETE /garment/size-run-packs/:id
Related tables (db-core repositories):
SizeRunPack
Redux slices:
None — local component state only (useState)
Feature flag key: inventory
The ratios object is stored as a JSON string in SizeRunPack.ratios and parsed back to an object on every read (packages/pos-core/src/garment.js listSizeRunPacks/createSizeRunPack/updateSizeRunPack). The quantity-distribution algorithm in ApplyModal is entirely client-side: it floors each size's proportional share then assigns the rounding remainder to sizes sorted by ratio size descending, guaranteeing the displayed total always matches the entered Total Units to Order exactly. There is no server-side validation of the ratios object shape beyond "is an object" (createSizeRunPack requires typeof data.ratios === 'object'), so a malformed ratio (e.g. non-numeric values) saved via direct API use rather than this UI could render oddly — the UI itself always coerces ratio values to non-negative integers via parseInt.