Home / Help Center / pos-app-garment / garment / CMT / Job Work
✂️ garment

CMT / Job Work

CMT (Cut-Make-Trim) / Job Work challans track fabric or cut pieces sent out to a tailor or job worker for stitching, embroidery, dyeing or finishing, and the finished garments received back — with a challan number, an itemised list of what was sent, and a Pending → In Progress → Completed status flow.

📍 Menu path: /garment/cmt-challans
👤 Who uses it: Owner,Manager,Staff

Overview

Each challan records the Tailor / Job Worker name and phone, an Issue Date and Expected Return Date, free-text Notes, and a system-generated Challan Number (e.g. "CMT-0001", auto-incremented per store).

A challan holds one or more line items — Product/Fabric name, SKU, Fabric (m) consumed, Colour, Job Type (Stitching, Embroidery, Dyeing, Printing, Finishing, Cutting or Other), Qty and Unit Cost — and the modal totals these into a live Total Job Cost as you fill them in.

An inline product search box in the challan form lets you type a few letters to find an existing product and click it to fill the next empty item row (or add a new row if none is empty) with that product's name and SKU, rather than typing everything by hand.

Status moves through four stages — Pending, In Progress, Completed, Cancelled — with dedicated one-click actions: Start on a Pending challan moves it to In Progress, and Receive (with a checkmark icon) on an In Progress challan moves it to Completed and auto-stamps a Completed Date.

Clicking anywhere on a challan row (outside its action buttons) expands it in place to show its full item table — Product, SKU, Fabric (m), Colour, Job Type, Qty, Unit Cost and Line Total — fetched from the server the first time it is expanded and cached in that row afterwards.

Before You Start

Step-by-Step Guide

1 Send fabric or cut pieces to a tailor

  1. Click New Challan.
  2. Enter Tailor / Job Worker * (required), Phone, Issue Date (defaults to today) and Expected Return Date.
  3. Use the product search box to find and click an existing product (fills the next empty item row), or fill item rows manually with Product / Fabric *, SKU, Fabric (m), Colour, Job Type and Qty.
  4. Enter a Unit Cost per item if the job-work cost is known upfront; click + Add Row for additional items.
  5. Check the Total Job Cost summary at the bottom, add any Notes, and click Save Challan — this generates the next Challan Number automatically (CMT-0001, CMT-0002, …) and saves it with status Pending.

2 Progress a challan through its status

  1. Click Start on a Pending challan once the tailor has actually begun the work — this sets status to In Progress.
  2. Click Receive (with the checkmark) on an In Progress challan once the finished garments come back — this sets status to Completed and automatically stamps today as the Completed Date if none is set.

3 Review and edit a challan

  1. Click anywhere on a challan's row (not on a button) to expand it and view its full item table, including SKU, Fabric (m), Colour, Job Type, Qty, Unit Cost and Line Total per item, plus any Notes.
  2. Click the edit icon to reopen the challan form pre-filled — the page fetches the challan's saved items from the server before opening the modal, so an existing item grid is never lost.
  3. Change any field or item row and click Save Challan — saving an edit fully replaces the item list on the server with whatever is in the grid at that moment.
💡 Editing a challan replaces its entire item list on save (the whole grid is re-sent, old items deleted and new ones inserted server-side) rather than diffing individual rows — this is intentional so edited or removed rows in the grid are never silently kept.

4 Filter and manage challans

  1. Use the All / Pending / In Progress / Completed / Cancelled filter chips (each showing a live count) to narrow the list.
  2. Click the trash icon and confirm to permanently delete a challan — this also deletes all of its line items.

Every Field & Button, Explained

Field / ButtonWhat it does
New ChallanOpens the blank CMT challan form.
Challan NumberSystem-generated, e.g. "CMT-0001"; auto-incremented per store, not editable.
Tailor / Job Worker *Required name of the person or unit the work is being sent to.
PhoneOptional contact number for the tailor/job worker.
Issue Date / Expected Return DateWhen the work was sent out and when it is expected back; both optional except Issue Date defaults to today.
Product / Fabric *Required per item row; the garment, fabric or component being sent for job work.
SKUOptional item SKU, auto-filled when picked from the product search box.
Fabric (m)Optional metres of fabric associated with that item.
ColourOptional colour of the item/fabric.
Job TypeStitching, Embroidery, Dyeing, Printing, Finishing, Cutting, or Other.
QtyNumber of pieces/units of that item sent for job work.
Unit CostJob-work cost per unit for that item; combines with Qty to compute the item's Line Total and the challan-wide Total Job Cost.
Product search boxType to search the Products list; clicking a result fills the next empty item row (or adds a new row) with that product's name and SKU.
+ Add RowAdds a new blank item row to the challan.
Total Job CostLive sum of Unit Cost × Qty across all items in the form.
NotesFree-text notes on the challan.
Status chips (All/Pending/In Progress/Completed/Cancelled)Filter the challan list; each chip shows a live count.
Start buttonOnly shown on Pending challans; moves status to In Progress.
Receive buttonOnly shown on In Progress challans; moves status to Completed and stamps Completed Date if unset.
Expand/collapse rowClick a challan row to load and show its saved item table with per-item Line Totals.
Edit / Delete iconsEdit reopens the form with items pre-loaded from the server; Delete removes the challan and all its items after confirmation.

Tips & Best Practices

Troubleshooting & FAQ

I edited a challan and some items disappeared.
Saving an edit replaces the entire item list with whatever is currently in the grid — if a row was removed (its × button clicked) before saving, it is genuinely deleted, not just hidden. Re-add it and save again if this was unintentional.
The Challan Number sequence has a gap or doesn't start at 0001 for a new store.
The next number is computed as the highest existing CMT-#### number for that tenant plus one — deleting challans does not renumber remaining ones, so gaps from deleted challans are expected and not an error.
I can't find the "Receive" button on a challan.
It only appears on challans currently In Progress; Pending challans show Start instead, and Completed/Cancelled challans show neither action.
The product search box shows no results.
It searches your main Products list by name; if the fabric or job-work component isn't registered as a product, just type its name directly into the Product / Fabric field instead — a product match is optional.

🧑‍💻 Developer Notes

Source component(s):

  • frontend-app/pos-app-garment/src/pages/garment/CMTChallanPage.jsx

Backend endpoints used:

  • GET /garment/cmt-challans
  • POST /garment/cmt-challans
  • GET /garment/cmt-challans/:id
  • PUT /garment/cmt-challans/:id
  • DELETE /garment/cmt-challans/:id
  • POST /garment/cmt-challans/:id/items
  • PUT /garment/cmt-challans/:id/items/:itemId
  • DELETE /garment/cmt-challans/:id/items/:itemId

Related tables (db-core repositories):

  • CMTChallan
  • CMTChallanItem

Redux slices:

  • None — local component state only

Feature flag key: inventory

Challan Number generation (packages/pos-core/src/garment.js createCMTChallan) computes MAX(CAST(REPLACE(challanNumber,'CMT-','') AS INTEGER)) per tenant and adds one — safe under normal use but note it is not wrapped in a transaction/lock, so two challans created in the same instant under high concurrency could theoretically race for the same number; low risk given this is a manual, single-shop workflow. The single-item endpoints (POST/PUT/DELETE .../items[/:itemId]) exist on the backend and in pos-core (addCMTChallanItem/updateCMTChallanItem/deleteCMTChallanItem) but this page never calls them — CMTChallanPage always saves the entire items array through the challan's own PUT, and updateCMTChallan (garment.js) special-cases an `items` array in the request body by deleting all existing CMTChallanItem rows for that challan and re-inserting the submitted list, with an explicit code comment explaining this is intentional so edited/removed rows are never silently kept. That makes the granular item endpoints effectively dead code from this UI's perspective — they would only be exercised by a different client calling the API directly.