From 777cfd5753a3d41fe75d3724a736a1e81e0426c8 Mon Sep 17 00:00:00 2001 From: Adrien Raze Date: Thu, 26 Jan 2023 15:26:24 +0100 Subject: [PATCH 1/5] FIX : Sub-Bom costs were not good --- htdocs/bom/tpl/objectline_view.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/bom/tpl/objectline_view.tpl.php b/htdocs/bom/tpl/objectline_view.tpl.php index 5992578a6e0..2df13e9af83 100644 --- a/htdocs/bom/tpl/objectline_view.tpl.php +++ b/htdocs/bom/tpl/objectline_view.tpl.php @@ -171,7 +171,7 @@ $tmpbom->calculateCosts(); print ''; $coldisplay++; if (!empty($line->fk_bom_child)) { - echo ''.price($tmpbom->total_cost).''; + echo ''.price($tmpbom->total_cost * $line->qty).''; } else { echo ''.price($line->total_cost).''; } From 52c39d05f796f2435f061e3ee18d0555f2e5590a Mon Sep 17 00:00:00 2001 From: Adrien Raze Date: Thu, 26 Jan 2023 15:32:37 +0100 Subject: [PATCH 2/5] FIX : Make help text part bold --- htdocs/langs/fr_FR/mrp.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/fr_FR/mrp.lang b/htdocs/langs/fr_FR/mrp.lang index 557b1f09175..47e8dcf13d3 100644 --- a/htdocs/langs/fr_FR/mrp.lang +++ b/htdocs/langs/fr_FR/mrp.lang @@ -82,7 +82,7 @@ ProductsToConsume=Produits à consommer ProductsToProduce=Produits à produire UnitCost=Coût unitaire TotalCost=Coût total -BOMTotalCost=Le coût de production de cette nomenclature basé sur chaque quantité et produit à consommer (utilise le cout de la sous BOM si existante, sinon le prix de revient du produit si défini, sinon le PMP si défini, sinon le meilleur prix d'achat) +BOMTotalCost=Le coût de production de cette nomenclature basé sur chaque quantité et produit à consommer (utilise le cout de la sous BOM si existante, sinon le prix de revient du produit si défini, sinon le PMP si défini, sinon le meilleur prix d'achat) BOMTotalCostService=Si le module "Poste de travail" est activé et qu'un poste de travail est défini par défaut sur la ligne, alors le calcul est "quantité (convertie en heures) x poste de travail ahr", sinon "quantité (convertie en heures) x prix de revient du service" GoOnTabProductionToProduceFirst=Vous devez avoir la production pour clôturer un Ordre de Fabrication (voir onglet '%s'). Mais vous pouvez l'annuler. ErrorAVirtualProductCantBeUsedIntoABomOrMo=Un kit ne peut pas être utilisé dans une Nomenclature ou un Ordre de fabrication. From 331dd7d4792ab881701845a053628da4087fa7c8 Mon Sep 17 00:00:00 2001 From: Adrien Raze Date: Thu, 26 Jan 2023 15:56:04 +0100 Subject: [PATCH 3/5] FIX : Sub-Bom indentations were not good --- htdocs/bom/tpl/objectline_view.tpl.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/htdocs/bom/tpl/objectline_view.tpl.php b/htdocs/bom/tpl/objectline_view.tpl.php index 2df13e9af83..ac277f6e880 100644 --- a/htdocs/bom/tpl/objectline_view.tpl.php +++ b/htdocs/bom/tpl/objectline_view.tpl.php @@ -269,16 +269,20 @@ if ($resql) { $label = $sub_bom_product->getLabelOfUnit('long'); if ($sub_bom_line->qty_frozen > 0) { print ''.price($sub_bom_line->qty, 0, '', 0, 0).''; - print ''; - if ($label !== '') print $langs->trans($label); - print ''; + if (!empty($conf->global->PRODUCT_USE_UNITS)) { + print ''; + if ($label !== '') print $langs->trans($label); + print ''; + } print ''.$langs->trans('Yes').''; } else { print ''.price($sub_bom_line->qty * $line->qty, 0, '', 0, 0).''; - print ''; - if ($label !== '') print $langs->trans($label); - print ''; - print ''; + if (!empty($conf->global->PRODUCT_USE_UNITS)) { + print ''; + if ($label !== '') print $langs->trans($label); + print ''; + } + print ' '; } From 1200174b83e2974d9c07c5d442527feb55a7a2d4 Mon Sep 17 00:00:00 2001 From: Adrien Raze Date: Thu, 26 Jan 2023 18:03:18 +0100 Subject: [PATCH 4/5] FIX : The folder on BOM card who display or not the sub BOM was not working --- htdocs/bom/bom_card.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index 333b6232f9f..b25785ae368 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -613,9 +613,6 @@ if (empty($reshook)) { print "\n"; - mrpCollapseBomManagement(); - - //Services $filtertype = 1; $res = $object->fetchLinesbytypeproduct(1); From b963ddb0bc27daae5e2cb6e1d13c9720a6b83386 Mon Sep 17 00:00:00 2001 From: daraelmin Date: Sun, 29 Jan 2023 14:33:13 +0100 Subject: [PATCH 5/5] Fix PHP8 Warning --- htdocs/core/modules/project/task/mod_task_universal.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/project/task/mod_task_universal.php b/htdocs/core/modules/project/task/mod_task_universal.php index 6de02dcaf99..ba61a0363df 100644 --- a/htdocs/core/modules/project/task/mod_task_universal.php +++ b/htdocs/core/modules/project/task/mod_task_universal.php @@ -128,8 +128,7 @@ class mod_task_universal extends ModeleNumRefTask require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - // On defini critere recherche compteur - $mask = $conf->global->PROJECT_TASK_UNIVERSAL_MASK; + $mask = !empty($conf->global->PROJECT_TASK_UNIVERSAL_MASK) ? $conf->global->PROJECT_TASK_UNIVERSAL_MASK : ''; if (!$mask) { $this->error = 'NotConfigured';