Error management

This commit is contained in:
Laurent Destailleur 2010-08-29 00:06:23 +00:00
parent a881307f01
commit 5cb43e1521

View File

@ -89,9 +89,6 @@ if ($_POST['action'] == 'confirm_valide' && $_POST['confirm'] == 'yes' && $user-
llxHeader(); llxHeader();
$paiement = new PaiementFourn($db);
$paiement->fetch($_GET['id']);
$html = new Form($db); $html = new Form($db);
$h=0; $h=0;
@ -108,6 +105,11 @@ $h++;
dol_fiche_head($head, $hselected, $langs->trans('SupplierPayment'), 0, 'payment'); dol_fiche_head($head, $hselected, $langs->trans('SupplierPayment'), 0, 'payment');
$paiement = new PaiementFourn($db);
$result=$paiement->fetch($_GET['id']);
if ($result > 0)
{
/* /*
* Confirmation de la suppression du paiement * Confirmation de la suppression du paiement
*/ */
@ -349,6 +351,15 @@ if ($user->societe_id == 0 && $allow_delete && $paiement->statut == 0 && $_GET['
} }
print '</div>'; print '</div>';
}
else
{
$langs->load("errors");
print $langs->trans("ErrorRecordNotFound");
}
dol_fiche_end();
$db->close(); $db->close();
llxFooter('$Date$ - $Revision$'); llxFooter('$Date$ - $Revision$');