diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index cd1c9ecfd1b08ddce86db164522ed03f2a9ea124..a6878473fea916a703d9fa869079edf8385c8799 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 '<tr><td class="nowrap">'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="3">'; - $percent=GETPOST("percentage")?GETPOST("percentage"):$object->percentage; + $percent = GETPOST("percentage") ? GETPOST("percentage"): $object->percentage; $formactions->form_select_status_action('formaction',$percent,1); print '</td></tr>';