From 76f0a57e915e4f7de08e6db79bb9b0a302400f35 Mon Sep 17 00:00:00 2001 From: atm-sami <139965072+atm-sami@users.noreply.github.com> Date: Tue, 8 Aug 2023 20:23:53 +0200 Subject: [PATCH 1/5] FIX propal list : warning if product module is not enabled (#25583) --- htdocs/comm/propal/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 6587fc5e1a9..94a14f341ba 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -1126,7 +1126,7 @@ if ($resql) { $moreforfilter .= ''; } // If the user can view products - if (isModEnabled('categorie') && $user->hasRight('categorie', 'read') && ($user->rights->produit->lire || $user->rights->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'); From 3bc698d0caee2be5fc3fabdc24c42d5e0ceeae28 Mon Sep 17 00:00:00 2001 From: Olivier Lesueur <139786198+ol-fr@users.noreply.github.com> Date: Tue, 8 Aug 2023 21:30:27 +0200 Subject: [PATCH 2/5] FIX #25580 install/step1.php - wrong command line argument used for $main_dir (#25581) Co-authored-by: Olivier Lesueur --- htdocs/install/step1.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/htdocs/install/step1.php b/htdocs/install/step1.php index 7958012b0a1..75a75512554 100644 --- a/htdocs/install/step1.php +++ b/htdocs/install/step1.php @@ -84,22 +84,34 @@ if (@file_exists($forcedfile)) { // If forced install is enabled, replace the post values. These are empty because form fields are disabled. if ($force_install_noedit) { $main_dir = detect_dolibarr_main_document_root(); - if (!empty($argv[1])) { - $main_dir = $argv[1]; // override when executing the script in command line + if (!empty($argv[3])) { + $main_dir = $argv[3]; // override when executing the script in command line } if (!empty($force_install_main_data_root)) { $main_data_dir = $force_install_main_data_root; } else { $main_data_dir = detect_dolibarr_main_data_root($main_dir); } + if (!empty($argv[4])) { + $main_data_dir = $argv[4]; // override when executing the script in command line + } $main_url = detect_dolibarr_main_url_root(); + if (!empty($argv[5])) { + $main_url = $argv[5]; // override when executing the script in command line + } if (!empty($force_install_databaserootlogin)) { $userroot = parse_database_login($force_install_databaserootlogin); } + if (!empty($argv[6])) { + $userroot = $argv[6]; // override when executing the script in command line + } if (!empty($force_install_databaserootpass)) { $passroot = parse_database_pass($force_install_databaserootpass); } + if (!empty($argv[7])) { + $passroot = $argv[7]; // override when executing the script in command line + } } if ($force_install_noedit == 2) { if (!empty($force_install_type)) { From 48ede1ffbd80dbf5473acd485bf1b9d1cb4a2e18 Mon Sep 17 00:00:00 2001 From: HENRY Florian Date: Tue, 8 Aug 2023 21:31:57 +0200 Subject: [PATCH 3/5] fix: wrong perms label in French for BOM (#25576) --- htdocs/langs/fr_FR/admin.lang | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 87bda927e14..82b4cedf333 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -900,9 +900,9 @@ Permission609=Supprimer les étiquettes Permission611=Lire les attributs des variantes produits Permission612=Créer/mettre à jour les attributs des variantes produits Permission613=Supprimer les attributs des variantes produits -Permission650=Lire les Nomenclatures (BOM) -Permission651=Créer/modifier les Nomenclatures (BOM) -Permission652=Supprimer les Nomenclatures (BOM) +Permission651=Lire les Nomenclatures (BOM) +Permission652=Créer/modifier les Nomenclatures (BOM) +Permission653=Supprimer les Nomenclatures (BOM) Permission660=Lire les ordres de fabrication (OF) Permission661=Créer/mettre à jour les ordres de fabrication (OF) Permission662=Supprimer les ordres de fabrication (OF) From b0e4558e3fa744f28c4a1043fc3598501a2002d1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Aug 2023 21:53:52 +0200 Subject: [PATCH 4/5] Fix #25586 --- htdocs/commande/card.php | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 6a599354e48..0a458b7b103 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -688,21 +688,6 @@ if (empty($reshook)) { $tva_tx = ''; } - - // 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); @@ -995,6 +980,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); From 4a22bef13d0087957988bdf181a86a8c60ec74bd Mon Sep 17 00:00:00 2001 From: atm-lucas <121817516+atm-lucasmantegari@users.noreply.github.com> Date: Tue, 8 Aug 2023 22:02:45 +0200 Subject: [PATCH 5/5] fix entitylang test (#25569) --- htdocs/imports/import.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index 3ddcb2ecb7a..8c540b98595 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -1145,7 +1145,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 '';