From 3c9d8d0d30817426a0561f2d494a21c3b3849d1d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 19 Oct 2021 20:44:03 +0200 Subject: [PATCH] Show status of MO on referring page of product. --- htdocs/product/stats/bom.php | 6 +++--- htdocs/product/stats/mo.php | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/htdocs/product/stats/bom.php b/htdocs/product/stats/bom.php index 52eec409185..ef4923e89be 100644 --- a/htdocs/product/stats/bom.php +++ b/htdocs/product/stats/bom.php @@ -261,14 +261,14 @@ if ($id > 0 || !empty($ref)) { } print '
'; - print ''; + print '
'; print ''; print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "b.rowid", "", "&id=".$product->id, '', $sortfield, $sortorder); print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "b.date_valid", "", "&id=".$product->id, 'align="center"', $sortfield, $sortorder); print_liste_field_titre("RowMaterial", $_SERVER["PHP_SELF"], "", "", "&id=".$product->id, '', $sortfield, $sortorder, 'center '); print_liste_field_titre("Finished", $_SERVER["PHP_SELF"], "", "", "&id=".$product->id, '', $sortfield, $sortorder, 'center '); - print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "b.status", "", "&id=".$product->id, '', $sortfield, $sortorder, 'center '); + print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "b.status", "", "&id=".$product->id, '', $sortfield, $sortorder, 'right '); print "\n"; if (!empty($bom_data_result)) { @@ -281,7 +281,7 @@ if ($id > 0 || !empty($ref)) { print $data['date_valid'].""; print ''; print ''; - print ''; + print ''; print "\n"; } print '
'.$data['qty_toconsume'].''.$data['qty_toproduce'].''.$data['status'].''.$data['status'].'
'; diff --git a/htdocs/product/stats/mo.php b/htdocs/product/stats/mo.php index 9ad400fe0de..c63034e95a6 100644 --- a/htdocs/product/stats/mo.php +++ b/htdocs/product/stats/mo.php @@ -183,7 +183,7 @@ if ($id > 0 || !empty($ref)) { print ''; } - 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"], "", "", "&id=".$product->id, '', $sortfield, $sortorder, 'center '); print_liste_field_titre("QtyToProduce", $_SERVER["PHP_SELF"], "", "", "&id=".$product->id, '', $sortfield, $sortorder, 'center '); print_liste_field_titre("QtyAlreadyProduced", $_SERVER["PHP_SELF"], "", "", "&id=".$product->id, '', $sortfield, $sortorder, 'center '); + print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "b.status", "", "&id=".$product->id, '', $sortfield, $sortorder, 'right '); print "\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 ''; print ''; @@ -226,6 +228,7 @@ if ($id > 0 || !empty($ref)) { print ''.($objp->nb_toproduce > 0 ? $objp->nb_toproduce : '').''; print ''.($objp->nb_produced > 0 ? $objp->nb_produced : '').''; //$mostatic->LibStatut($objp->statut,5).''; + print ''.$motmp->getLibStatut(2).''; print "\n"; $i++; }