Merge pull request #21390 from bb2a/FIX---php-V8-composition-card

FIX - php V8 composition card
This commit is contained in:
Laurent Destailleur 2022-06-27 11:12:06 +02:00 committed by GitHub
commit 7ca7dcc8fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -4633,7 +4633,7 @@ class Product extends CommonObject
);
// Recursive call if there is childs to child
if (is_array($desc_pere['childs'])) {
if (isset($desc_pere['childs']) && is_array($desc_pere['childs'])) {
//print 'YYY We go down for '.$desc_pere[3]." -> \n";
$this->fetch_prod_arbo($desc_pere['childs'], $compl_path.$desc_pere[3]." -> ", $desc_pere[1] * $multiply, $level + 1, $id, $ignore_stock_load);
}

View File

@ -380,6 +380,7 @@ if ($id > 0 || !empty($ref)) {
print '</tr>'."\n";
$totalsell = 0;
$total = 0;
if (count($prods_arbo)) {
foreach ($prods_arbo as $value) {
$productstatic->fetch($value['id']);
@ -418,7 +419,7 @@ if ($id > 0 || !empty($ref)) {
$unitline = price2num(($fourn_unitprice * (1 - ($fourn_remise_percent / 100)) - $fourn_remise), 'MU');
$totalline = price2num($value['nb'] * ($fourn_unitprice * (1 - ($fourn_remise_percent / 100)) - $fourn_remise), 'MT');
$total += $totalline;
$total += $totalline;
print '<td class="right nowraponall">';
print ($notdefined ? '' : ($value['nb'] > 1 ? $value['nb'].'x ' : '').'<span class="amount">'.price($unitline, '', '', 0, 0, -1, $conf->currency)).'</span>';
@ -680,7 +681,7 @@ if ($id > 0 || !empty($ref)) {
print '<td>'.$productstatic->getNomUrl(1, '', 24).'</td>';
$labeltoshow = $objp->label;
if ($conf->global->MAIN_MULTILANGS && $objp->labelm) {
if (!empty($conf->global->MAIN_MULTILANGS) && !empty($objp->labelm)) {
$labeltoshow = $objp->labelm;
}