diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index cd1c9ecfd1b..a6878473fea 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -853,6 +853,9 @@ if ($id > 0) $result3=$object->fetch_contact(); $result4=$object->fetch_userassigned(); $result5=$object->fetch_optionals($id,$extralabels); + + $percentage=in_array(GETPOST('status'),array(-1,100))?GETPOST('status'):(in_array(GETPOST('complete'),array(-1,100))?GETPOST('complete'):GETPOST("percentage")); // If status is -1 or 100, percentage is not defined and we must use status + if($listUserAssignedUpdated || $donotclearsession) { @@ -1030,7 +1033,7 @@ if ($id > 0) // Status print ''.$langs->trans("Status").' / '.$langs->trans("Percentage").''; - $percent=GETPOST("percentage")?GETPOST("percentage"):$object->percentage; + $percent = GETPOST("percentage") ? GETPOST("percentage"): $object->percentage; $formactions->form_select_status_action('formaction',$percent,1); print '';