From 6f27293a8b4baa63dfe26015110499200b96097c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 17 Jun 2011 18:52:33 +0000 Subject: [PATCH] Fix: bug #33510 : Ajout d'un prix fournisseur,mauvais message d'erreur --- htdocs/product/fournisseurs.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index e522f46e4c2..1c5f7d93e7f 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2010 Juanjo Menent @@ -23,7 +23,7 @@ /** * \file htdocs/product/fournisseurs.php * \ingroup product - * \brief Page de l'onglet fournisseur de produits + * \brief Page of tab suppliers for products * \version $Id$ */ @@ -92,7 +92,7 @@ if ($_POST["action"] == 'updateprice' && $_POST["cancel"] <> $langs->trans("Canc $id_fourn=GETPOST("id_fourn"); if (empty($id_fourn)) $id_fourn=GETPOST("search_id_fourn"); $ref_fourn=GETPOST("ref_fourn"); - if (empty($ref_fourn)) $id_fourn=GETPOST("search_ref_fourn"); + if (empty($ref_fourn)) $ref_fourn=GETPOST("search_ref_fourn"); $product = new ProductFournisseur($db); $result=$product->fetch(GETPOST("id")); @@ -104,7 +104,7 @@ if ($_POST["action"] == 'updateprice' && $_POST["cancel"] <> $langs->trans("Canc if (! $ref_fourn) { $error++; - $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("Ref")).'
'; + $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("RefSupplier")).'
'; } if ($id_fourn <= 0) { @@ -235,7 +235,8 @@ if ($_GET["id"] || $_GET["ref"]) print "\n"; - if ($mesg) print($mesg); + if (preg_match('/class="error"/',$mesg)) dol_htmloutput_errors($mesg); + else dol_htmloutput_mesg($mesg); // Form to add or update a price