diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index d5fdf711ea5..8b65d33890e 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -95,6 +95,8 @@ $fieldstosearchall = array( 'e.address'=>"Address", 'e.zip'=>'Zip', 'e.town'=>'Town', + 'e.phone'=>'Phone', + 'e.fax'=>'Fax', ); // Definition of fields for list @@ -105,6 +107,8 @@ $arrayfields = array( 'e.address'=>array('label'=>$langs->trans("Address"), 'checked'=>0), 'e.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>0), 'e.town'=>array('label'=>$langs->trans("Town"), 'checked'=>0), + 'e.phone'=>array('label'=>$langs->trans("Phone"), 'checked'=>0), + 'e.fax'=>array('label'=>$langs->trans("Fax"), 'checked'=>0), 'stockqty'=>array('type'=>'float', 'label'=>$langs->trans("PhysicalStock"), 'enabled'=>1, 'visible'=>-2, 'position'=>70), 'estimatedvalue'=>array('type'=>'float', 'label'=>$langs->trans("EstimatedStockValue"), 'enabled'=>1, 'visible'=>-2, 'position'=>71), 'sellvalue'=>array('type'=>'float', 'label'=>$langs->trans("EstimatedStockValueSell"), 'enabled'=>1, 'visible'=>-2, 'position'=>72), @@ -182,7 +186,7 @@ $title = $langs->trans("ListOfWarehouses"); // Build and execute select // -------------------------------------------------------------------- -$sql = "SELECT e.rowid, e.ref, e.statut, e.lieu, e.address, e.zip, e.town, e.fk_pays, e.fk_parent,"; +$sql = "SELECT e.rowid, e.ref, e.statut, e.lieu, e.address, e.zip, e.town, e.phone, e.fax, e.fk_pays, e.fk_parent,"; $sql .= " SUM(p.pmp * ps.reel) as estimatedvalue, SUM(p.price * ps.reel) as sellvalue, SUM(ps.reel) as stockqty"; // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { @@ -222,7 +226,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; -$sql .= " GROUP BY e.rowid, e.ref, e.statut, e.lieu, e.address, e.zip, e.town, e.fk_pays, e.fk_parent"; +$sql .= " GROUP BY e.rowid, e.ref, e.statut, e.lieu, e.address, e.zip, e.town, e.fk_pays, e.phone, e.fax, e.fk_parent"; $totalnboflines = 0; $result = $db->query($sql); if ($result) @@ -399,6 +403,14 @@ if (!empty($arrayfields['e.town']['checked'])) { print '