Fix missing total and missing css

This commit is contained in:
Laurent Destailleur 2022-01-05 19:58:08 +01:00
parent dba49a8e5f
commit 0674a48cb5
2 changed files with 17 additions and 10 deletions

View File

@ -735,9 +735,9 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_
print '</td>';
print '<td colspan="2">';
if ($object->multiprices_base_type[$soc->price_level] == 'TTC') {
print price($object->multiprices_ttc[$soc->price_level]);
print '<span class="amount">'.price($object->multiprices_ttc[$soc->price_level]).'</span>';
} else {
print price($object->multiprices[$soc->price_level]);
print '<span class="amount">'.price($object->multiprices[$soc->price_level]).'</span>';
}
if ($object->multiprices_base_type[$soc->price_level]) {
print ' '.$langs->trans($object->multiprices_base_type[$soc->price_level]);
@ -892,15 +892,15 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_
print '</td>';
if ($object->multiprices_base_type [$i] == 'TTC') {
print '<td style="text-align: right">'.price($object->multiprices_ttc[$i]);
print '<td class="right"><span class="amount">'.price($object->multiprices_ttc[$i]);
} else {
print '<td style="text-align: right">'.price($object->multiprices[$i]);
print '<td class="right"><span class="amount">'.price($object->multiprices[$i]);
}
if ($object->multiprices_base_type[$i]) {
print ' '.$langs->trans($object->multiprices_base_type [$i]).'</td>';
print ' '.$langs->trans($object->multiprices_base_type [$i]).'</span></td>';
} else {
print ' '.$langs->trans($object->price_base_type).'</td>';
print ' '.$langs->trans($object->price_base_type).'</span></td>';
}
// Prix min

View File

@ -475,6 +475,8 @@ print $hookmanager->resPrint;
print "</tr>\n";
$totalbuyingprice = 0;
$i = 0;
while ($i < ($limit ? min($num, $limit) : $num)) {
$objp = $db->fetch_object($resql);
@ -567,6 +569,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
} else {
print '';
}
$totalbuyingprice += $objp->estimatedvalue;
print '</td>';
// Selling value
@ -607,11 +610,15 @@ $parameters = array('sql'=>$sql);
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
$colspan = 8;
if ($mode == 'future') {
$colspan++;
}
print '<tr class="liste_total"><td>'.$langs->trans("Totalforthispage").'</td>';
print '<td></td><td></td><td class="right">'.price(price2num($totalbuyingprice, 'MT')).'</td><td></td><td></td><td></td><td></td></tr>';
if (empty($date) || !$dateIsValid) {
$colspan = 8;
if ($mode == 'future') {
$colspan++;
}
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("EnterADateCriteria").'</span></td></tr>';
}