Fix links in box last MO
This commit is contained in:
parent
46a06f8e95
commit
a63d3364b4
@ -86,12 +86,15 @@ class box_mos extends ModeleBoxes
|
|||||||
|
|
||||||
if ($user->rights->mrp->read) {
|
if ($user->rights->mrp->read) {
|
||||||
$sql = "SELECT p.ref as product_ref";
|
$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.rowid";
|
||||||
$sql .= ", c.date_creation";
|
$sql .= ", c.date_creation";
|
||||||
$sql .= ", c.tms";
|
$sql .= ", c.tms";
|
||||||
$sql .= ", c.ref";
|
$sql .= ", c.ref";
|
||||||
$sql .= ", c.status";
|
$sql .= ", c.status";
|
||||||
//$sql.= ", c.fk_user_valid";
|
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."product as p";
|
$sql .= " FROM ".MAIN_DB_PREFIX."product as p";
|
||||||
$sql .= ", ".MAIN_DB_PREFIX."mrp_mo as c";
|
$sql .= ", ".MAIN_DB_PREFIX."mrp_mo as c";
|
||||||
$sql .= " WHERE c.fk_product = p.rowid";
|
$sql .= " WHERE c.fk_product = p.rowid";
|
||||||
@ -110,9 +113,12 @@ class box_mos extends ModeleBoxes
|
|||||||
$datem = $this->db->jdate($objp->tms);
|
$datem = $this->db->jdate($objp->tms);
|
||||||
$mostatic->id = $objp->rowid;
|
$mostatic->id = $objp->rowid;
|
||||||
$mostatic->ref = $objp->ref;
|
$mostatic->ref = $objp->ref;
|
||||||
$mostatic->id = $objp->socid;
|
|
||||||
$mostatic->status = $objp->status;
|
$mostatic->status = $objp->status;
|
||||||
|
$productstatic->id = $objp->productid;
|
||||||
$productstatic->ref = $objp->product_ref;
|
$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(
|
$this->info_box_contents[$line][] = array(
|
||||||
'td' => 'class="nowraponall"',
|
'td' => 'class="nowraponall"',
|
||||||
@ -126,17 +132,6 @@ class box_mos extends ModeleBoxes
|
|||||||
'asis' => 1,
|
'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(
|
$this->info_box_contents[$line][] = array(
|
||||||
'td' => 'class="center nowraponall"',
|
'td' => 'class="center nowraponall"',
|
||||||
'text' => dol_print_date($datem, 'day', 'tzuserrel'),
|
'text' => dol_print_date($datem, 'day', 'tzuserrel'),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user