diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 74724bc2379..899c32716ff 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -370,15 +370,6 @@ else llxHeader('','', $addons); if ($mesg) { print $mesg.'
'; } - - /* - * Confirmation de la suppression de la facture fournisseur - */ - if ($_GET['action'] == 'delete') - { - $html->form_confirm('fiche.php?facid='.$fac->id, $langs->trans('DeleteBill'), $langs->trans('ConfirmDeleteBill'), 'confirm_delete'); - print '
'; - } if ($_GET['action'] == 'edit') { @@ -532,6 +523,15 @@ else $html->form_confirm('fiche.php?facid='.$fac->id, $langs->trans('ValidateBill'), $langs->trans('ConfirmValidateBill', $fac->ref), 'confirm_valid'); print '
'; } + + /* + * Confirmation de la suppression de la facture fournisseur + */ + if ($_GET['action'] == 'delete') + { + $html->form_confirm('fiche.php?facid='.$fac->id, $langs->trans('DeleteBill'), $langs->trans('ConfirmDeleteBill'), 'confirm_delete'); + print '
'; + } print ''; print '
'; diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php index aa6abda4e48..74b5d51a0e1 100644 --- a/htdocs/fourn/facture/index.php +++ b/htdocs/fourn/facture/index.php @@ -42,14 +42,6 @@ if ($user->societe_id > 0) $socidp = $user->societe_id; } -if ($_GET["action"] == 'delete') -{ - $fac = new FactureFournisseur($db); - $fac->delete($_GET["facid"]); - - $facid = 0 ; -} - $page=$_GET["page"]; $sortorder = $_GET["sortorder"]; $sortfield = $_GET["sortfield"];