Fix: Bug: if $this->employe no exist

Fix: if this->employee no exist default 0
This commit is contained in:
Sergio Sanchis Climent 2015-10-23 13:04:33 +02:00
parent 90a221ef6d
commit 2a412af00b
2 changed files with 2 additions and 3 deletions

View File

@ -26,7 +26,7 @@ create table llx_user
ref_ext varchar(50), -- reference into an external system (not used by dolibarr)
ref_int varchar(50), -- reference into an internal system (deprecated)
employee tinyint DEFAULT 0, -- employee 0/1
employee tinyint DEFAULT 0, -- 1 if user is an employee
datec datetime,
tms timestamp,
@ -76,7 +76,6 @@ create table llx_user
nb_holiday integer DEFAULT 0,
thm double(24,8),
tjm double(24,8),
employee tinyint DEFAULT 1, -- 1 if user is an employee
salary double(24,8),
salaryextra double(24,8),
weeklyhours double(16,8)

View File

@ -1156,7 +1156,7 @@ class User extends CommonObject
// Clean parameters
$this->lastname = trim($this->lastname);
$this->firstname = trim($this->firstname);
$this->employee = trim($this->employee);
$this->employee = $this->employee?$this->employee:0;
$this->login = trim($this->login);
$this->gender = trim($this->gender);
$this->pass = trim($this->pass);