Start to debug batch/serial module
This commit is contained in:
parent
c3b74e66ff
commit
7afe9de1c0
@ -249,8 +249,8 @@ source_lang = en_US
|
|||||||
type = MOZILLAPROPERTIES
|
type = MOZILLAPROPERTIES
|
||||||
|
|
||||||
[dolibarr.productbatch]
|
[dolibarr.productbatch]
|
||||||
file_filter = htdocs/langs/<lang>/products.lang
|
file_filter = htdocs/langs/<lang>/productbatch.lang
|
||||||
source_file = htdocs/langs/en_US/products.lang
|
source_file = htdocs/langs/en_US/productbatch.lang
|
||||||
source_lang = en_US
|
source_lang = en_US
|
||||||
type = MOZILLAPROPERTIES
|
type = MOZILLAPROPERTIES
|
||||||
|
|
||||||
|
|||||||
@ -864,7 +864,7 @@ else
|
|||||||
// Batch number management
|
// Batch number management
|
||||||
if (! empty($conf->productbatch->enabled))
|
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"));
|
$statutarray=array('0' => $langs->trans("ProductStatusNotOnBatch"), '1' => $langs->trans("ProductStatusOnBatch"));
|
||||||
print $form->selectarray('status_batch',$statutarray,GETPOST('status_batch'));
|
print $form->selectarray('status_batch',$statutarray,GETPOST('status_batch'));
|
||||||
print '</td></tr>';
|
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)) {
|
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');
|
print ajax_object_onoff($object, 'status_batch', 'tobatch', 'ProductStatusOnBatch', 'ProductStatusNotOnBatch');
|
||||||
} else {
|
} else {
|
||||||
print $object->getLibStatut(2,2);
|
print $object->getLibStatut(0,2);
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -296,8 +296,8 @@ if ($id > 0 || $ref)
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
if ($conf->productbatch->enabled) {
|
if ($conf->productbatch->enabled) {
|
||||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("l_sellby").')</td><td>';
|
print '<tr><td>'.$langs->trans("ManageLotSerial").'</td><td>';
|
||||||
print $product->getLibStatut(2,2);
|
print $product->getLibStatut(0,2);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -471,15 +471,18 @@ if ($id > 0 || $ref)
|
|||||||
//eat-by date
|
//eat-by date
|
||||||
if ((! empty($conf->productbatch->enabled)) && $product->hasbatch()) {
|
if ((! empty($conf->productbatch->enabled)) && $product->hasbatch()) {
|
||||||
print '<tr>';
|
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,"");
|
$form->select_date('','eatby','','',1,"");
|
||||||
print '</td>';
|
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,"");
|
$form->select_date('','sellby','','',1,"");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="15%">'.$langs->trans("batch_number").'</td><td width="15%">';
|
print '</tr>';
|
||||||
print '<input type="text" name="batch_number" size="40" value="'.GETPOST("batch_number").'">';
|
|
||||||
print '</td></tr>';
|
|
||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
@ -591,9 +594,10 @@ print '<td align="right">'.$langs->trans("SellPriceMin").'</td>';
|
|||||||
print '<td align="right">'.$langs->trans("EstimatedStockValueSellShort").'</td>';
|
print '<td align="right">'.$langs->trans("EstimatedStockValueSellShort").'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
if ( (! empty($conf->productbatch->enabled)) && $product->hasbatch()) {
|
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 '<tr class="liste_titre"><td width="10%"></td>';
|
||||||
print '<td align="right" width="10%">'.$langs->trans("l_sellby").'</td>';
|
|
||||||
print '<td align="right" width="10%">'.$langs->trans("batch_number").'</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 '<td align="right" colspan="5"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
@ -644,15 +648,18 @@ if ($resql)
|
|||||||
$totalvalue = $totalvalue + price2num($obj->pmp*$obj->reel,'MU'); // Ditto : Show PMP from movement or from product
|
$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
|
$totalvaluesell = $totalvaluesell + price2num($product->price*$obj->reel,'MU'); // Ditto : Show PMP from movement or from product
|
||||||
//Batch Detail
|
//Batch Detail
|
||||||
if ((! empty($conf->productbatch->enabled)) && $product->hasbatch()) {
|
if ((! empty($conf->productbatch->enabled)) && $product->hasbatch())
|
||||||
|
{
|
||||||
$details=Productbatch::findAll($db,$obj->product_stock_id);
|
$details=Productbatch::findAll($db,$obj->product_stock_id);
|
||||||
if ($details<0) dol_print_error($db);
|
if ($details<0) dol_print_error($db);
|
||||||
foreach ($details as $pdluo) {
|
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 "\n".'<tr><td></td>';
|
||||||
print '<td align="right" width="10%">'.$pdluo->batch.'</td>';
|
print '<td align="right">'.$pdluo->batch.'</td>';
|
||||||
print '<td align="right" width="10%">'.$pdluo->qty.($pdluo->qty<0?' '.img_warning():'').'</td>';
|
print '<td align="right">'. dol_print_date($pdluo->eatby,'day') .'</td>';
|
||||||
print '<td colspan="4" width="50%"></td></tr>';
|
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++;
|
$i++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user