From eb8eca5f9d85cccf4caddac1a126f9c8d0da5773 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 14 May 2014 10:55:27 +0200 Subject: [PATCH] Suplier Order, do not insert line if error with missing fields --- htdocs/fourn/commande/fiche.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 6d3e8322337..aa853a789c2 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -227,7 +227,7 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer) // Ecrase $pu par celui du produit // Ecrase $desc par celui du produit // Ecrase $txtva par celui du produit - if (GETPOST('prod_entry_mode') != 'free') // With combolist mode idprodfournprice is > 0 or -1. With autocomplete, idprodfournprice is > 0 or '' + if ((GETPOST('prod_entry_mode') != 'free') && empty($error)) // With combolist mode idprodfournprice is > 0 or -1. With autocomplete, idprodfournprice is > 0 or '' { $idprod=0; $productsupplier = new ProductFournisseur($db); @@ -285,7 +285,7 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer) setEventMessage($langs->trans("ErrorQtyTooLowForThisSupplier"), 'errors'); } } - else if( GETPOST('price_ht')!=='' || GETPOST('price_ttc')!=='' ) + else if((GETPOST('price_ht')!=='' || GETPOST('price_ttc')!=='') && empty($error)) { $pu_ht = price2num($price_ht, 'MU'); $pu_ttc = price2num(GETPOST('price_ttc'), 'MU');