diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 264089ac48a..a4597fee291 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -2211,7 +2211,8 @@ if ($action == 'create') // only show lot numbers from src warehouse when shipping from multiple warehouses $line->fetch($detail_batch->fk_expeditiondet); } - print ''.$formproduct->selectLotStock($detail_batch->fk_origin_stock, 'batchl'.$detail_batch->fk_expeditiondet.'_'.$detail_batch->fk_origin_stock, '', 1, 0, $lines[$i]->fk_product, $line->entrepot_id).''; + $entrepot_id = !empty($detail_batch->entrepot_id)?$detail_batch->entrepot_id:$lines[$i]->entrepot_id; + print ''.$formproduct->selectLotStock($detail_batch->fk_origin_stock, 'batchl'.$detail_batch->fk_expeditiondet.'_'.$detail_batch->fk_origin_stock, '', 1, 0, $lines[$i]->fk_product, $entrepot_id).''; print ''; } // add a 0 qty lot row to be able to add a lot