diff --git a/.tx/config b/.tx/config index b650e3109c1ffa3f26ad21d7b1294a7c4043cb37..c353140ce7852d7a9d85980f906a4ef31b0218e9 100644 --- a/.tx/config +++ b/.tx/config @@ -249,8 +249,8 @@ source_lang = en_US type = MOZILLAPROPERTIES [dolibarr.productbatch] -file_filter = htdocs/langs/<lang>/products.lang -source_file = htdocs/langs/en_US/products.lang +file_filter = htdocs/langs/<lang>/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 adde861c6a52d6fd19a5b730a7ac12a96623f6d1..e03eb5fa104e44fa223a7e6e93f9ea383eb4e74b 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 '<tr><td class="fieldrequired">'.$langs->trans("Status").' ('.$langs->trans("Batch").')</td><td colspan="3">'; + print '<tr><td>'.$langs->trans("ManageLotSerial").'</td><td colspan="3">'; $statutarray=array('0' => $langs->trans("ProductStatusNotOnBatch"), '1' => $langs->trans("ProductStatusOnBatch")); print $form->selectarray('status_batch',$statutarray,GETPOST('status_batch')); print '</td></tr>'; @@ -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 '</td></tr>'; } diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index f53931955d3896d3ea32cc29b43f20598e2ee455..f6dfe3150b1b11cacedfafbebe6fa5f40ba90437 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -296,8 +296,8 @@ if ($id > 0 || $ref) print '</td></tr>'; if ($conf->productbatch->enabled) { - print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("l_sellby").')</td><td>'; - print $product->getLibStatut(2,2); + print '<tr><td>'.$langs->trans("ManageLotSerial").'</td><td>'; + print $product->getLibStatut(0,2); print '</td></tr>'; } @@ -471,15 +471,18 @@ if ($id > 0 || $ref) //eat-by date if ((! empty($conf->productbatch->enabled)) && $product->hasbatch()) { print '<tr>'; - print '<td width="15%">'.$langs->trans("l_eatby").'</td><td width="15%">'; + print '<td colspan="2">'.$langs->trans("batch_number").'</td><td colspan="4">'; + print '<input type="text" name="batch_number" size="40" value="'.GETPOST("batch_number").'">'; + print '</td>'; + print '</tr><tr>'; + print '<td colspan="2">'.$langs->trans("l_eatby").'</td><td>'; $form->select_date('','eatby','','',1,""); print '</td>'; - print '<td width="15%">'.$langs->trans("l_sellby").'</td><td width="15%">'; + print '<td></td>'; + print '<td>'.$langs->trans("l_sellby").'</td><td>'; $form->select_date('','sellby','','',1,""); print '</td>'; - print '<td width="15%">'.$langs->trans("batch_number").'</td><td width="15%">'; - print '<input type="text" name="batch_number" size="40" value="'.GETPOST("batch_number").'">'; - print '</td></tr>'; + print '</tr>'; } print '</table>'; @@ -591,9 +594,10 @@ print '<td align="right">'.$langs->trans("SellPriceMin").'</td>'; print '<td align="right">'.$langs->trans("EstimatedStockValueSellShort").'</td>'; print '</tr>'; if ( (! empty($conf->productbatch->enabled)) && $product->hasbatch()) { - print '<tr class="liste_titre"><td width="10%"></td><td align="right" width="10%">'.$langs->trans("l_eatby").'</td>'; - print '<td align="right" width="10%">'.$langs->trans("l_sellby").'</td>'; + print '<tr class="liste_titre"><td width="10%"></td>'; print '<td align="right" width="10%">'.$langs->trans("batch_number").'</td>'; + print '<td align="right" width="10%">'.$langs->trans("l_eatby").'</td>'; + print '<td align="right" width="10%">'.$langs->trans("l_sellby").'</td>'; print '<td align="right" colspan="5"></td>'; print '</tr>'; } @@ -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".'<tr><td width="10%"></td><td width="10%" align="right">'. dol_print_date($pdluo->eatby,'day') .'</td>'; - print '<td align="right" width="10%">'. dol_print_date($pdluo->sellby,'day') .'</td>'; - print '<td align="right" width="10%">'.$pdluo->batch.'</td>'; - print '<td align="right" width="10%">'.$pdluo->qty.($pdluo->qty<0?' '.img_warning():'').'</td>'; - print '<td colspan="4" width="50%"></td></tr>'; + foreach ($details as $pdluo) + { + print "\n".'<tr><td></td>'; + print '<td align="right">'.$pdluo->batch.'</td>'; + print '<td align="right">'. dol_print_date($pdluo->eatby,'day') .'</td>'; + print '<td align="right">'. dol_print_date($pdluo->sellby,'day') .'</td>'; + print '<td align="right">'.$pdluo->qty.($pdluo->qty<0?' '.img_warning():'').'</td>'; + print '<td colspan="4"></td></tr>'; } } $i++;