From 0674a48cb5bed6297f0fdd4c4a0404be18823571 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 5 Jan 2022 19:58:08 +0100 Subject: [PATCH] Fix missing total and missing css --- htdocs/product/price.php | 12 ++++++------ htdocs/product/stock/stockatdate.php | 15 +++++++++++---- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/htdocs/product/price.php b/htdocs/product/price.php index e3eea85cec7..309853a7bb6 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -735,9 +735,9 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_ print ''; print ''; if ($object->multiprices_base_type[$soc->price_level] == 'TTC') { - print price($object->multiprices_ttc[$soc->price_level]); + print ''.price($object->multiprices_ttc[$soc->price_level]).''; } else { - print price($object->multiprices[$soc->price_level]); + print ''.price($object->multiprices[$soc->price_level]).''; } 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 ''; if ($object->multiprices_base_type [$i] == 'TTC') { - print ''.price($object->multiprices_ttc[$i]); + print ''.price($object->multiprices_ttc[$i]); } else { - print ''.price($object->multiprices[$i]); + print ''.price($object->multiprices[$i]); } if ($object->multiprices_base_type[$i]) { - print ' '.$langs->trans($object->multiprices_base_type [$i]).''; + print ' '.$langs->trans($object->multiprices_base_type [$i]).''; } else { - print ' '.$langs->trans($object->price_base_type).''; + print ' '.$langs->trans($object->price_base_type).''; } // Prix min diff --git a/htdocs/product/stock/stockatdate.php b/htdocs/product/stock/stockatdate.php index 61198f9121d..ffcf5dd2f00 100644 --- a/htdocs/product/stock/stockatdate.php +++ b/htdocs/product/stock/stockatdate.php @@ -475,6 +475,8 @@ print $hookmanager->resPrint; print "\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 ''; // 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 ''.$langs->trans("Totalforthispage").''; +print ''.price(price2num($totalbuyingprice, 'MT')).''; + if (empty($date) || !$dateIsValid) { - $colspan = 8; - if ($mode == 'future') { - $colspan++; - } print ''.$langs->trans("EnterADateCriteria").''; }