diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 9679f430807..6054270d002 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1422,7 +1422,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- } } -elseif ($action == 'updateligne' && $user->rights->facture->creer && $_POST['save'] == $langs->trans('Save')) +elseif ($action == 'updateligne' && $user->rights->facture->creer && ! GETPOST('cancel')) { if (! $object->fetch($id) > 0) dol_print_error($db); $object->fetch_thirdparty(); diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 1aab076bf06..8c87e754bc4 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -369,7 +369,7 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer) /* * Mise a jour d'une ligne dans la commande */ -else if ($action == 'update_line' && $user->rights->fournisseur->commande->creer && $_POST['save'] == $langs->trans('Save')) +else if ($action == 'update_line' && $user->rights->fournisseur->commande->creer && ! GETPOST('cancel')) { if ($_POST["elrowid"]) {