diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php
index 784b91f6f4c..510e7a433f4 100644
--- a/htdocs/mrp/mo_production.php
+++ b/htdocs/mrp/mo_production.php
@@ -945,7 +945,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if ($action == 'consumeorproduce' && !GETPOSTISSET('qty-'.$line->id.'-'.$i)) {
$preselected = 0;
}
- print '
| ';
+
+ $disable = '';
+ if (!empty($conf->global->MRP_NEVER_CONSUME_MORE_THAN_EXPECTED) && ($line->qty - $alreadyconsumed) <= 0) {
+ $disable = 'disabled';
+ }
+
+ print ' | ';
if ($permissiontoupdatecost && !empty($conf->global->MRP_SHOW_COST_FOR_CONSUMPTION)) {
print ' | ';
}
@@ -967,7 +973,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '';
if ($tmpproduct->status_batch) {
$preselected = (GETPOSTISSET('batch-'.$line->id.'-'.$i) ? GETPOST('batch-'.$line->id.'-'.$i) : '');
- print '';
+ print '';
+ print $formproduct->selectLot('batch-'.$line->id.'-'.$i, 0, $line->fk_product, '', '');
}
print ' | ';
}
diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php
index 64517c25443..f17b583c5b8 100644
--- a/htdocs/product/class/html.formproduct.class.php
+++ b/htdocs/product/class/html.formproduct.class.php
@@ -591,6 +591,7 @@ class FormProduct
}
$out .= '