dolibarr/htdocs/fourn/commande
Aymeric Cucherousset a291e0a779
Fix #39412 Add PRG redirect after adding a line to avoid duplicate on refresh (#39528)
Adding a line to a proposal, order, invoice, supplier order or supplier
invoice did not redirect after the POST succeeded, so pressing F5 (or
accepting the browser's "confirm form resubmission" dialog) replayed the
addline POST and duplicated the last line.

Add the same header('Location: ...'); exit(); redirect already used by
the neighboring confirm_addsubtotalline action, on the success path only,
in:
- htdocs/comm/propal/card.php
- htdocs/commande/card.php
- htdocs/compta/facture/card.php
- htdocs/fourn/commande/card.php
- htdocs/fourn/facture/card.php

Validation-error paths are untouched: no DB write happens there, so a
refresh can't duplicate anything, and the form must keep re-displaying
the user's typed values.

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-08-15 02:45:27 +02:00
..
tpl NEW|New Add delivery date in supplier order linked object block (#38351) 2026-05-22 21:24:05 +02:00
card.php Fix #39412 Add PRG redirect after adding a line to avoid duplicate on refresh (#39528) 2026-08-15 02:45:27 +02:00
contact.php clean code (#38720) 2026-06-12 00:17:26 +02:00
dispatch.php clean code (#38720) 2026-06-12 00:17:26 +02:00
document.php clean code (#38720) 2026-06-12 00:17:26 +02:00
index.php Fix option to set max short list 2026-07-04 13:33:17 +02:00
info.php clean code (#38720) 2026-06-12 00:17:26 +02:00
list.php Qual: Fix 'SqlInjection' notices (#39216) 2026-07-23 19:06:39 +02:00
messaging.php clean code (#38720) 2026-06-12 00:17:26 +02:00
note.php clean code (#38720) 2026-06-12 00:17:26 +02:00