FIX : total line on batch stats mo
This commit is contained in:
parent
3b2d3dc6a6
commit
373388ca4a
@ -258,6 +258,8 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
|
|
||||||
$motmp = new Mo($db);
|
$motmp = new Mo($db);
|
||||||
|
|
||||||
|
$total_consumed=$total_produced=0;
|
||||||
|
|
||||||
if ($num > 0) {
|
if ($num > 0) {
|
||||||
while ($i < min($num, $limit)) {
|
while ($i < min($num, $limit)) {
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
@ -266,6 +268,9 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
$motmp->ref = $objp->ref;
|
$motmp->ref = $objp->ref;
|
||||||
$motmp->status = $objp->status;
|
$motmp->status = $objp->status;
|
||||||
|
|
||||||
|
$total_consumed+=$objp->nb_consumed;
|
||||||
|
$total_produced+=$objp->nb_produced;
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $motmp->getNomUrl(1, 'production');
|
print $motmp->getNomUrl(1, 'production');
|
||||||
@ -284,6 +289,19 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
print '<tr class="liste_total">';
|
||||||
|
if ($num < $limit) {
|
||||||
|
print '<td class="left">'.$langs->trans("Total").'</td>';
|
||||||
|
} else {
|
||||||
|
print '<td class="left">'.$langs->trans("Totalforthispage").'</td>';
|
||||||
|
}
|
||||||
|
print '<td></td>';
|
||||||
|
print '<td class="center">'.$total_consumed.'</td>';
|
||||||
|
print '<td class="center">'.$total_produced.'</td>';
|
||||||
|
print '<td></td>';
|
||||||
|
print "</table>";
|
||||||
|
print '</div>';
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user