forked from Wavyzz/dolibarr
Fix: priority is a field smallint.
This commit is contained in:
@@ -58,7 +58,7 @@ class ActionComm extends CommonObject
|
||||
var $percentage; // Percentage
|
||||
var $location; // Location
|
||||
var $transparency; // Transparency (ical standard). Used to say if people assigned to event are busy or not by event. 0=available, 1=busy, 2=busy (refused events)
|
||||
var $priority; // Free text ('' By default)
|
||||
var $priority; // Small int (0 By default)
|
||||
var $note; // Description
|
||||
|
||||
var $usertodo; // Object user that must do action
|
||||
@@ -116,7 +116,7 @@ class ActionComm extends CommonObject
|
||||
$this->location=dol_trunc(trim($this->location),128);
|
||||
$this->note=dol_htmlcleanlastbr(trim($this->note));
|
||||
if (empty($this->percentage)) $this->percentage = 0;
|
||||
if (empty($this->priority)) $this->priority = 0;
|
||||
if (empty($this->priority) || ! is_numeric($this->priority)) $this->priority = 0;
|
||||
if (empty($this->fulldayevent)) $this->fulldayevent = 0;
|
||||
if (empty($this->punctual)) $this->punctual = 0;
|
||||
if (empty($this->transparency)) $this->transparency = 0;
|
||||
@@ -438,7 +438,7 @@ class ActionComm extends CommonObject
|
||||
$this->label=trim($this->label);
|
||||
$this->note=trim($this->note);
|
||||
if (empty($this->percentage)) $this->percentage = 0;
|
||||
if (empty($this->priority)) $this->priority = 0;
|
||||
if (empty($this->priority) || ! is_numeric($this->priority)) $this->priority = 0;
|
||||
if (empty($this->transparency)) $this->transparency = 0;
|
||||
if (empty($this->fulldayevent)) $this->fulldayevent = 0;
|
||||
if ($this->percentage > 100) $this->percentage = 100;
|
||||
@@ -1064,7 +1064,7 @@ class ActionComm extends CommonObject
|
||||
$this->percentage=0;
|
||||
$this->location='Location';
|
||||
$this->transparency=0;
|
||||
$this->priority='Priority X';
|
||||
$this->priority=1;
|
||||
$this->note = 'Note';
|
||||
}
|
||||
|
||||
|
||||
@@ -167,8 +167,7 @@ if ($action == 'add_action')
|
||||
$actioncomm->datep = $datep;
|
||||
$actioncomm->datef = $datef;
|
||||
$actioncomm->percentage = $percentage;
|
||||
$actioncomm->duree=((float) (GETPOST('dureehour') * 60) + (float) GETPOST('dureemin')) *
|
||||
60;
|
||||
$actioncomm->duree=((float) (GETPOST('dureehour') * 60) + (float) GETPOST('dureemin')) * 60;
|
||||
|
||||
$usertodo=new User($db);
|
||||
if ($_POST["affectedto"] > 0)
|
||||
|
||||
Reference in New Issue
Block a user