From 824ceb7ea39e199500a99c3eef815b39a82ce03b Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 30 May 2006 09:18:51 +0000 Subject: [PATCH] Ajout confirmation de suppression --- htdocs/fourn/facture/fiche.php | 18 +++++++++--------- htdocs/fourn/facture/index.php | 8 -------- 2 files changed, 9 insertions(+), 17 deletions(-) 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"];