Consignment Brands
Consignment Brands manages the outside brands whose stock you sell on commission rather than owning outright, and reports how much each brand's products sold for and what commission was generated over any date range.
Overview
A consignment brand record has just five fields — Brand Name, Contact Name, Contact Phone, Commission Rate (%), and Notes — plus a system-tracked Product Count showing how many of your products are currently linked to that brand.
Linking happens on the product side: the underlying schema adds a consignmentBrandId column to the Product table, so a product is associated with a consignment brand elsewhere (in Products), and this page reflects the resulting count rather than letting you attach products directly from here.
The Sales Report tab aggregates actual sale-item revenue and quantity for every product linked to each brand within a chosen date range, computing "commission" as total sales × commission rate ÷ 100 per brand, plus a grand total across all brands.
Each brand row in the report can expand to show up to 8 individual product line items sold in the period (name, quantity, average unit price), with a "+N more" indicator beyond that.
A brand cannot be deleted while any product is still linked to it — the delete action is rejected server-side with an explicit error rather than silently orphaning those products.
Before You Start
- Commission Rate must be a valid number (0–100 in the form, though the backend does not itself clamp the range) — saving without one, or with a non-numeric value, is rejected client-side before the request is sent.
- Brand Name is the only other required field; Contact Name, Contact Phone and Notes are optional.
- The Sales Report only reflects products that already have
consignmentBrandIdset on them — a brand with zero linked products will always show zero sales and zero commission regardless of date range.
Step-by-Step Guide
1 Add a consignment brand
- On the Brands tab, click Add Brand.
- Enter Brand Name * (required) — e.g. Fabindia, Biba, Levi's.
- Optionally enter Contact Name and Contact Phone for your rep at that brand.
- Enter Commission Rate (%) — the percentage of sales you keep as commission for goods you sell on their behalf.
- Add any settlement-term Notes, then click Save.
2 Edit or delete a brand
- Click the edit icon on a brand card to update any field, then Save.
- Click the trash icon to delete — a confirmation dialog warns that products linked to the brand must be unlinked first.
- If the delete is attempted while products are still linked, the server rejects it and an error toast appears instead of the brand disappearing.
3 Run the consignment sales report
- Switch to the Sales Report tab.
- Set a From and To date (defaults to the last 30 days) and optionally pick a single Brand from the dropdown to narrow the report.
- Click Apply — three summary cards appear: Total Consignment Sales, Total Commission Earned, and the count of Brands with Sales in the period.
- Scroll the brand table for a per-brand breakdown of Commission %, Qty Sold, Total Sales and Commission Earned, with a Total row at the bottom.
- Expand a brand row (shown automatically when it has sold items) to see up to 8 individual products sold, each with quantity and average unit price.
4 Export the report to CSV
- After running a report, click CSV next to the Apply button.
- A file named
consignment-report-{from}-to-{to}.csvdownloads with one row per brand (Brand, Commission Rate %, Total Sales, Qty Sold, Commission Earned) plus a final TOTAL row.
Every Field & Button, Explained
| Field / Button | What it does |
|---|---|
Add Brand | Opens the blank brand form. |
Brand Name * | Required; the consignment supplier's name. |
Contact Name / Contact Phone | Optional contact details for that brand's rep. |
Commission Rate (%) | The percentage of a sale kept as commission when a linked product sells; used directly in the report's commission calculation. |
Notes | Free-text settlement terms or other notes about the arrangement. |
Product Count (brand card) | Live count of products with this brand's consignmentBrandId set; not editable from this page. |
From / To (report) | Date range for the sales report; defaults to the last 30 days through today. |
Brand filter (report) | Optional single-brand filter; leaving it blank reports on every consignment brand. |
Total Consignment Sales | Sum of sale-item revenue across every linked product of every brand in scope, for the chosen date range. |
Total Commission Earned | Sum of each brand's (total sales × commission rate ÷ 100) across the report — the amount the shop keeps as commission, consistent with the "percentage of sales you keep" wording on the form. |
Brands with Sales | Count of brands in the current report whose total sales are greater than zero. |
Brand table — Qty Sold / Total Sales / Commission Earned | Per-brand totals for the selected period; the product-list expansion under each row shows up to 8 individual product line items with quantity and average unit price. |
CSV button | Exports the currently loaded report (not live-refreshed) to a downloadable CSV file. |
Tips & Best Practices
- Set Commission Rate accurately per brand at the time you onboard them — the Sales Report has no way to apply a different rate retroactively to past sales, since it always uses the brand's current rate for the whole date range.
- Run the Sales Report regularly (e.g. monthly) rather than only when a brand asks for a settlement — it gives you an early view of which consignment brands are actually moving stock versus sitting idle.
- Unlink or reassign a consignment brand's products (from the Products page) before attempting to delete the brand — the delete is blocked outright while any product still references it.
Troubleshooting & FAQ
I can't delete a consignment brand.
consignmentBrandId. Unlink those products first (from Products), then delete the brand.A brand shows zero sales even though I know the brand's items sold.
consignmentBrandId — if a product was linked to the brand after the sale happened, or was never linked at all, its historical sales will not be attributed to that brand.How do I work out what I owe the brand from this report?
Why can't I attach a product to a brand from this page?
consignmentBrandId already set on products; set or change a product's consignment brand from the Products page itself.Save failed with "Enter a valid commission rate".
🧑💻 Developer Notes
Source component(s):
frontend-app/pos-app-garment/src/pages/garment/ConsignmentBrandsPage.jsx
Backend endpoints used:
GET /garment/consignment-brandsPOST /garment/consignment-brandsPUT /garment/consignment-brands/:idDELETE /garment/consignment-brands/:idGET /garment/consignment-brands/report
Related tables (db-core repositories):
ConsignmentBrandProduct (consignmentBrandId column)SaleSaleItem
Redux slices:
None — local component state only (useState/useCallback)
Feature flag key: inventory
Backend logic lives in packages/pos-core/src/garment.js (listConsignmentBrands, createConsignmentBrand, updateConsignmentBrand, deleteConsignmentBrand, getConsignmentSalesReport). The ConsignmentBrand table (backend/src/lib/db.js) stores commissionRate as a plain DOUBLE PRECISION with no server-side 0–100 clamp (only the frontend form enforces min/max), so a bad direct API call could store an out-of-range rate. getConsignmentSalesReport computes commission = totalSales * (commissionRate / 100) per brand and sums it into summary.totalCommission — Commission Rate is the shop's retained cut (matching the form's "percentage of sales you keep" copy and the backend's own commissionEarned field name); the report's summary card was previously mislabelled "Total Commission Payable", which read as money owed to the brand rather than money the shop keeps — it has been renamed to "Total Commission Earned" to match. deleteConsignmentBrand pre-checks for linked products and returns a 400 rather than doing a cascading unlink or delete, which protects historical sales-report integrity for products that stay linked.