WFDASH-WEBAPP/src/components/delivery-notes
Dave c22e9d1bd6 feat(delivery-notes): lock the cost price, markup stays the only input
A delivery note's cost price is what the business paid. Editing it
while setting a margin rewrites that silently, so a stray keystroke
changes every downstream number on the note without ever looking like
a pricing decision.

The rule lives in quote-pricing.ts as a `costLocked` flag captured at
load time, and repriceLine DROPS a cost patch on a locked line. That
is the guarantee; the read-only cell in the UI is only the
convenience, so no caller can quietly rewrite the cost.

- "Edit note" and "Create quote" grids: cost is read-only with a lock
  icon once the line arrived costed; a blank cost stays fillable and
  still seeds the 25% default markup on first entry.
- readOnly, not disabled, so the number can still be selected and
  checked against a supplier invoice.
- Locked at load, not per keystroke: a cost typed in this session
  stays correctable until save (an operator choice), and locks on the
  next open because the row then carries the cost.
- The DN detail page's edit mode is untouched — it stays the
  deliberate "that cost is simply wrong" correction path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-10-15 15:44:24 +02:00
..
action-buttons.test.tsx fix(delivery-notes): unblock quoting, and one action set for both screens 2026-10-05 15:27:39 +02:00
action-buttons.tsx feat(delivery-notes): open the note document to print; surface the real QB error 2026-10-09 11:00:03 +02:00
create-adhoc-dialog.tsx feat(delivery-notes): see what's on a note, colour-coded progress, POS-aligned stock search 2026-10-04 20:40:13 +02:00
delivery-note-editor-dialog.test.tsx feat(delivery-notes): lock the cost price, markup stays the only input 2026-10-15 15:44:24 +02:00
delivery-note-editor-dialog.tsx feat(delivery-notes): lock the cost price, markup stays the only input 2026-10-15 15:44:24 +02:00
items-expanded.tsx feat(delivery-notes): see what's on a note, colour-coded progress, POS-aligned stock search 2026-10-04 20:40:13 +02:00
link-invoice-dialog.tsx feat(delivery-notes): link a manual invoice, and show the invoice without leaving 2026-10-08 00:05:32 +02:00
preview-dialog.tsx fix(invoicing): handle PDF uploads and improve error messaging 2026-10-09 13:27:17 +02:00
qb-invoice-dialog.tsx feat(delivery-notes): open the note document to print; surface the real QB error 2026-10-09 11:00:03 +02:00
quote-review-dialog.tsx feat(delivery-notes): lock the cost price, markup stays the only input 2026-10-15 15:44:24 +02:00