diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php
index 28075a5c463..83c512c050f 100644
--- a/htdocs/mrp/mo_production.php
+++ b/htdocs/mrp/mo_production.php
@@ -1014,6 +1014,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if (in_array($action, array('consumeorproduce', 'consumeandproduceall'))) {
$i = 1;
print ''."\n";
+ $maxQty = 1;
+ print '
';
print '
';
// Ref
print '| '.$langs->trans("ToConsume").' | ';
@@ -1332,6 +1334,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if (in_array($action, array('consumeorproduce', 'consumeandproduceall'))) {
print ''."\n";
+ $maxQty = 1;
+ print '
';
print '
';
print '| '.$langs->trans("ToProduce").' | ';
$preselected = (GETPOSTISSET('qtytoproduce-'.$line->id.'-'.$i) ? GETPOST('qtytoproduce-'.$line->id.'-'.$i) : max(0, $line->qty - $alreadyproduced));