diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 7337e4a07da..9ae56a25e0d 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -1144,7 +1144,7 @@ if ($resql) { $moreforfilter .= ''; } // If the user can view products - if (isModEnabled('categorie') && $user->hasRight('categorie', 'read') && ($user->hasRight('produit', 'lire') || $user->hasRight('service', 'lire'))) { + if (isModEnabled('categorie') && $user->hasRight('categorie', 'read') && ($user->hasRight('product', 'read') || $user->hasRight('service', 'read'))) { $searchCategoryProductOperator = -1; include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $tmptitle = $langs->trans('IncludingProductWithTag'); diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 78b127ebfff..5963ff4014f 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -695,20 +695,6 @@ if (empty($reshook)) { $tva_tx = GETPOST('tva_tx', 'alpha'); - // Prepare a price equivalent for minimum price check - $pu_equivalent = $pu_ht; - $pu_equivalent_ttc = $pu_ttc; - $currency_tx = $object->multicurrency_tx; - - // Check if we have a foreing currency - // If so, we update the pu_equiv as the equivalent price in base currency - if ($pu_ht == '' && $pu_ht_devise != '' && $currency_tx != '') { - $pu_equivalent = $pu_ht_devise * $currency_tx; - } - if ($pu_ttc == '' && $pu_ttc_devise != '' && $currency_tx != '') { - $pu_equivalent_ttc = $pu_ttc_devise * $currency_tx; - } - $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS', 2); $remise_percent = (GETPOSTISSET('remise_percent'.$predef) ? price2num(GETPOST('remise_percent'.$predef, 'alpha'), '', 2) : 0); @@ -1000,6 +986,20 @@ if (empty($reshook)) { $fournprice = price2num(GETPOST('fournprice'.$predef) ? GETPOST('fournprice'.$predef) : ''); $buyingprice = price2num(GETPOST('buying_price'.$predef) != '' ? GETPOST('buying_price'.$predef) : ''); // If buying_price is '0', we muste keep this value + // Prepare a price equivalent for minimum price check + $pu_equivalent = $pu_ht; + $pu_equivalent_ttc = $pu_ttc; + $currency_tx = $object->multicurrency_tx; + + // Check if we have a foreing currency + // If so, we update the pu_equiv as the equivalent price in base currency + if ($pu_ht == '' && $pu_ht_devise != '' && $currency_tx != '') { + $pu_equivalent = $pu_ht_devise * $currency_tx; + } + if ($pu_ttc == '' && $pu_ttc_devise != '' && $currency_tx != '') { + $pu_equivalent_ttc = $pu_ttc_devise * $currency_tx; + } + // Local Taxes $localtax1_tx = get_localtax($tva_tx, 1, $object->thirdparty); $localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty); diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index fb324ba5f65..77346fd195e 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -1147,7 +1147,7 @@ if ($step == 4 && $datatoimport) { $entity = (!empty($objimport->array_import_entities[0][$code]) ? $objimport->array_import_entities[0][$code] : $objimport->array_import_icon[0]); $entityicon = !empty($entitytoicon[$entity]) ? $entitytoicon[$entity] : $entity; // $entityicon must string name of picto of the field like 'project', 'company', 'contact', 'modulename', ... - $entitylang = $entitytolang[$entity] ? $entitytolang[$entity] : $objimport->array_import_label[0]; // $entitylang must be a translation key to describe object the field is related to, like 'Company', 'Contact', 'MyModyle', ... + $entitylang = !empty($entitytolang[$entity]) ? $entitytolang[$entity] : $objimport->array_import_label[0]; // $entitylang must be a translation key to describe object the field is related to, like 'Company', 'Contact', 'MyModyle', ... print '
'; print '