From a707d4025161c05539d402e9c39ca5268f76dc92 Mon Sep 17 00:00:00 2001 From: Gauthier Date: Fri, 29 May 2015 14:32:50 +0200 Subject: [PATCH] FIX : when we create an agenda event with "Not applicable" status, it is automatically saved with "To do" status --- htdocs/comm/action/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 447d2264f41..8dce1b39df0 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -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"));