dolibarr/htdocs/fourn/facture
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 Display thirdparty name with ref in linked objects for all document types (#37906) 2026-04-19 15:59:45 +02:00
agenda.php clean code (#38826) 2026-06-15 14:57:01 +02:00
card-rec.php clean code (#38826) 2026-06-15 14:57:01 +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 Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into develop 2026-07-18 16:17:03 +02:00
document.php Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into develop 2026-07-18 16:17:03 +02:00
index.php Fix option to set max short list 2026-07-04 13:33:17 +02:00
info.php Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into develop 2026-07-18 16:17:03 +02:00
list-rec.php Look and feel v24 2026-04-27 05:29:18 +02:00
list.php Qual/Sec: Use db->sanitize instead of db->escape when not quoted, fix some quoting (#39286) 2026-07-27 13:00:33 +02:00
messaging.php NEW Supplier invoice - Update dir_output (#37841) 2026-04-13 13:21:23 +02:00
note-rec.php NEW Supplier invoice - Update dir_output (#37841) 2026-04-13 13:21:23 +02:00
note.php Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into develop 2026-07-18 16:17:03 +02:00
paiement.php NEW Supplier invoice - Update dir_output (#37841) 2026-04-13 13:21:23 +02:00
rapport.php Qual: Fix french comments and improve detector (#39026) 2026-07-01 12:26:51 +02:00