diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php index 6c37ed0a7ad..9c26b0b7fbc 100644 --- a/htdocs/product/stock/class/productlot.class.php +++ b/htdocs/product/stock/class/productlot.class.php @@ -546,7 +546,7 @@ class Productlot extends CommonObject $result = ''; $companylink = ''; - $label = '' . $langs->trans("MyModule") . ''; + $label = '' . $langs->trans("LotSerial") . ''; $label.= '
'; $label.= '' . $langs->trans('Ref') . ': ' . $this->ref; diff --git a/htdocs/product/stock/productlot_list.php b/htdocs/product/stock/productlot_list.php index 49f9a443460..bfba1ceebf4 100644 --- a/htdocs/product/stock/productlot_list.php +++ b/htdocs/product/stock/productlot_list.php @@ -81,7 +81,7 @@ if ($page == -1) { $page = 0; } $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (! $sortfield) $sortfield="t.rowid"; // Set here default search field +if (! $sortfield) $sortfield="t.batch"; // Set here default search field if (! $sortorder) $sortorder="ASC"; // Protection if external user @@ -109,8 +109,8 @@ $fieldstosearchall = array( // Definition of fields for list $arrayfields=array( //'t.entity'=>array('label'=>$langs->trans("Fieldentity"), 'checked'=>1), - 't.fk_product'=>array('label'=>$langs->trans("Product"), 'checked'=>1), 't.batch'=>array('label'=>$langs->trans("Batch"), 'checked'=>1), + 't.fk_product'=>array('label'=>$langs->trans("Product"), 'checked'=>1), 't.eatby'=>array('label'=>$langs->trans("EatByDate"), 'checked'=>1), 't.sellby'=>array('label'=>$langs->trans("SellByDate"), 'checked'=>1), //'t.import_key'=>array('label'=>$langs->trans("ImportKey"), 'checked'=>1), @@ -356,8 +356,8 @@ if ($resql) // Fields title print ''; if (! empty($arrayfields['t.entity']['checked'])) print_liste_field_titre($arrayfields['t.entity']['label'],$_SERVER['PHP_SELF'],'t.entity','',$param,'',$sortfield,$sortorder); - if (! empty($arrayfields['t.fk_product']['checked'])) print_liste_field_titre($arrayfields['t.fk_product']['label'],$_SERVER['PHP_SELF'],'t.fk_product','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['t.batch']['checked'])) print_liste_field_titre($arrayfields['t.batch']['label'],$_SERVER['PHP_SELF'],'t.batch','',$param,'',$sortfield,$sortorder); + if (! empty($arrayfields['t.fk_product']['checked'])) print_liste_field_titre($arrayfields['t.fk_product']['label'],$_SERVER['PHP_SELF'],'t.fk_product','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['t.eatby']['checked'])) print_liste_field_titre($arrayfields['t.eatby']['label'],$_SERVER['PHP_SELF'],'t.eatby','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['t.sellby']['checked'])) print_liste_field_titre($arrayfields['t.sellby']['label'],$_SERVER['PHP_SELF'],'t.sellby','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['t.fk_user_creat']['checked'])) print_liste_field_titre($arrayfields['t.fk_user_creat']['label'],$_SERVER['PHP_SELF'],'t.fk_user_creat','',$param,'',$sortfield,$sortorder); @@ -388,8 +388,8 @@ if ($resql) // Fields title search print ''; if (! empty($arrayfields['t.entity']['checked'])) print ''; - if (! empty($arrayfields['t.fk_product']['checked'])) print ''; if (! empty($arrayfields['t.batch']['checked'])) print ''; + if (! empty($arrayfields['t.fk_product']['checked'])) print ''; if (! empty($arrayfields['t.eatby']['checked'])) print ''; if (! empty($arrayfields['t.sellby']['checked'])) print ''; if (! empty($arrayfields['t.fk_user_creat']['checked'])) print ''; @@ -466,6 +466,11 @@ if ($resql) print ''.$obj->entity.''; if (! $i) $totalarray['nbfield']++; } + if (! empty($arrayfields['t.batch']['checked'])) + { + print ''.$obj->batch.''; + if (! $i) $totalarray['nbfield']++; + } if (! empty($arrayfields['t.fk_product']['checked'])) { $productstatic->id=$obj->fk_product; @@ -475,11 +480,6 @@ if ($resql) print ''.$productstatic->getNomUrl(1).''; if (! $i) $totalarray['nbfield']++; } - if (! empty($arrayfields['t.batch']['checked'])) - { - print ''.$obj->batch.''; - if (! $i) $totalarray['nbfield']++; - } if (! empty($arrayfields['t.eatby']['checked'])) { print ''.dol_print_date($db->jdate($obj->eatby), 'day').'';