@@ -1175,7 +1179,7 @@ if ($action == 'create')
$subj=0;
print '';
- $warehouseObject=new Entrepot($db);
+ $tmpwarehouseObject=new Entrepot($db);
$productlotObject=new Productlot($db);
// Define nb of lines suggested for this order line
$nbofsuggested=0;
@@ -1190,7 +1194,7 @@ if ($action == 'create')
}
foreach ($product->stock_warehouse as $warehouse_id=>$stock_warehouse)
{
- $warehouseObject->fetch($warehouse_id);
+ $tmpwarehouseObject->fetch($warehouse_id);
if (($stock_warehouse->real > 0) && (count($stock_warehouse->detail_batch))) {
foreach ($stock_warehouse->detail_batch as $dbatch)
{
@@ -1203,7 +1207,7 @@ if ($action == 'create')
print '
';
- print $warehouseObject->getNomUrl(0).' / ';
+ print $tmpwarehouseObject->getNomUrl(0).' / ';
print '';
print '';
@@ -1223,6 +1227,7 @@ if ($action == 'create')
}
}
}
+
}
if ($subj == 0) // Line not shown yet, we show it
{
@@ -1246,8 +1251,11 @@ if ($action == 'create')
print '
';
if ($line->product_type == 0 || ! empty($conf->global->STOCK_SUPPORTS_SERVICES))
{
- if ($warehouseObject)
+ $warehouse_selected_id = GETPOST('entrepot_id','int');
+ if ($warehouse_selected_id > 0)
{
+ $warehouseObject=new Entrepot($db);
+ $warehouseObject->fetch($warehouse_selected_id);
print img_warning().' '.$langs->trans("NoProductToShipFoundIntoStock", $warehouseObject->libelle);
}
else
diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang
index 48ced509c47..0ab21cae322 100644
--- a/htdocs/langs/en_US/products.lang
+++ b/htdocs/langs/en_US/products.lang
@@ -198,6 +198,7 @@ MultipriceRules=Price segment rules
UseMultipriceRules=Use price segment rules (defined into product module setup) to autocalculate prices of all other segment according to first segment
PercentVariationOver=%% variation over %s
PercentDiscountOver=%% discount over %s
+KeepEmptyForAutoCalculation=Keep empty to have this calculated automatically from weight or volume of products
### composition fabrication
Build=Produce
ProductsMultiPrice=Products and prices for each price segment