diff --git a/htdocs/product/stock/stats/mo.php b/htdocs/product/stock/stats/mo.php index 5a54ad9b75a..4133448aa63 100644 --- a/htdocs/product/stock/stats/mo.php +++ b/htdocs/product/stock/stats/mo.php @@ -258,6 +258,8 @@ if ($id > 0 || !empty($ref)) { $motmp = new Mo($db); + $total_consumed=$total_produced=0; + if ($num > 0) { while ($i < min($num, $limit)) { $objp = $db->fetch_object($result); @@ -266,6 +268,9 @@ if ($id > 0 || !empty($ref)) { $motmp->ref = $objp->ref; $motmp->status = $objp->status; + $total_consumed+=$objp->nb_consumed; + $total_produced+=$objp->nb_produced; + print ''; print ''; print $motmp->getNomUrl(1, 'production'); @@ -284,6 +289,19 @@ if ($id > 0 || !empty($ref)) { $i++; } } + print ''; + if ($num < $limit) { + print ''.$langs->trans("Total").''; + } else { + print ''.$langs->trans("Totalforthispage").''; + } + print ''; + print ''.$total_consumed.''; + print ''.$total_produced.''; + print ''; + print ""; + print ''; + print ''; print ''; print '';