diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index b39a87f646b..7c6d3891ddb 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -272,7 +272,7 @@ if ($_POST["action"] == 'addligne' && $user->rights->facture->creer) $_GET["facid"]=$_POST["facid"]; // Pour réaffichage de la fiche en cours d'édition } -if ($_POST["action"] == 'updateligne' && $user->rights->facture->creer) +if ($_POST["action"] == 'updateligne' && $user->rights->facture->creer && $_POST["save"] == $langs->trans("Save")) { $fac = new Facture($db,"",$_POST["facid"]); $fac->fetch($_POST["facid"]); @@ -297,6 +297,11 @@ if ($_POST["action"] == 'updateligne' && $user->rights->facture->creer) $_GET["facid"]=$_POST["facid"]; // Pour réaffichage de la fiche en cours d'édition } +if ($_POST["action"] == 'updateligne' && $user->rights->facture->creer && $_POST["cancel"] == $langs->trans("Cancel")) +{ + Header("Location: facture.php?facid=".$_POST["facid"]); // Pour réaffichage de la fiche en cours d'édition +} + if ($_GET["action"] == 'deleteline' && $user->rights->facture->creer) { $fac = new Facture($db,"",$_GET["facid"]); @@ -1037,17 +1042,18 @@ else print '