Fix button cancel and re-open
This commit is contained in:
parent
03ee488d5f
commit
3c865cbf72
@ -620,7 +620,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->fk_soc.'&action=clone&object=mo">'.$langs->trans("ToClone").'</a>';
|
||||
}
|
||||
|
||||
// Cancel
|
||||
// Cancel - Reopen
|
||||
if ($permissiontoadd)
|
||||
{
|
||||
if ($object->status == $object::STATUS_VALIDATED || $object->status == $object::STATUS_INPROGRESS)
|
||||
|
||||
@ -551,12 +551,25 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("ValidateBefore").'">'.$langs->trans('ConsumeAndProduceAll').'</a>';
|
||||
}
|
||||
|
||||
// Reopen
|
||||
if ($object->status == Mo::STATUS_PRODUCED) {
|
||||
if ($permissiontoproduce) {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_reopen">'.$langs->trans('ReOpen').'</a>';
|
||||
} else {
|
||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans('ReOpen').'</a>';
|
||||
// Cancel - Reopen
|
||||
if ($permissiontoadd)
|
||||
{
|
||||
if ($object->status == $object::STATUS_VALIDATED || $object->status == $object::STATUS_INPROGRESS)
|
||||
{
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_close&confirm=yes">'.$langs->trans("Cancel").'</a>'."\n";
|
||||
}
|
||||
|
||||
if ($object->status == $object::STATUS_CANCELED)
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_reopen&confirm=yes">'.$langs->trans("Re-Open").'</a>'."\n";
|
||||
}
|
||||
|
||||
if ($object->status == $object::STATUS_PRODUCED) {
|
||||
if ($permissiontoproduce) {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_reopen">'.$langs->trans('ReOpen').'</a>';
|
||||
} else {
|
||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans('ReOpen').'</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user