Merge pull request #18037 from atm-maxime/fix_mo_stuff
Fix MO and BOM links in boxes
This commit is contained in:
commit
ba4a01dbea
@ -85,7 +85,11 @@ class box_boms extends ModeleBoxes
|
||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleLatestModifiedBoms", $max));
|
||||
|
||||
if ($user->rights->bom->read) {
|
||||
$sql = "SELECT p.ref as product_ref, p.tobuy, p.tosell";
|
||||
$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";
|
||||
@ -111,12 +115,13 @@ class box_boms extends ModeleBoxes
|
||||
|
||||
$bomstatic->id = $objp->rowid;
|
||||
$bomstatic->ref = $objp->ref;
|
||||
$bomstatic->id = $objp->socid;
|
||||
$bomstatic->status = $objp->status;
|
||||
|
||||
$productstatic->id = $objp->productid;
|
||||
$productstatic->ref = $objp->product_ref;
|
||||
$productstatic->status = $objp->tobuy;
|
||||
$productstatic->status_buy = $objp->tosell;
|
||||
$productstatic->status = $objp->tosell;
|
||||
$productstatic->status_buy = $objp->tobuy;
|
||||
$productstatic->status_batch = $objp->tobatch;
|
||||
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'class="nowraponall"',
|
||||
@ -140,7 +145,7 @@ class box_boms extends ModeleBoxes
|
||||
'asis' => 1,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'class="right"',
|
||||
'text' => dol_print_date($datem, 'day', 'tzuserrel'),
|
||||
|
||||
@ -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"',
|
||||
@ -136,7 +142,7 @@ class box_mos extends ModeleBoxes
|
||||
'asis' => 1,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'class="center nowraponall"',
|
||||
'text' => dol_print_date($datem, 'day', 'tzuserrel'),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user