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));
|
$this->info_box_head = array('text' => $langs->trans("BoxTitleLatestModifiedBoms", $max));
|
||||||
|
|
||||||
if ($user->rights->bom->read) {
|
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.rowid";
|
||||||
$sql .= ", c.date_creation";
|
$sql .= ", c.date_creation";
|
||||||
$sql .= ", c.tms";
|
$sql .= ", c.tms";
|
||||||
@ -111,12 +115,13 @@ class box_boms extends ModeleBoxes
|
|||||||
|
|
||||||
$bomstatic->id = $objp->rowid;
|
$bomstatic->id = $objp->rowid;
|
||||||
$bomstatic->ref = $objp->ref;
|
$bomstatic->ref = $objp->ref;
|
||||||
$bomstatic->id = $objp->socid;
|
|
||||||
$bomstatic->status = $objp->status;
|
$bomstatic->status = $objp->status;
|
||||||
|
|
||||||
|
$productstatic->id = $objp->productid;
|
||||||
$productstatic->ref = $objp->product_ref;
|
$productstatic->ref = $objp->product_ref;
|
||||||
$productstatic->status = $objp->tobuy;
|
$productstatic->status = $objp->tosell;
|
||||||
$productstatic->status_buy = $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"',
|
||||||
|
|||||||
@ -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"',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user