diff --git a/src/components/delivery-notes/delivery-note-editor-dialog.tsx b/src/components/delivery-notes/delivery-note-editor-dialog.tsx index 9fa2f32..de106a1 100644 --- a/src/components/delivery-notes/delivery-note-editor-dialog.tsx +++ b/src/components/delivery-notes/delivery-note-editor-dialog.tsx @@ -159,7 +159,10 @@ export function DeliveryNoteEditorDialog({ const res = await fetch( `/api/v1/delivery-notes/items/${encodeURIComponent(line.orderItemId)}/pricing`, { - method: "POST", + // PATCH, not POST. The route only exports PATCH, and a + // POST to it answers 405 — which surfaced as + // "Could not save line ... (405)" and saved nothing. + method: "PATCH", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ quantity: Math.max(1, Math.round(line.quantity)),