qual: Variants - cleaner code and improved attributes readability (#29505)

* clean code

* phpcs
This commit is contained in:
thibdrev 2024-04-27 00:49:58 +02:00 committed by GitHub
parent 2de1287afd
commit 3027ed48c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -928,14 +928,8 @@ if (!empty($id) || !empty($ref)) {
print '<td>'.$prodstatic->getNomUrl(1).'</td>';
print '<td>';
$productCombination2ValuePairs = $comb2val->fetchByFkCombination($currcomb->id);
$iMax = count($productCombination2ValuePairs);
for ($i = 0; $i < $iMax; $i++) {
echo dol_htmlentities($productCombination2ValuePairs[$i]);
if ($i !== ($iMax - 1)) {
echo ', ';
}
foreach ($comb2val->fetchByFkCombination($currcomb->id) as $pc2v) {
print dol_htmlentities($pc2v).'<br>';
}
print '</td>';
print '<td class="right">'.($currcomb->variation_price >= 0 ? '+' : '').price($currcomb->variation_price).($currcomb->variation_price_percentage ? ' %' : '').'</td>';