diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index d2b53337abe..ac56bd2fe5a 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2020 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -75,6 +75,9 @@ class Establishment extends CommonObject */ public $rowid; + /** + * @var string Label + */ public $label; /** @@ -82,9 +85,21 @@ class Establishment extends CommonObject */ public $address; + /** + * @var string Zip + */ public $zip; + + /** + * @var string Town + */ public $town; + /** + * @var int country id + */ + public $country_id; + /** * @var int Status 0=open, 1=closed */ @@ -95,8 +110,15 @@ class Establishment extends CommonObject */ public $entity; - public $country_id; + /** + * @var int user mod id + */ + public $fk_user_mod; + /** + * @var int user author id + */ + public $fk_user_author; const STATUS_OPEN = 1; const STATUS_CLOSED = 0; @@ -148,6 +170,7 @@ class Establishment extends CommonObject $now = dol_now(); // Clean parameters + $this->label = trim($this->label); $this->address = trim($this->address); $this->zip = trim($this->zip); $this->town = trim($this->town); @@ -189,10 +212,6 @@ class Establishment extends CommonObject $this->errors[] = "Error ".$this->db->lasterror(); } - if (!$error) { - $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."establishment"); - } - // Commit or rollback if ($error) { foreach ($this->errors as $errmsg) {