diff --git a/htdocs/core/boxes/box_mos.php b/htdocs/core/boxes/box_mos.php index 43d1cd411e4..d7f7a8f72ae 100644 --- a/htdocs/core/boxes/box_mos.php +++ b/htdocs/core/boxes/box_mos.php @@ -86,12 +86,15 @@ class box_mos extends ModeleBoxes if ($user->rights->mrp->read) { $sql = "SELECT p.ref as product_ref"; + $sql .= ", p.rowid as productid"; + $sql .= ", p.tosell"; + $sql .= ", p.tobuy"; + $sql .= ", p.tobatch"; $sql .= ", c.rowid"; $sql .= ", c.date_creation"; $sql .= ", c.tms"; $sql .= ", c.ref"; $sql .= ", c.status"; - //$sql.= ", c.fk_user_valid"; $sql .= " FROM ".MAIN_DB_PREFIX."product as p"; $sql .= ", ".MAIN_DB_PREFIX."mrp_mo as c"; $sql .= " WHERE c.fk_product = p.rowid"; @@ -110,9 +113,12 @@ class box_mos extends ModeleBoxes $datem = $this->db->jdate($objp->tms); $mostatic->id = $objp->rowid; $mostatic->ref = $objp->ref; - $mostatic->id = $objp->socid; $mostatic->status = $objp->status; + $productstatic->id = $objp->productid; $productstatic->ref = $objp->product_ref; + $productstatic->status = $objp->tosell; + $productstatic->status_buy = $objp->tobuy; + $productstatic->status_batch = $objp->tobatch; $this->info_box_contents[$line][] = array( 'td' => 'class="nowraponall"', @@ -126,17 +132,6 @@ class box_mos extends ModeleBoxes 'asis' => 1, ); - if (!empty($conf->global->MRP_BOX_LAST_MOS_SHOW_VALIDATE_USER)) { - if ($objp->fk_user_valid > 0) { - $userstatic->fetch($objp->fk_user_valid); - } - $this->info_box_contents[$line][] = array( - 'td' => 'class="right"', - 'text' => (($objp->fk_user_valid > 0) ? $userstatic->getNomUrl(1) : ''), - 'asis' => 1, - ); - } - $this->info_box_contents[$line][] = array( 'td' => 'class="center nowraponall"', 'text' => dol_print_date($datem, 'day', 'tzuserrel'),