From e203346b2acdf312c4da28c9312e54dcfc1352fe Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 10 Jul 2023 20:53:19 +0200 Subject: [PATCH] Debug v18 --- htdocs/commande/list.php | 4 +-- htdocs/product/composition/card.php | 17 ++++----- htdocs/product/stock/product.php | 2 +- htdocs/variants/combinations.php | 55 ++++++++++++++++++++++------- 4 files changed, 55 insertions(+), 23 deletions(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 99a1de84162..70187b3a6a8 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -2013,7 +2013,7 @@ if ($resql) { print ''; // Action column - if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { print ''; if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; @@ -2646,7 +2646,7 @@ if ($resql) { } // Action column - if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { print ''; if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index 25892ab98c8..f7ea2478da7 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -326,7 +326,7 @@ if ($id > 0 || !empty($ref)) { print ''; print ''.$langs->trans('ParentProducts').''; print ''.$langs->trans('Label').''; - print ''.$langs->trans('Qty').''; + print ''.$langs->trans('Qty').''; print ''; if (count($prodsfather) > 0) { foreach ($prodsfather as $value) { @@ -342,7 +342,7 @@ if ($id > 0 || !empty($ref)) { print ''; print ''.$productstatic->getNomUrl(1, 'composition').''; print ''.dol_escape_htmltag($productstatic->label).''; - print ''.dol_escape_htmltag($value['qty']).''; + print ''.dol_escape_htmltag($value['qty']).''; print ''; } } else { @@ -384,7 +384,7 @@ if ($id > 0 || !empty($ref)) { print ''.$langs->trans('Stock').''; } // Qty in kit - print ''.$langs->trans('Qty').''; + print ''.$langs->trans('Qty').''; // Stoc inc/dev print ''.$langs->trans('ComposedProductIncDecStock').''; // Move @@ -461,7 +461,7 @@ if ($id > 0 || !empty($ref)) { // Qty + IncDec if ($user->hasRight('produit', 'creer') || $user->hasRight('service', 'creer')) { - print ''; + print ''; print ''; } else { print ''.$nb_of_subproduct.''; @@ -491,10 +491,11 @@ if ($id > 0 || !empty($ref)) { for ($i = 0; $i < $value['level']; $i++) { print '     '; // Add indentation } - print $productstatic->getNomUrl(1, 'composition').''; + print $productstatic->getNomUrl(1, 'composition'); + print ''; // Product label - print ''.$productstatic->label.''; + print ''.dol_escape_htmltag($productstatic->label).''; // Best buying price print ' '; @@ -509,7 +510,7 @@ if ($id > 0 || !empty($ref)) { } // Qty in kit - print ''.$value['nb'].''; + print ''.dol_escape_htmltag($value['nb']).''; // Inc/dec print ' '; @@ -622,7 +623,7 @@ if ($id > 0 || !empty($ref)) { print ajax_combobox('parent'); } print '
'; - print ''; + print ''; print '
'; print ''; } diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 54ec2f865a9..d52b15ca307 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -1367,7 +1367,7 @@ if (!$variants) { getLibStatut(2, 1) ?> stock_reel ?> - + diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index 8a8a0e8412d..41b904fe21b 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -900,6 +900,15 @@ if (!empty($id) || !empty($ref)) { ?> + '; + $searchpicto = $form->showCheckAddButtons('checkforselect', 1); + print $searchpicto; + print ''; + } + ?> @@ -910,10 +919,13 @@ if (!empty($id) || !empty($ref)) { '; - $searchpicto = $form->showCheckAddButtons('checkforselect', 1); - print $searchpicto; - print ''; + // Action column + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } ?> fetch($currcomb->fk_product_child); print ''; + + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } + print ''; print ''; print ''; + print ''; - print ''; } - print ''; + print ''; } } else {
trans('Product') ?> trans('Combination') ?> trans('PriceImpact') ?>trans('OnBuy') ?> '; + $searchpicto = $form->showCheckAddButtons('checkforselect', 1); + print $searchpicto; + print '
'; + if (!empty($productCombinations) || $massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + $selected = 0; + if (in_array($prodstatic->id, $arrayofselected)) { + $selected = 1; + } + print ''; + } + print ''.$prodstatic->getNomUrl(1).''; - $productCombination2ValuePairs = $comb2val->fetchByFkCombination($currcomb->id); $iMax = count($productCombination2ValuePairs); @@ -941,19 +966,25 @@ if (!empty($id) || !empty($ref)) { } print ''.$prodstatic->getLibStatut(2, 0).''.$prodstatic->getLibStatut(2, 1).''; print 'id.'">'.img_edit().''; print 'id.'">'.img_delete().''; print ''; - if (!empty($productCombinations) || $massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - $selected = 0; - if (in_array($prodstatic->id, $arrayofselected)) { - $selected = 1; + + // Action column + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + if (!empty($productCombinations) || $massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + $selected = 0; + if (in_array($prodstatic->id, $arrayofselected)) { + $selected = 1; + } + print ''; } - print ''; + print '