From e8a1f0ba46ed8272b123170feaa0a0ffa137f9a5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 12 Mar 2017 17:10:32 +0100 Subject: [PATCH] Uniformize code --- htdocs/variants/combinations.php | 71 +++++++++++++++++++------------- 1 file changed, 42 insertions(+), 29 deletions(-) diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index 03e45a328e8..dabace75ac0 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -615,35 +615,48 @@ if (! empty($id) || ! empty($ref)) { trans('OnBuy') ?> - fetch($currcomb->fk_product_child); ?> - > - - getNomUrl(1) ?> - - fetchByFkCombination($currcomb->id); - $iMax = count($productCombination2ValuePairs); - - for ($i = 0; $i < $iMax; $i++) { - echo dol_htmlentities($productCombination2ValuePairs[$i]); - - if ($i !== ($iMax - 1)) { - echo ', '; - } - } ?> - - variation_price >= 0 ? '+' : '').price($currcomb->variation_price).($currcomb->variation_price_percentage ? ' %' : '') ?> - variation_weight >= 0 ? '+' : '').price($currcomb->variation_weight).' '.measuring_units_string($prodstatic->weight_units, 'weight') ?> - getLibStatut(2, 0) ?> - getLibStatut(2, 1) ?> - - - - - - + fetch($currcomb->fk_product_child); + ?> + > + + getNomUrl(1) ?> + + fetchByFkCombination($currcomb->id); + $iMax = count($productCombination2ValuePairs); + + for ($i = 0; $i < $iMax; $i++) { + echo dol_htmlentities($productCombination2ValuePairs[$i]); + + if ($i !== ($iMax - 1)) { + echo ', '; + } + } ?> + + variation_price >= 0 ? '+' : '').price($currcomb->variation_price).($currcomb->variation_price_percentage ? ' %' : '') ?> + variation_weight >= 0 ? '+' : '').price($currcomb->variation_weight).' '.measuring_units_string($prodstatic->weight_units, 'weight') ?> + getLibStatut(2, 0) ?> + getLibStatut(2, 1) ?> + + + + + + '.$langs->trans("None").''; + } + ?>