Fix old batches not displayed in multi warehouse shipping

Old batches not available in product_lot table are not shown for
shipping from multiple warehouses
This commit is contained in:
fappels 2017-10-17 22:19:45 +02:00
parent 6ba7fe26a7
commit 6b557fd92f

View File

@ -1212,11 +1212,16 @@ if ($action == 'create')
print '<!-- Show details of lot -->';
print '<input name="batchl'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$dbatch->id.'">';
//print $langs->trans("DetailBatchFormat", $dbatch->batch, dol_print_date($dbatch->eatby,"day"), dol_print_date($dbatch->sellby,"day"), $dbatch->qty);
$productlotObject->fetch(0, $line->fk_product, $dbatch->batch);
print $langs->trans("Batch").': '.$productlotObject->getNomUrl(1);
print ' ('.$dbatch->qty.')';
//print $langs->trans("DetailBatchFormat", 'ee'.$dbatch->batch, dol_print_date($dbatch->eatby,"day"), dol_print_date($dbatch->sellby,"day"), $dbatch->qty);
if (!empty($productlotObject->batch))
{
print $langs->trans("Batch").': '.$productlotObject->getNomUrl(1);
print ' ('.$dbatch->qty.')';
}
else
{
print $langs->trans("DetailBatchFormat", $dbatch->batch, dol_print_date($dbatch->eatby,"day"), dol_print_date($dbatch->sellby,"day"), $dbatch->qty);
}
$quantityToBeDelivered -= $deliverableQty;
if ($quantityToBeDelivered < 0)
{