diff --git a/htdocs/product/index.php b/htdocs/product/index.php index 6eebc4d85e2..b998bdc3148 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -273,7 +273,7 @@ print '
'; */ $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.= " p.entity,"; +$sql.= " p.entity, p.tobatch,"; $sql.= " p.tms as datem"; $sql.= " FROM ".MAIN_DB_PREFIX."product as p"; $sql.= " WHERE p.entity IN (".getEntity($product_static->element, 1).")"; @@ -337,6 +337,7 @@ if ($result) $product_static->label = $objp->label; $product_static->type=$objp->fk_product_type; $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 178432addbc..071080edc58 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -700,6 +700,7 @@ else $product_static->status = $obj->tosell; $product_static->entity = $obj->entity; $product_static->pmp = $obj->pmp; + $product_static->status_batch = $obj->tobatch; if ((! empty($conf->stock->enabled) && $user->rights->stock->lire && $search_type != 1) || ! empty($conf->global->STOCK_DISABLE_OPTIM_LOAD)) // To optimize call of load_stock { diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php index fc2632fe5e2..d737ecf8bb3 100644 --- a/htdocs/product/reassortlot.php +++ b/htdocs/product/reassortlot.php @@ -337,6 +337,7 @@ if ($resql) $product_static->label = $objp->label; $product_static->type=$objp->fk_product_type; $product_static->entity=$objp->entity; + $product_static->status_batch=$objp->tobatch; $product_lot_static->batch=$objp->batch; $product_lot_static->product_id=$objp->rowid; diff --git a/htdocs/product/stock/productlot_list.php b/htdocs/product/stock/productlot_list.php index 5934e8dff55..02260c8bf8b 100644 --- a/htdocs/product/stock/productlot_list.php +++ b/htdocs/product/stock/productlot_list.php @@ -216,7 +216,8 @@ $sql.= " t.fk_user_modif,"; $sql.= " t.import_key,"; $sql.= " p.fk_product_type as product_type,"; $sql.= " p.ref as product_ref,"; -$sql.= " p.label as product_label"; +$sql.= " p.label as product_label,"; +$sql.= " p.tobatch"; // Add fields for extrafields foreach ($extrafields->attribute_list as $key => $val) $sql.=",ef.".$key.' as options_'.$key; // Add fields from hooks @@ -430,6 +431,7 @@ if ($resql) $productstatic->type=$obj->product_type; $productstatic->ref=$obj->product_ref; $productstatic->label=$obj->product_label; + $productstatic->status_batch = $obj->tobatch; print ''.$productstatic->getNomUrl(1).''; if (! $i) $totalarray['nbfield']++; }