diff --git a/htdocs/mrp/mo_card.php b/htdocs/mrp/mo_card.php
index abaf216b7ab..ca3278c241b 100644
--- a/htdocs/mrp/mo_card.php
+++ b/htdocs/mrp/mo_card.php
@@ -620,7 +620,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print ''.$langs->trans("ToClone").'';
}
- // Cancel
+ // Cancel - Reopen
if ($permissiontoadd)
{
if ($object->status == $object::STATUS_VALIDATED || $object->status == $object::STATUS_INPROGRESS)
diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php
index 873b154ffeb..278b32043d0 100644
--- a/htdocs/mrp/mo_production.php
+++ b/htdocs/mrp/mo_production.php
@@ -551,12 +551,25 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print ''.$langs->trans('ConsumeAndProduceAll').'';
}
- // Reopen
- if ($object->status == Mo::STATUS_PRODUCED) {
- if ($permissiontoproduce) {
- print 'id.'&action=confirm_reopen">'.$langs->trans('ReOpen').'';
- } else {
- print ''.$langs->trans('ReOpen').'';
+ // Cancel - Reopen
+ if ($permissiontoadd)
+ {
+ if ($object->status == $object::STATUS_VALIDATED || $object->status == $object::STATUS_INPROGRESS)
+ {
+ print 'id.'&action=confirm_close&confirm=yes">'.$langs->trans("Cancel").''."\n";
+ }
+
+ if ($object->status == $object::STATUS_CANCELED)
+ {
+ print 'id.'&action=confirm_reopen&confirm=yes">'.$langs->trans("Re-Open").''."\n";
+ }
+
+ if ($object->status == $object::STATUS_PRODUCED) {
+ if ($permissiontoproduce) {
+ print 'id.'&action=confirm_reopen">'.$langs->trans('ReOpen').'';
+ } else {
+ print ''.$langs->trans('ReOpen').'';
+ }
}
}
}