mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-16 06:21:28 +01:00
Clean code
This commit is contained in:
@@ -177,12 +177,6 @@ class ActionComm extends CommonObject
|
||||
*/
|
||||
public $fulldayevent = 0;
|
||||
|
||||
/**
|
||||
* @var int Milestone
|
||||
* @deprecated Milestone is already event with end date = start date
|
||||
*/
|
||||
public $punctual = 1;
|
||||
|
||||
/**
|
||||
* @var integer Percentage
|
||||
*/
|
||||
@@ -384,7 +378,6 @@ class ActionComm extends CommonObject
|
||||
if (empty($this->percentage)) $this->percentage = 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;
|
||||
if ($this->percentage > 100) $this->percentage = 100;
|
||||
//if ($this->percentage == 100 && ! $this->dateend) $this->dateend = $this->date;
|
||||
@@ -462,7 +455,7 @@ class ActionComm extends CommonObject
|
||||
$sql .= "fk_user_author,";
|
||||
$sql .= "fk_user_action,";
|
||||
$sql .= "fk_user_done,";
|
||||
$sql .= "label,percent,priority,fulldayevent,location,punctual,";
|
||||
$sql .= "label,percent,priority,fulldayevent,location,";
|
||||
$sql .= "transparency,";
|
||||
$sql .= "fk_element,";
|
||||
$sql .= "elementtype,";
|
||||
@@ -492,7 +485,7 @@ class ActionComm extends CommonObject
|
||||
$sql .= (isset($user->id) && $user->id > 0 ? $user->id : "null").", ";
|
||||
$sql .= ($userownerid > 0 ? $userownerid : "null").", ";
|
||||
$sql .= ($userdoneid > 0 ? $userdoneid : "null").", ";
|
||||
$sql .= "'".$this->db->escape($this->label)."','".$this->db->escape($this->percentage)."','".$this->db->escape($this->priority)."','".$this->db->escape($this->fulldayevent)."','".$this->db->escape($this->location)."','".$this->db->escape($this->punctual)."', ";
|
||||
$sql .= "'".$this->db->escape($this->label)."','".$this->db->escape($this->percentage)."','".$this->db->escape($this->priority)."','".$this->db->escape($this->fulldayevent)."','".$this->db->escape($this->location)."', ";
|
||||
$sql .= "'".$this->db->escape($this->transparency)."', ";
|
||||
$sql .= (!empty($this->fk_element) ? $this->fk_element : "null").", ";
|
||||
$sql .= (!empty($this->elementtype) ? "'".$this->db->escape($this->elementtype)."'" : "null").", ";
|
||||
@@ -693,7 +686,7 @@ class ActionComm extends CommonObject
|
||||
$sql .= " a.fk_user_action, a.fk_user_done,";
|
||||
$sql .= " a.fk_contact, a.percent as percentage,";
|
||||
$sql .= " a.fk_element as elementid, a.elementtype,";
|
||||
$sql .= " a.priority, a.fulldayevent, a.location, a.punctual, a.transparency,";
|
||||
$sql .= " a.priority, a.fulldayevent, a.location, a.transparency,";
|
||||
$sql .= " c.id as type_id, c.code as type_code, c.libelle as type_label, c.color as type_color, c.picto as type_picto,";
|
||||
$sql .= " s.nom as socname,";
|
||||
$sql .= " u.firstname, u.lastname as lastname";
|
||||
@@ -758,7 +751,6 @@ class ActionComm extends CommonObject
|
||||
$this->fulldayevent = $obj->fulldayevent;
|
||||
$this->location = $obj->location;
|
||||
$this->transparency = $obj->transparency;
|
||||
$this->punctual = $obj->punctual; // deprecated
|
||||
|
||||
$this->socid = $obj->fk_soc; // To have fetch_thirdparty method working
|
||||
$this->contactid = $obj->fk_contact; // To have fetch_contact method working
|
||||
@@ -1612,7 +1604,7 @@ class ActionComm extends CommonObject
|
||||
$sql .= " a.fk_user_action,";
|
||||
$sql .= " a.fk_contact, a.percent as percentage,";
|
||||
$sql .= " a.fk_element, a.elementtype,";
|
||||
$sql .= " a.priority, a.fulldayevent, a.location, a.punctual, a.transparency,";
|
||||
$sql .= " a.priority, a.fulldayevent, a.location, a.transparency,";
|
||||
$sql .= " u.firstname, u.lastname, u.email,";
|
||||
$sql .= " s.nom as socname,";
|
||||
$sql .= " c.id as type_id, c.code as type_code, c.libelle as type_label";
|
||||
@@ -1719,7 +1711,6 @@ class ActionComm extends CommonObject
|
||||
$event['fulldayevent'] = $obj->fulldayevent;
|
||||
$event['location'] = $obj->location;
|
||||
$event['transparency'] = (($obj->transparency > 0) ? 'OPAQUE' : 'TRANSPARENT'); // OPAQUE (busy) or TRANSPARENT (not busy)
|
||||
$event['punctual'] = $obj->punctual;
|
||||
$event['category'] = $obj->type_label;
|
||||
$event['email'] = $obj->email;
|
||||
// Define $urlwithroot
|
||||
@@ -1929,11 +1920,7 @@ class ActionComm extends CommonObject
|
||||
$this->datem = $now;
|
||||
$this->datep = $now;
|
||||
$this->datef = $now;
|
||||
$this->author = $user;
|
||||
$this->usermod = $user;
|
||||
$this->usertodo = $user;
|
||||
$this->fulldayevent = 0;
|
||||
$this->punctual = 0;
|
||||
$this->percentage = 0;
|
||||
$this->location = 'Location';
|
||||
$this->transparency = 1; // 1 means opaque
|
||||
|
||||
@@ -255,7 +255,6 @@ class CommActionRapport
|
||||
$eventstatic->id = $obj->id;
|
||||
$eventstatic->percentage = $obj->percent;
|
||||
$eventstatic->fulldayevent = $obj->fulldayevent;
|
||||
$eventstatic->punctual = $obj->punctual;
|
||||
|
||||
$y = max($y, $pdf->GetY(), $y0, $y1, $y2, $y3);
|
||||
|
||||
|
||||
@@ -898,7 +898,6 @@ class InterfaceActionsAuto extends DolibarrTriggers
|
||||
$actioncomm->datep = $now;
|
||||
$actioncomm->datef = $now;
|
||||
$actioncomm->durationp = 0;
|
||||
$actioncomm->punctual = 1;
|
||||
$actioncomm->percentage = -1; // Not applicable
|
||||
$actioncomm->socid = $societeforaction->id;
|
||||
$actioncomm->contactid = $contactforaction->id;
|
||||
|
||||
@@ -48,7 +48,6 @@ create table llx_actioncomm
|
||||
priority smallint, -- priority (ical standard)
|
||||
visibility varchar(12) DEFAULT 'default', -- visibility (ical standard) - 'default', 'public', 'private', 'confidential'
|
||||
fulldayevent smallint NOT NULL default 0, -- full day (ical standard)
|
||||
punctual smallint NOT NULL default 1, -- deprecated. milestone is event with date start (datep) = date end (datep2)
|
||||
percent smallint NOT NULL default 0,
|
||||
location varchar(128),
|
||||
durationp real, -- planed duration
|
||||
|
||||
Reference in New Issue
Block a user