From 45c7f8cc3dbd5d8ad1167002f9e38699d1d0bec9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 29 Oct 2005 18:46:58 +0000 Subject: [PATCH] Fix: erreur --- htdocs/compta/facture.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 05ba93677b6..596a8b3c04c 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -240,9 +240,10 @@ if ($_POST['action'] == 'add') if ($facid) { $contrat = New Contrat($db); - if ( $contrat->fetch($_POST['contratid']) ) + if ($contrat->fetch($_POST['contratid']) > 0) { $lines = $contrat->fetch_lignes(); + for ($i = 0 ; $i < sizeof($lines) ; $i++) { $liblignefac=($contrat->lignes[$i]->desc?$contrat->lignes[$i]->desc:$contrat->lignes[$i]->libelle);