Show status of MO on referring page of product.

This commit is contained in:
Laurent Destailleur 2021-10-19 20:44:03 +02:00
parent 885e70ff03
commit 3c9d8d0d30
2 changed files with 7 additions and 4 deletions

View File

@ -261,14 +261,14 @@ if ($id > 0 || !empty($ref)) {
}
print '<div class="div-table-responsive">';
print '<table class="tagtable liste listwithfilterbefore" width="100%">';
print '<table class="tagtable liste listwithfilterbefore centpercent">';
print '<tr class="liste_titre">';
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "b.rowid", "", "&amp;id=".$product->id, '', $sortfield, $sortorder);
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "b.date_valid", "", "&amp;id=".$product->id, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("RowMaterial", $_SERVER["PHP_SELF"], "", "", "&amp;id=".$product->id, '', $sortfield, $sortorder, 'center ');
print_liste_field_titre("Finished", $_SERVER["PHP_SELF"], "", "", "&amp;id=".$product->id, '', $sortfield, $sortorder, 'center ');
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "b.status", "", "&amp;id=".$product->id, '', $sortfield, $sortorder, 'center ');
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "b.status", "", "&amp;id=".$product->id, '', $sortfield, $sortorder, 'right ');
print "</tr>\n";
if (!empty($bom_data_result)) {
@ -281,7 +281,7 @@ if ($id > 0 || !empty($ref)) {
print $data['date_valid']."</td>";
print '<td class="center">'.$data['qty_toconsume'].'</td>';
print '<td class="center">'.$data['qty_toproduce'].'</td>';
print '<td class="center">'.$data['status'].'</td>';
print '<td class="right">'.$data['status'].'</td>';
print "</tr>\n";
}
print '</table>';

View File

@ -183,7 +183,7 @@ if ($id > 0 || !empty($ref)) {
print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>';
}
print_barre_liste($langs->trans("Mos"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1);
print_barre_liste($langs->trans("MOs"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1);
if (!empty($page)) {
$option .= '&page='.urlencode($page);
@ -202,6 +202,7 @@ if ($id > 0 || !empty($ref)) {
print_liste_field_titre("QtyAlreadyConsumed", $_SERVER["PHP_SELF"], "", "", "&amp;id=".$product->id, '', $sortfield, $sortorder, 'center ');
print_liste_field_titre("QtyToProduce", $_SERVER["PHP_SELF"], "", "", "&amp;id=".$product->id, '', $sortfield, $sortorder, 'center ');
print_liste_field_titre("QtyAlreadyProduced", $_SERVER["PHP_SELF"], "", "", "&amp;id=".$product->id, '', $sortfield, $sortorder, 'center ');
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "b.status", "", "&amp;id=".$product->id, '', $sortfield, $sortorder, 'right ');
print "</tr>\n";
$motmp = new Mo($db);
@ -212,6 +213,7 @@ if ($id > 0 || !empty($ref)) {
$motmp->id = $objp->rowid;
$motmp->ref = $objp->ref;
$motmp->status = $objp->status;
print '<tr class="oddeven">';
print '<td>';
@ -226,6 +228,7 @@ if ($id > 0 || !empty($ref)) {
print '<td class="center">'.($objp->nb_toproduce > 0 ? $objp->nb_toproduce : '').'</td>';
print '<td class="center">'.($objp->nb_produced > 0 ? $objp->nb_produced : '').'</td>';
//$mostatic->LibStatut($objp->statut,5).'</td>';
print '<td class="right">'.$motmp->getLibStatut(2).'</td>';
print "</tr>\n";
$i++;
}