Quotations — Id Edit
What it is
The quotation builder pointed at a quote that already exists. Same line table and pricing tools as Quotations — New, with three differences that matter: it saves atomically, it warns when someone else is editing the same quote, and it can delete the quotation.
The subtitle reads Modifying <quote number>.
This screen carries no Feature ID of its own. The builder is A2Z-F037, whose inventory row
covers both /quotations/new and this route; the "optimistic-locked atomic save" in that row
describes this screen, not the new-quote one.
Who can open it
Any signed-in staff account that is active. Two gates, both in proxy.ts: account status, then
the sales.quotations feature grant while FEATURE_GRANULAR_RBAC is on, with the owner bypassing.
Before you start
-
Watch the banner at the very top. It appears when someone else has this quotation open. Two people saving over each other is what the save guard exists to stop — see below.
-
🔴 The save is optimistic-locked. It sends the version you loaded. If the quote changed in the meantime the save is refused, not merged: you get an error asking you to refresh and try again, and your unsaved edits are still on screen but not stored. Copy anything you cannot retype before refreshing.
-
⚠️ There are two different "revise" mechanisms in the app and they do different things.
- 📑 Duplicate & Revise here creates a new draft whose number gets a
-RevAsuffix (then-RevB, and so on). - Revise → on the quotation detail screen creates a new revision row linked to this one as its parent, which is what drives the Rev N badge and the back-link between revisions.
They do not know about each other. Pick one convention and stay with it.
- 📑 Duplicate & Revise here creates a new draft whose number gets a
Every control on the page
Title bar:
| Control | What it does |
|---|---|
| 📂 File for Backfill | Attach the customer's original Excel. Unlike the new-quote screen it uploads immediately, so it survives a refresh. It then becomes 🎯 Update Original RFQ, which fills your prices into the customer's own workbook and downloads it. |
| 📑 Duplicate & Revise | Asks first, then creates a new draft quotation numbered -RevA / -RevB. |
| ⬇ Excel | Downloads the quotation as a spreadsheet. (Enabled here; it is greyed out on the new-quote screen.) |
| Produces the PDF. | |
| 🗑 Delete | Asks first — "<number> and all its line items will be permanently deleted" — then deletes. |
| ✓ Save | Saves header and lines together. |
Quote Details — Client, Entity, Quote #, Status, Date, Valid Until, Currency, USD Rate, External Ref (labelled Client PO / Ref #) and Notes.
- Status offers draft, sent, won, lost, expired. (Note cancelled is offered on the Quotations list but not here.)
- USD Rate is disabled and dimmed when the currency is INR — there is nothing to convert.
Any custom quotation fields your company has configured appear beneath.
Global controls:
| Control | What it does |
|---|---|
| Global Markup % | Re-prices every line at that markup. |
| Global Discount % | Header-level discount. |
| 📥 Import RFQ | Import the customer's request as lines, reviewed before they are added. |
| ⬇ Import Rates | Pull supplier rates into the sheet. |
| Auto-fill IMPA | Fills IMPA codes from the descriptions, plus the master unit and category on lines that have none. |
Line Items toolbar:
| Control | What it does |
|---|---|
| ✨ Suggest all empty (N) | AI-suggests a cost for every line that has a description but no cost. Disabled when N is 0. |
| 🪄 Auto-GST | Only shown when the currency is INR. Looks up Indian GST rates for the items. |
| + Add Row | Adds an empty line. |
The line grid — Description / Supplier, Unit, Qty, Remarks, Cost (INR), M%, Unit Price, GST%, Line Total, and a remove control.
- Costs are entered in INR and converted to the quote's currency at the header's USD rate. The column says so.
- Each line carries a supplier picker underneath the description, defaulting to No supplier.
- ⊕ opens Pick from Price List — search by item code or description; it shows up to 80 matches with their catalogue cost and default markup.
- A blue 📍 PORT tag on a line means it is priced from that port's own catalogue row rather than the global one.
- Newly imported lines that matched nothing in the catalogue are tinted green.
Status bar (bottom) lists what still blocks a save: client, quote number, entity, at least one line, and any line priced at zero.
What it writes
| Action | What it writes |
|---|---|
| ✓ Save | Calls save_quotation_atomic — header and all lines in one transaction, with the version you loaded as a guard. Pricing rules are applied first and the winning rule is recorded per line. |
| ✓ Save, continued | Saves custom fields separately, records the prices used for future suggestions, and inserts catalogue rows for lines that matched nothing. |
| 📂 File for Backfill | Uploads to the rfq-source-files bucket straight away and saves the path on the quotation. |
| 📑 Duplicate & Revise | Inserts a new quotations row numbered -RevA / -RevB, dated today, in draft. |
| 🗑 Delete | Deletes the quotation and its line items permanently. |
When it goes wrong
"Save failed. Please refresh and try again." Someone else saved this quotation after you opened it, and the guard refused to overwrite them. Copy your changes, refresh, and re-apply them.
"Please provide an override reason for lines where quantity differs from original." A line's quantity no longer matches what the customer asked for. Expand that row and fill in Override reason — the message names the lines.
"Select a client and set a quote number first." / "Add at least one line item before saving." Both are required; the status bar lists what is missing.
"Update failed:" mentioning discount_pct. A database migration has not been applied on this
environment. Report it — it is not something to work around from the screen.
"Backfill source upload failed." The file is loaded for this session only and will not survive a refresh. Try attaching it again.
Auto-GST is not there. It only appears when the quote's currency is INR.
You cannot set the status to cancelled. This screen offers draft, sent, won, lost and expired. Set cancelled from the Quotations list instead.
Related screens
- Quotations — Id — the quotation itself: send, export, submit, and the other Revise.
- Quotations — New — the same builder starting from nothing.
- Quotations — the list.