diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 9cee623b679..af1c4d4db13 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -669,9 +669,10 @@ if ($action == 'create') print ''.$langs->trans("QtyOrdered").''; print ''.$langs->trans("QtyShipped").''; print ''.$langs->trans("QtyToShip"); - if (empty($conf->productbatch->enabled)) { - print '
('.$langs->trans("Fill").''; - print ' / '.$langs->trans("Reset").')'; + if (empty($conf->productbatch->enabled)) + { + print '
('.$langs->trans("Fill").''; + print ' / '.$langs->trans("Reset").')'; } print ''; if (! empty($conf->stock->enabled)) @@ -848,31 +849,45 @@ if ($action == 'create') else { print ''; // end line and start a new one for lot/serial + + $staticwarehouse=new Entrepot($db); + $staticwarehouse->fetch($warehouse_id); + $subj=0; print ''; - foreach ($product->stock_warehouse[$warehouse_id]->detail_batch as $dbatch) + if (count($product->stock_warehouse[$warehouse_id]->detail_batch)) { - //var_dump($dbatch); - $substock=$dbatch->qty +0 ; - print ''; - print ''; - print ''; - - print ''; - - $staticwarehouse=new Entrepot($db); - $staticwarehouse->fetch($warehouse_id); - print $staticwarehouse->getNomUrl(0).' / '; - - print ''; - print ''; - print $langs->trans("DetailBatchFormat", $dbatch->batch, dol_print_date($dbatch->eatby,"day"), dol_print_date($dbatch->sellby,"day"), $dbatch->qty); - if ($defaultqty<=0) { - $defaultqty=0; - } else { - $defaultqty -=min($defaultqty,$substock); + foreach ($product->stock_warehouse[$warehouse_id]->detail_batch as $dbatch) + { + //var_dump($dbatch); + $substock=$dbatch->qty +0 ; // To get a numeric + print ''; + print ''; + print ''; + + print ''; + + print $staticwarehouse->getNomUrl(0).' / '; + + print ''; + print ''; + print $langs->trans("DetailBatchFormat", $dbatch->batch, dol_print_date($dbatch->eatby,"day"), dol_print_date($dbatch->sellby,"day"), $dbatch->qty); + if ($defaultqty<=0) { + $defaultqty=0; + } else { + $defaultqty -= min($defaultqty,$substock); + } + $subj++; } - $subj++; + } + else + { + print ''; + print ' '; + print ''; + + print ''; + print img_warning().' '.$langs->trans("NoProductToShipFoundIntoStock", $staticwarehouse->libelle); } } diff --git a/htdocs/langs/en_US/sendings.lang b/htdocs/langs/en_US/sendings.lang index 4d4aca48cd9..53a4e4dae7a 100644 --- a/htdocs/langs/en_US/sendings.lang +++ b/htdocs/langs/en_US/sendings.lang @@ -69,6 +69,7 @@ ProductQtyInCustomersOrdersRunning=Product quantity into opened customers orders ProductQtyInSuppliersOrdersRunning=Product quantity into opened suppliers orders ProductQtyInShipmentAlreadySent=Product quantity from opened customer order already sent ProductQtyInSuppliersShipmentAlreadyRecevied=Product quantity from opened supplier order already received +NoProductToShipFoundIntoStock=No product to ship found into warehouse %s. Correct sotck or go back to choose another warehouse. # Sending methods SendingMethodCATCH=Catch by customer