Merge pull request #2921 from atm-gauthier/3.7

FIX : when we create an agenda event with "Not applicable" status, it…
This commit is contained in:
Laurent Destailleur 2015-05-30 15:10:53 +02:00
commit d9e8b6d977

View File

@ -149,7 +149,7 @@ if ($action == 'add')
exit;
}
$percentage=in_array(GETPOST('status'),array(-1,100))?GETPOST('status'):GETPOST("percentage"); // If status is -1 or 100, percentage is not defined and we must use status
$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
// Clean parameters
$datep=dol_mktime($fulldayevent?'00':GETPOST("aphour"), $fulldayevent?'00':GETPOST("apmin"), 0, GETPOST("apmonth"), GETPOST("apday"), GETPOST("apyear"));