diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php
index 5ae9e06f2ca..69f9dc89d9a 100644
--- a/htdocs/product/stock/product.php
+++ b/htdocs/product/stock/product.php
@@ -770,11 +770,7 @@ else
}
-/* ************************************************************************** */
-/* */
-/* Barre d'action */
-/* */
-/* ************************************************************************** */
+// Actions buttons
$parameters = array();
diff --git a/htdocs/product/stock/tpl/stockcorrection.tpl.php b/htdocs/product/stock/tpl/stockcorrection.tpl.php
index 6d63d258c9c..1f24e44a266 100644
--- a/htdocs/product/stock/tpl/stockcorrection.tpl.php
+++ b/htdocs/product/stock/tpl/stockcorrection.tpl.php
@@ -66,67 +66,67 @@ if (empty($conf) || !is_object($conf)) {
// Warehouse or product
print '
';
-if ($object->element == 'product')
-{
- print ''.$langs->trans("Warehouse").' ';
- print '';
- print $formproduct->selectWarehouses((GETPOST("dwid") ?GETPOST("dwid", 'int') : (GETPOST('id_entrepot') ?GETPOST('id_entrepot', 'int') : ($object->element == 'product' && $object->fk_default_warehouse ? $object->fk_default_warehouse : 'ifone'))), 'id_entrepot', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'minwidth100');
- print ' ';
- print ''.$langs->trans("Add").' ';
- print ''.$langs->trans("Delete").' ';
- print ' ';
- print ' ';
-}
-if ($object->element == 'stock')
-{
- print ''.$langs->trans("Product").' ';
- print '';
- $form->select_produits(GETPOST('product_id', 'int'), 'product_id', (empty($conf->global->STOCK_SUPPORTS_SERVICES) ? '0' : ''), 0, 0, -1, 2, '', 0, null, 0, 1, 0, 'maxwidth500');
- print ' ';
- print ''.$langs->trans("Add").' ';
- print ''.$langs->trans("Delete").' ';
- print ' ';
- print ' ';
-}
+ if ($object->element == 'product')
+ {
+ print ''.$langs->trans("Warehouse").' ';
+ print '';
+ print $formproduct->selectWarehouses((GETPOST("dwid") ?GETPOST("dwid", 'int') : (GETPOST('id_entrepot') ?GETPOST('id_entrepot', 'int') : ($object->element == 'product' && $object->fk_default_warehouse ? $object->fk_default_warehouse : 'ifone'))), 'id_entrepot', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'minwidth100');
+ print ' ';
+ print ''.$langs->trans("Add").' ';
+ print ''.$langs->trans("Delete").' ';
+ print ' ';
+ print ' ';
+ }
+ if ($object->element == 'stock')
+ {
+ print ''.$langs->trans("Product").' ';
+ print '';
+ $form->select_produits(GETPOST('product_id', 'int'), 'product_id', (empty($conf->global->STOCK_SUPPORTS_SERVICES) ? '0' : ''), 0, 0, -1, 2, '', 0, null, 0, 1, 0, 'maxwidth500');
+ print ' ';
+ print ''.$langs->trans("Add").' ';
+ print ''.$langs->trans("Delete").' ';
+ print ' ';
+ print ' ';
+ }
print ''.$langs->trans("NumberOfUnit").' ';
- print ' ';
- print ' ';
-
- // Purchase price
- print '';
- print ''.$langs->trans("UnitPurchaseValue").' ';
- print ' ';
-if (!empty($conf->projet->enabled))
-{
- print ''.$langs->trans('Project').' ';
- print '';
- $formproject->select_projects(-1, '', 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0, 'maxwidth300');
- print ' ';
-}
+ print ' ';
print ' ';
// Serial / Eat-by date
-if (!empty($conf->productbatch->enabled) &&
- (($object->element == 'product' && $object->hasbatch())
- || ($object->element == 'stock'))
- )
-{
- print '';
- print 'element == 'stock' ? '' : ' class="fieldrequired"').'>'.$langs->trans("batch_number").' ';
- print ' ';
- print ' ';
- print ' ';
- print '';
- print ''.$langs->trans("EatByDate").' ';
- $eatbyselected = dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear'));
- print $form->selectDate($eatbyselected, 'eatby', '', '', 1, "");
- print ' ';
- print ''.$langs->trans("SellByDate").' ';
- $sellbyselected = dol_mktime(0, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear'));
- print $form->selectDate($sellbyselected, 'sellby', '', '', 1, "");
- print ' ';
- print ' ';
-}
+ if (!empty($conf->productbatch->enabled) &&
+ (($object->element == 'product' && $object->hasbatch())
+ || ($object->element == 'stock'))
+ )
+ {
+ print '';
+ print 'element == 'stock' ? '' : ' class="fieldrequired"').'>'.$langs->trans("batch_number").' ';
+ print ' ';
+ print ' ';
+ print ' ';
+ print '';
+ print ''.$langs->trans("EatByDate").' ';
+ $eatbyselected = dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear'));
+ print $form->selectDate($eatbyselected, 'eatby', '', '', 1, "");
+ print ' ';
+ print ''.$langs->trans("SellByDate").' ';
+ $sellbyselected = dol_mktime(0, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear'));
+ print $form->selectDate($sellbyselected, 'sellby', '', '', 1, "");
+ print ' ';
+ print ' ';
+ }
+
+ // Purchase price and project
+ print '';
+ print ''.$langs->trans("UnitPurchaseValue").' ';
+ print ' ';
+ if (!empty($conf->projet->enabled))
+ {
+ print ''.$langs->trans('Project').' ';
+ print '';
+ $formproject->select_projects(-1, '', 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0, 'maxwidth300');
+ print ' ';
+ }
+ print ' ';
// Label of mouvement of id of inventory
$valformovementlabel = ((GETPOST("label") && (GETPOST('label') != $langs->trans("MovementCorrectStock", ''))) ? GETPOST("label") : $langs->trans("MovementCorrectStock", $productref));