diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 158440c5855..14cd07ec817 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -924,8 +924,8 @@ print ""; print ""; print ''; -if(!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE)) { - +if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE)) +{ print '

'; print_titre($langs->trans('AddNewProductStockWarehouse')); //print '
'; @@ -944,11 +944,11 @@ if(!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE)) { $pse = new ProductStockEntrepot($db); $lines = $pse->fetchAll(GETPOST('id')); - if(!empty($lines)) { - + if (!empty($lines)) + { $var=false; - foreach($lines as $line) { - + foreach($lines as $line) + { $ent = new Entrepot($db); $ent->fetch($line['fk_entrepot']); print ''.$ent->getNomUrl(3).''; @@ -957,15 +957,12 @@ if(!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE)) { print ''.img_delete().''; print ''; $var=!$var; - } - } print ""; print ''; - } llxFooter(); diff --git a/htdocs/product/stock/tpl/stockcorrection.tpl.php b/htdocs/product/stock/tpl/stockcorrection.tpl.php index d08cf334671..757407a6692 100644 --- a/htdocs/product/stock/tpl/stockcorrection.tpl.php +++ b/htdocs/product/stock/tpl/stockcorrection.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2017 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,6 +15,7 @@ * along with this program. If not, see . * * $object must be defined + * $backtopage */ ?> @@ -54,30 +55,34 @@ print ''; if ($object->element == 'product') { - print ''.$langs->trans("Warehouse").''; - print ''; + print ''.$langs->trans("Warehouse").''; + print ''; print $formproduct->selectWarehouses((GETPOST("dwid")?GETPOST("dwid",'int'):(GETPOST('id_entrepot')?GETPOST('id_entrepot','int'):'ifone')), 'id_entrepot', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'minwidth100'); + print '   '; print ''; } if ($object->element == 'stock') { print ''.$langs->trans("Product").''; - print ''; + print ''; print $form->select_produits(GETPOST('product_id'), 'product_id', (empty($conf->global->STOCK_SUPPORTS_SERVICES)?'0':''), 20, 0, -1); + print '   '; print ''; } - print ''; - print ''; - print ''.$langs->trans("NumberOfUnit").''; + print ''.$langs->trans("NumberOfUnit").''; + print ''; print ''; // Purchase price print ''; - print ''.$langs->trans("UnitPurchaseValue").''; - print ''; + print ''.$langs->trans("UnitPurchaseValue").''; + print ''; if (! empty($conf->projet->enabled)) { print ''.$langs->trans('Project').''; @@ -94,15 +99,15 @@ ) { print ''; - print 'element == 'stock'?'': ' class="fieldrequired"').'>'.$langs->trans("batch_number").''; + print 'element == 'stock'?'': ' class="fieldrequired"').'>'.$langs->trans("batch_number").''; print ''; print ''; - print ''; - print ''.$langs->trans("EatByDate").''; + print ''; + print ''; + print ''.$langs->trans("EatByDate").''; $eatbyselected=dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear')); $form->select_date($eatbyselected,'eatby','','',1,""); print ''; - print ''; print ''.$langs->trans("SellByDate").''; $sellbyselected=dol_mktime(0, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear')); $form->select_date($sellbyselected,'sellby','','',1,""); @@ -113,11 +118,11 @@ // Label of mouvement of id of inventory $valformovementlabel=((GETPOST("label") && (GETPOST('label') != $langs->trans("MovementCorrectStock",''))) ? GETPOST("label") : $langs->trans("MovementCorrectStock", $productref)); print ''; - print ''.$langs->trans("MovementLabel").''; - print ''; + print ''.$langs->trans("MovementLabel").''; + print ''; print ''; print ''; - print ''.$langs->trans("InventoryCode").''; + print ''.$langs->trans("InventoryCode").''; print ''; print ''; diff --git a/htdocs/product/stock/tpl/stocktransfer.tpl.php b/htdocs/product/stock/tpl/stocktransfer.tpl.php index b38804c05b1..407d8a714d8 100644 --- a/htdocs/product/stock/tpl/stocktransfer.tpl.php +++ b/htdocs/product/stock/tpl/stocktransfer.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2017 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -61,23 +61,23 @@ print ''; if ($object->element == 'product') { - print ''.$langs->trans("WarehouseSource").''; - print ''; + print ''.$langs->trans("WarehouseSource").''; + print ''; print $formproduct->selectWarehouses((GETPOST("dwid")?GETPOST("dwid",'int'):(GETPOST('id_entrepot')?GETPOST('id_entrepot','int'):'ifone')), 'id_entrepot', 'warehouseopen,warehouseinternal', 1); print ''; } if ($object->element == 'stock') { - print ''.$langs->trans("Product").''; - print ''; + print ''.$langs->trans("Product").''; + print ''; print $form->select_produits(GETPOST('product_id'),'product_id',(empty($conf->global->STOCK_SUPPORTS_SERVICES)?'0':'')); print ''; } - print ''.$langs->trans("WarehouseTarget").''; + print ''.$langs->trans("WarehouseTarget").''; print $formproduct->selectWarehouses(GETPOST('id_entrepot_destination'), 'id_entrepot_destination', 'warehouseopen,warehouseinternal', 1); - print ''; - print ''.$langs->trans("NumberOfUnit").''; + print ''; + print ''.$langs->trans("NumberOfUnit").''; print ''; // Serial / Eat-by date @@ -87,7 +87,7 @@ ) { print ''; - print 'element == 'stock'?'': ' class="fieldrequired"').'>'.$langs->trans("batch_number").''; + print 'element == 'stock'?'': ' class="fieldrequired"').'>'.$langs->trans("batch_number").''; if ($pdluoid > 0) { // If form was opened for a specific pdluoid, field is disabled @@ -99,14 +99,15 @@ print ''; } print ''; - print ''; + print ''; + + print ''; print ''.$langs->trans("EatByDate").''; print $form->select_date(($d_eatby?$d_eatby:$pdluo->eatby),'eatby','','',1,"", 1, 0, 1, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled print ''; print ''.$langs->trans("SellByDate").''; print $form->select_date(($d_sellby?$d_sellby:$pdluo->sellby),'sellby','','',1,"", 1, 0, 1, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled print ''; - print ''; print ''; } @@ -114,10 +115,10 @@ $valformovementlabel=(GETPOST("label")?GETPOST("label"):$langs->trans("MovementTransferStock", $productref)); print ''; print ''.$langs->trans("MovementLabel").''; - print ''; + print ''; print ''; print ''; - print ''.$langs->trans("InventoryCode").''; + print ''.$langs->trans("InventoryCode").''; print ''; print '';