diff --git a/htdocs/product/index.php b/htdocs/product/index.php index 6eebc4d85e2..fd29143613a 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -272,7 +272,7 @@ print '
'; * Last modified products */ $max=15; -$sql = "SELECT p.rowid, p.label, p.price, p.ref, p.fk_product_type, p.tosell, p.tobuy, p.fk_price_expression,"; +$sql = "SELECT p.rowid, p.label, p.price, p.ref, p.fk_product_type, p.tosell, p.tobuy, p.tobatch, p.fk_price_expression,"; $sql.= " p.entity,"; $sql.= " p.tms as datem"; $sql.= " FROM ".MAIN_DB_PREFIX."product as p"; @@ -336,7 +336,8 @@ if ($result) $product_static->ref=$objp->ref; $product_static->label = $objp->label; $product_static->type=$objp->fk_product_type; - $product_static->entity = $objp->entity; + $product_static->entity = $objp->entity; + $product_static->status_batch = $objp->tobatch; print $product_static->getNomUrl(1,'',16); print "\n"; print ''.dol_trunc($objp->label,32).''; diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 662c15507f0..e31a88e6f5c 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -698,6 +698,7 @@ else $product_static->type = $obj->fk_product_type; $product_static->status_buy = $obj->tobuy; $product_static->status = $obj->tosell; + $product_static->status_batch = $obj->tobatch; $product_static->entity = $obj->entity; $product_static->pmp = $obj->pmp; diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index f732c44fc31..1566e5d36c0 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -446,7 +446,7 @@ else $totalunit=0; $totalvalue=$totalvaluesell=0; - $sql = "SELECT p.rowid as rowid, p.ref, p.label as produit, p.fk_product_type as type, p.pmp as ppmp, p.price, p.price_ttc, p.entity,"; + $sql = "SELECT p.rowid as rowid, p.ref, p.label as produit, p.tobatch, p.fk_product_type as type, p.pmp as ppmp, p.price, p.price_ttc, p.entity,"; $sql.= " ps.reel as value"; $sql.= " FROM ".MAIN_DB_PREFIX."product_stock as ps, ".MAIN_DB_PREFIX."product as p"; $sql.= " WHERE ps.fk_product = p.rowid"; @@ -487,10 +487,11 @@ else print ''; print ""; $productstatic->id=$objp->rowid; - $productstatic->ref = $objp->ref; - $productstatic->label = $objp->produit; + $productstatic->ref = $objp->ref; + $productstatic->label = $objp->produit; $productstatic->type=$objp->type; $productstatic->entity=$objp->entity; + $productstatic->status_batch=$objp->tobatch; print $productstatic->getNomUrl(1,'stock',16); print ''; diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index b41a990fbc1..41c8f9ae1f0 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -415,7 +415,7 @@ $formother=new FormOther($db); $formproduct=new FormProduct($db); if (!empty($conf->projet->enabled)) $formproject=new FormProjets($db); -$sql = "SELECT p.rowid, p.ref as product_ref, p.label as produit, p.fk_product_type as type, p.entity,"; +$sql = "SELECT p.rowid, p.ref as product_ref, p.label as produit, p.tobatch, p.fk_product_type as type, p.entity,"; $sql.= " e.ref as stock, e.rowid as entrepot_id, e.lieu,"; $sql.= " m.rowid as mid, m.value as qty, m.datem, m.fk_user_author, m.label, m.inventorycode, m.fk_origin, m.origintype,"; $sql.= " m.batch, m.price,"; @@ -891,6 +891,7 @@ if ($resql) $productstatic->label=$objp->produit; $productstatic->type=$objp->type; $productstatic->entity=$objp->entity; + $productstatic->status_batch=$objp->tobatch; $productlot->id = $objp->lotid; $productlot->batch= $objp->batch;