From 2dbea6eb5cfd9c9d4c36798b861b44538ffdba43 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 8 Sep 2003 11:02:40 +0000 Subject: [PATCH] Debuggage erreur bug #5107 --- htdocs/product/fiche.php3 | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/htdocs/product/fiche.php3 b/htdocs/product/fiche.php3 index dca2dd2c40d..db844146648 100644 --- a/htdocs/product/fiche.php3 +++ b/htdocs/product/fiche.php3 @@ -58,11 +58,17 @@ if ($action == 'addinpropal') $propal = New Propal($db); $propal->fetch($HTTP_POST_VARS["propalid"]); - $propal->insert_product($id, $HTTP_POST_VARS["qty"]); - + $result = $propal->insert_product($id, $HTTP_POST_VARS["qty"]); + if ( $result < 0) + { + $mesg = "erreur $result"; + } + else + { + $mesg = ucfirst($types[$type]) . ' ajouté ŕ la proposition '; + $mesg .= ''.$propal->ref.''; + } $action = ''; - $mesg = ucfirst($types[$type]) . ' ajouté ŕ la proposition '; - $mesg .= ''.$propal->ref.''; } if ($action == 'addinfacture')