diff --git a/.tx/config b/.tx/config index b650e3109c1..c353140ce78 100644 --- a/.tx/config +++ b/.tx/config @@ -249,8 +249,8 @@ source_lang = en_US type = MOZILLAPROPERTIES [dolibarr.productbatch] -file_filter = htdocs/langs//products.lang -source_file = htdocs/langs/en_US/products.lang +file_filter = htdocs/langs//productbatch.lang +source_file = htdocs/langs/en_US/productbatch.lang source_lang = en_US type = MOZILLAPROPERTIES diff --git a/htdocs/product/card.php b/htdocs/product/card.php index adde861c6a5..e03eb5fa104 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -864,7 +864,7 @@ else // Batch number management if (! empty($conf->productbatch->enabled)) { - print ''.$langs->trans("Status").' ('.$langs->trans("Batch").')'; + print ''.$langs->trans("ManageLotSerial").''; $statutarray=array('0' => $langs->trans("ProductStatusNotOnBatch"), '1' => $langs->trans("ProductStatusOnBatch")); print $form->selectarray('status_batch',$statutarray,GETPOST('status_batch')); print ''; @@ -1441,7 +1441,7 @@ else if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { print ajax_object_onoff($object, 'status_batch', 'tobatch', 'ProductStatusOnBatch', 'ProductStatusNotOnBatch'); } else { - print $object->getLibStatut(2,2); + print $object->getLibStatut(0,2); } print ''; } diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index f53931955d3..f6dfe3150b1 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -296,8 +296,8 @@ if ($id > 0 || $ref) print ''; if ($conf->productbatch->enabled) { - print ''.$langs->trans("Status").' ('.$langs->trans("l_sellby").')'; - print $product->getLibStatut(2,2); + print ''.$langs->trans("ManageLotSerial").''; + print $product->getLibStatut(0,2); print ''; } @@ -471,15 +471,18 @@ if ($id > 0 || $ref) //eat-by date if ((! empty($conf->productbatch->enabled)) && $product->hasbatch()) { print ''; - print ''.$langs->trans("l_eatby").''; + print ''.$langs->trans("batch_number").''; + print ''; + print ''; + print ''; + print ''.$langs->trans("l_eatby").''; $form->select_date('','eatby','','',1,""); print ''; - print ''.$langs->trans("l_sellby").''; + print ''; + print ''.$langs->trans("l_sellby").''; $form->select_date('','sellby','','',1,""); print ''; - print ''.$langs->trans("batch_number").''; - print ''; - print ''; + print ''; } print ''; @@ -591,9 +594,10 @@ print ''.$langs->trans("SellPriceMin").''; print ''.$langs->trans("EstimatedStockValueSellShort").''; print ''; if ( (! empty($conf->productbatch->enabled)) && $product->hasbatch()) { - print ''.$langs->trans("l_eatby").''; - print ''.$langs->trans("l_sellby").''; + print ''; print ''.$langs->trans("batch_number").''; + print ''.$langs->trans("l_eatby").''; + print ''.$langs->trans("l_sellby").''; print ''; print ''; } @@ -644,15 +648,18 @@ if ($resql) $totalvalue = $totalvalue + price2num($obj->pmp*$obj->reel,'MU'); // Ditto : Show PMP from movement or from product $totalvaluesell = $totalvaluesell + price2num($product->price*$obj->reel,'MU'); // Ditto : Show PMP from movement or from product //Batch Detail - if ((! empty($conf->productbatch->enabled)) && $product->hasbatch()) { + if ((! empty($conf->productbatch->enabled)) && $product->hasbatch()) + { $details=Productbatch::findAll($db,$obj->product_stock_id); if ($details<0) dol_print_error($db); - foreach ($details as $pdluo) { - print "\n".''. dol_print_date($pdluo->eatby,'day') .''; - print ''. dol_print_date($pdluo->sellby,'day') .''; - print ''.$pdluo->batch.''; - print ''.$pdluo->qty.($pdluo->qty<0?' '.img_warning():'').''; - print ''; + foreach ($details as $pdluo) + { + print "\n".''; + print ''.$pdluo->batch.''; + print ''. dol_print_date($pdluo->eatby,'day') .''; + print ''. dol_print_date($pdluo->sellby,'day') .''; + print ''.$pdluo->qty.($pdluo->qty<0?' '.img_warning():'').''; + print ''; } } $i++;