diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 9874b14473f..1ff75f2b661 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -2570,7 +2570,7 @@ class Propal extends CommonObject $response = new WorkboardResponse(); $response->warning_delay = $delay_warning/60/60/24; $response->label = $label; - $response->url = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$statut; + $response->url = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$statut.'&mainmenu=commercial&leftmenu=propals'; $response->img = img_object($langs->trans("Propals"),"propal"); // This assignment in condition is not a bug. It allows walking the results. diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 4a2d05e9a92..e0c3c00adad 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -2974,7 +2974,7 @@ class Commande extends CommonOrder $response = new WorkboardResponse(); $response->warning_delay=$conf->commande->client->warning_delay/60/60/24; $response->label=$langs->trans("OrdersToProcess"); - $response->url=DOL_URL_ROOT.'/commande/list.php?viewstatut=-3'; + $response->url=DOL_URL_ROOT.'/commande/list.php?viewstatut=-3&mainmenu=commercial&leftmenu=orders'; $response->img=img_object($langs->trans("Orders"),"order"); $generic_commande = new Commande($this->db); diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 10251d631f7..d4c616d09ac 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -3464,7 +3464,7 @@ class Facture extends CommonInvoice $response = new WorkboardResponse(); $response->warning_delay=$conf->facture->client->warning_delay/60/60/24; $response->label=$langs->trans("CustomerBillsUnpaid"); - $response->url=DOL_URL_ROOT.'/compta/facture/list.php?search_status=1'; + $response->url=DOL_URL_ROOT.'/compta/facture/list.php?search_status=1&mainmenu=accountancy&leftmenu=customers_bills'; $response->img=img_object($langs->trans("Bills"),"bill"); $generic_facture = new Facture($this->db); diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index f0a8c82df1b..719953204f9 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2005 Rodolphe Quiedeville * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005-2015 Regis Houssin - * Copyright (C) 2015 Juanjo Menent + * Copyright (C) 2015-2016 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2016 Marcos García @@ -877,7 +877,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; if ($socid) $sql.= " AND ff.fk_soc = ".$socid; $sql.= " GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.tva, ff.total_tva, ff.total_ttc, ff.paye,"; - $sql.= " s.nom, s.rowid, s.code_client, s.code_fournisseur"; + $sql.= " s.nom, s.rowid, s.code_client, s.code_fournisseur, ff.date_lim_reglement"; $sql.= " ORDER BY ff.date_lim_reglement ASC"; $resql=$db->query($sql); diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index 997e27adb20..f1352f8e933 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -240,7 +240,10 @@ if ($section) require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; $useglobalvars=1; $form = new Form($db); - $formquestion=array('urlfile'=>array('type'=>'hidden','value'=>$urlfile,'name'=>'urlfile')); + $formquestion=array( + 'urlfile'=>array('type'=>'hidden','value'=>$urlfile,'name'=>'urlfile'), + 'section'=>array('type'=>'hidden','value'=>$section,'name'=>'section') + ); print $form->formconfirm($url,$langs->trans("DeleteFile"),$langs->trans("ConfirmDeleteFile"),'confirm_deletefile',$formquestion,"no",($useajax?'deletefile':0)); } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 5a8c0440a81..175bc8873e1 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2329,7 +2329,7 @@ class Form $sql.= " FROM ".MAIN_DB_PREFIX."product as p"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON pfp.fk_soc = s.rowid"; - $sql.= " WHERE p.entity IN (".getEntity('product', 1).")"; + $sql.= " WHERE p.entity IN (".getEntity('productprice', 1).")"; $sql.= " AND p.tobuy = 1"; $sql.= " AND s.fournisseur = 1"; $sql.= " AND p.rowid = ".$productid; diff --git a/htdocs/core/class/ldap.class.php b/htdocs/core/class/ldap.class.php index f3845734ec5..7c6fc0c5a77 100644 --- a/htdocs/core/class/ldap.class.php +++ b/htdocs/core/class/ldap.class.php @@ -162,68 +162,52 @@ class Ldap return -1; } - if (! function_exists('ldap_connect')) + if (! function_exists("ldap_connect")) { - $this->error='Your PHP need extension ldap'; + $this->error='LDAPFunctionsNotAvailableOnPHP'; dol_syslog(get_class($this)."::connect_bind ".$this->error, LOG_WARNING); - return -1; + $return=-1; } - - // Loop on each ldap server - foreach ($this->server as $key => $host) + + if (empty($this->error)) { - if ($connected) break; - if (empty($host)) continue; - - if (preg_match('/^ldap/',$host)) + // Loop on each ldap server + foreach ($this->server as $key => $host) { - $this->connection = ldap_connect($host); - } - else - { - $this->connection = ldap_connect($host,$this->serverPort); - } - - if (is_resource($this->connection)) - { - // Begin TLS if requested by the configuration - if (! empty($conf->global->LDAP_SERVER_USE_TLS)) - { - if (! ldap_start_tls($this->connection)) - { - dol_syslog(get_class($this)."::connect_bind failed to start tls", LOG_WARNING); - $connected = 0; - $this->close(); - } - } - - // Execute the ldap_set_option here (after connect and before bind) - $this->setVersion(); - ldap_set_option($this->connection, LDAP_OPT_SIZELIMIT, 0); // no limit here. should return true. - - - if ($this->serverType == "activedirectory") + if ($connected) break; + if (empty($host)) continue; + + if (preg_match('/^ldap/',$host)) { - $result=$this->setReferrals(); - dol_syslog(get_class($this)."::connect_bind try bindauth for activedirectory on ".$host." user=".$this->searchUser." password=".preg_replace('/./','*',$this->searchPassword),LOG_DEBUG); - $this->result=$this->bindauth($this->searchUser,$this->searchPassword); - if ($this->result) - { - $this->bind=$this->result; - $connected=2; - break; - } - else - { - $this->error=ldap_errno($this->connection).' '.ldap_error($this->connection); - } + $this->connection = ldap_connect($host); } else { - // Try in auth mode - if ($this->searchUser && $this->searchPassword) + $this->connection = ldap_connect($host,$this->serverPort); + } + + if (is_resource($this->connection)) + { + // Begin TLS if requested by the configuration + if (! empty($conf->global->LDAP_SERVER_USE_TLS)) + { + if (! ldap_start_tls($this->connection)) + { + dol_syslog(get_class($this)."::connect_bind failed to start tls", LOG_WARNING); + $connected = 0; + $this->close(); + } + } + + // Execute the ldap_set_option here (after connect and before bind) + $this->setVersion(); + ldap_set_option($this->connection, LDAP_OPT_SIZELIMIT, 0); // no limit here. should return true. + + + if ($this->serverType == "activedirectory") { - dol_syslog(get_class($this)."::connect_bind try bindauth on ".$host." user=".$this->searchUser." password=".preg_replace('/./','*',$this->searchPassword),LOG_DEBUG); + $result=$this->setReferrals(); + dol_syslog(get_class($this)."::connect_bind try bindauth for activedirectory on ".$host." user=".$this->searchUser." password=".preg_replace('/./','*',$this->searchPassword),LOG_DEBUG); $this->result=$this->bindauth($this->searchUser,$this->searchPassword); if ($this->result) { @@ -236,26 +220,45 @@ class Ldap $this->error=ldap_errno($this->connection).' '.ldap_error($this->connection); } } - // Try in anonymous - if (! $this->bind) + else { - dol_syslog(get_class($this)."::connect_bind try bind on ".$host,LOG_DEBUG); - $result=$this->bind(); - if ($result) + // Try in auth mode + if ($this->searchUser && $this->searchPassword) { - $this->bind=$this->result; - $connected=1; - break; + dol_syslog(get_class($this)."::connect_bind try bindauth on ".$host." user=".$this->searchUser." password=".preg_replace('/./','*',$this->searchPassword),LOG_DEBUG); + $this->result=$this->bindauth($this->searchUser,$this->searchPassword); + if ($this->result) + { + $this->bind=$this->result; + $connected=2; + break; + } + else + { + $this->error=ldap_errno($this->connection).' '.ldap_error($this->connection); + } } - else + // Try in anonymous + if (! $this->bind) { - $this->error=ldap_errno($this->connection).' '.ldap_error($this->connection); + dol_syslog(get_class($this)."::connect_bind try bind on ".$host,LOG_DEBUG); + $result=$this->bind(); + if ($result) + { + $this->bind=$this->result; + $connected=1; + break; + } + else + { + $this->error=ldap_errno($this->connection).' '.ldap_error($this->connection); + } } } } + + if (! $connected) $this->close(); } - - if (! $connected) $this->close(); } if ($connected) diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 4f08650e56b..9661f619055 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -736,17 +736,24 @@ function activateModule($value,$withdeps=1) if (isset($objMod->depends) && is_array($objMod->depends) && ! empty($objMod->depends)) { // Activation des modules dont le module depend + $TError=array(); $num = count($objMod->depends); for ($i = 0; $i < $num; $i++) { + $activate = false; foreach ($modulesdir as $dir) { if (file_exists($dir.$objMod->depends[$i].".class.php")) { activateModule($objMod->depends[$i]); + $activate = true; } } + + if (!$activate) $TError[] = $langs->trans('activateModuleDependNotSatisfied', $objMod->name, $objMod->depends[$i]); } + + setEventMessages('', $TError, 'errors'); } if (isset($objMod->conflictwith) && is_array($objMod->conflictwith) && ! empty($objMod->conflictwith)) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index c95a83be335..6cc3aa6ffb6 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -436,7 +436,7 @@ function dol_size($size,$type='') */ function dol_sanitizeFileName($str,$newstr='_',$unaccent=1) { - $filesystem_forbidden_chars = array('<','>',':','/','\\','?','*','|','"'); + $filesystem_forbidden_chars = array('<','>',':','/','\\','?','*','|','"','°'); return dol_string_nospecial($unaccent?dol_string_unaccent($str):$str, $newstr, $filesystem_forbidden_chars); } diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 2f93c1a3935..6f91bfe4325 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -788,8 +788,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (! empty($conf->facture->enabled)) { $langs->load("bills"); - $newmenu->add("/compta/facture/list.php",$langs->trans("BillsCustomers"),0,$user->rights->facture->lire, '', $mainmenu, 'customers_bills'); - $newmenu->add("/compta/facture.php?action=create",$langs->trans("NewBill"),1,$user->rights->facture->creer); + $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills",$langs->trans("BillsCustomers"),0,$user->rights->facture->lire, '', $mainmenu, 'customers_bills'); + $newmenu->add("/compta/facture.php?action=create&leftmenu=customers_bills",$langs->trans("NewBill"),1,$user->rights->facture->creer); $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills",$langs->trans("List"),1,$user->rights->facture->lire); if (empty($leftmenu) || ($leftmenu == 'customers_bills')) diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index 81439058b38..0339f2ea255 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -397,6 +397,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales $tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_other,$array_thirdparty_contact); complete_substitutions_array($tmparray, $outputlangs, $object); + $object->fetch_optionals(); // Call the ODTSubstitution hook $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); $reshook=$hookmanager->executeHooks('ODTSubstitution',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php index e3fa4ece95d..797e759fb13 100644 --- a/htdocs/ecm/index.php +++ b/htdocs/ecm/index.php @@ -175,10 +175,9 @@ if ($action == 'confirm_deletefile') dol_print_error($db,$ecmdir->error); exit; } - $relativepath=$ecmdir->getRelativePath(); } else $relativepath=''; - $upload_dir = $conf->ecm->dir_output.($relativepath?'/'.$relativepath:''); + $upload_dir = $conf->ecm->dir_output; $file = $upload_dir . "/" . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_POST are already decoded by PHP). $ret=dol_delete_file($file); diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 71b852880fb..ff6434154c6 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -819,7 +819,7 @@ if ($action == 'set_paid' && $id > 0 && $user->rights->expensereport->to_paid) } } -if ($action == "addline") +if ($action == "addline" && $user->rights->expensereport->creer) { $error = 0; @@ -911,7 +911,7 @@ if ($action == "addline") $action=''; } -if ($action == 'confirm_delete_line' && GETPOST("confirm") == "yes") +if ($action == 'confirm_delete_line' && GETPOST("confirm") == "yes" && $user->rights->expensereport->creer) { $object = new ExpenseReport($db); $object->fetch($id); @@ -954,7 +954,7 @@ if ($action == 'confirm_delete_line' && GETPOST("confirm") == "yes") } } -if ($action == "updateligne" ) +if ($action == "updateligne" && $user->rights->expensereport->creer) { $object = new ExpenseReport($db); $object->fetch($id); @@ -1640,8 +1640,11 @@ else print ''.$langs->trans('AmountHT').''; print ''.$langs->trans('AmountTTC').''; } - print ''; - + // Ajout des boutons de modification/suppression + if (($object->fk_statut < 2 || $object->fk_statut == 99) && $user->rights->expensereport->creer) + { + print ''; + } print ''; $var=true; @@ -1682,7 +1685,7 @@ else // Ajout des boutons de modification/suppression print ''; - if($object->fk_statut<2 OR $object->fk_statut==99) + if (($object->fk_statut < 2 || $object->fk_statut == 99) && $user->rights->expensereport->creer) { print 'rowid.'#'.$objp->rowid.'">'; print img_edit(); @@ -1768,7 +1771,7 @@ else //print ''; // Add a line - if (($object->fk_statut==0 || $object->fk_statut==99) && $action != 'editline') + if (($object->fk_statut==0 || $object->fk_statut==99) && $action != 'editline' && $user->rights->expensereport->creer) { print ''; print ''; diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 7432fd18e16..8143871918d 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -2492,7 +2492,7 @@ class CommandeFournisseur extends CommonOrder $response = new WorkboardResponse(); $response->warning_delay=$conf->commande->fournisseur->warning_delay/60/60/24; $response->label=$langs->trans("SuppliersOrdersToProcess"); - $response->url=DOL_URL_ROOT.'/fourn/commande/list.php?statut=1,2,3'; + $response->url=DOL_URL_ROOT.'/fourn/commande/list.php?statut=1,2,3&mainmenu=commercial&leftmenu=orders_suppliers'; $response->img=img_object($langs->trans("Orders"),"order"); while ($obj=$this->db->fetch_object($resql)) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 728ff9ac674..69932f0c232 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1507,7 +1507,7 @@ class FactureFournisseur extends CommonInvoice $response = new WorkboardResponse(); $response->warning_delay=$conf->facture->fournisseur->warning_delay/60/60/24; $response->label=$langs->trans("SupplierBillsToPay"); - $response->url=DOL_URL_ROOT.'/fourn/facture/list.php?filtre=fac.fk_statut:1,paye:0'; + $response->url=DOL_URL_ROOT.'/fourn/facture/list.php?filtre=fac.fk_statut:1,paye:0&mainmenu=accountancy&leftmenu=suppliers_bills'; $response->img=img_object($langs->trans("Bills"),"bill"); $facturestatic = new FactureFournisseur($this->db); diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index e033371e9e5..e9a67a0e98e 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -445,7 +445,7 @@ class ProductFournisseur extends Product $sql.= " pfp.price, pfp.quantity, pfp.unitprice, pfp.remise_percent, pfp.remise, pfp.tva_tx, pfp.fk_availability, pfp.charges, pfp.unitcharges, pfp.info_bits, pfp.delivery_time_days, pfp.supplier_reputation"; $sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp"; $sql.= ", ".MAIN_DB_PREFIX."societe as s"; - $sql.= " WHERE pfp.entity IN (".getEntity('product', 1).")"; + $sql.= " WHERE pfp.entity IN (".getEntity('productprice', 1).")"; $sql.= " AND pfp.fk_soc = s.rowid"; $sql.= " AND s.status=1"; // only enabled company selected $sql.= " AND pfp.fk_product = ".$prodid; diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 8e486dc232b..c940486d73b 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1055,7 +1055,6 @@ if (empty($reshook)) } $result = $productsupplier->find_min_price_product_fournisseur($lines[$i]->fk_product, $lines[$i]->qty); - if ($result>=0) { $tva_tx = $lines[$i]->tva_tx; @@ -1089,6 +1088,7 @@ if (empty($reshook)) $lines[$i]->fk_unit ); } + if ($result < 0) { $error++; break; diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index 3b52372d684..ec194e2e794 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -634,6 +634,10 @@ if ($step == 4 && $datatoimport) } } + + if(!empty(GETPOST('update'))) { + $array_match_file_to_database=array(); + } // Load source fields in input file $fieldssource=array(); @@ -757,7 +761,7 @@ if ($step == 4 && $datatoimport) print ''; print '    '.$langs->trans("Enclosure").' : '; print ''; - print ''; + print ''; print ''; print ''; } diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index b87bfd6134f..60b86e25dd0 100755 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1753,3 +1753,4 @@ AddSubstitutions=Add keys substitutions DetectionNotPossible=Detection not possible UrlToGetKeyToUseAPIs=Url to get token to use API (once token has been received it is saved on database user table and will be checked on each future access) ListOfAvailableAPIs=List of available APIs +activateModuleDependNotSatisfied=Module "%s" depends on module "%s" that is missing, so module "%1$s" may not work correclty. Please install module "%2$s" or disable module "%1$s" if you want to be safe from any surprise diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 93f12930824..fef4e55ad21 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -158,6 +158,7 @@ Save=Save SaveAs=Save As TestConnection=Test connection ToClone=Clone +ConfirmCloneAction=Are you sure you want to clone this event ? ConfirmClone=Choose data you want to clone : NoCloneOptionsSpecified=No data to clone defined. Of=of diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 5a4b9681536..5a90bbf3650 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -2666,7 +2666,7 @@ class Product extends CommonObject $sql.= " WHERE fk_soc = ".$id_fourn; $sql.= " AND ref_fourn = '".$this->db->escape($ref_fourn)."'"; $sql.= " AND fk_product != ".$this->id; - $sql.= " AND entity = ".$conf->entity; + $sql.= " AND entity IN (".getEntity('productprice', 1).")"; $resql=$this->db->query($sql); if ($resql) @@ -2689,7 +2689,7 @@ class Product extends CommonObject else $sql.= " AND (ref_fourn = '' OR ref_fourn IS NULL)"; $sql.= " AND quantity = '".$quantity."'"; $sql.= " AND fk_product = ".$this->id; - $sql.= " AND entity = ".$conf->entity; + $sql.= " AND entity IN (".getEntity('productprice', 1).")"; $resql=$this->db->query($sql); if ($resql) diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index ebc3b4eb6e5..c51bf7fae01 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -155,7 +155,7 @@ if (empty($reshook)) { $error++; $langs->load("errors"); - setEventMessages($langs->trans("ErrorFieldMustBeANumeric",'eeee'), null, 'errors'); + setEventMessages($langs->trans("ErrorFieldMustBeANumeric",$langs->transnoentities("VATRateForSupplierProduct")), null, 'errors'); } if (empty($quantity)) {