Merge pull request #7081 from atm-florian/5.0

fix class error (given by eclipse Oxygen version)
This commit is contained in:
Laurent Destailleur 2017-07-07 18:35:48 +02:00 committed by GitHub
commit b0359b4659
2 changed files with 238 additions and 238 deletions

File diff suppressed because it is too large Load Diff

View File

@ -46,7 +46,7 @@ class Cpaiement
/** /**
*/ */
public $code; public $code;
public $libelle; public $libelle;
public $type; public $type;
@ -56,7 +56,7 @@ class Cpaiement
/** /**
*/ */
/** /**
* Constructor * Constructor
@ -83,7 +83,7 @@ class Cpaiement
$error = 0; $error = 0;
// Clean parameters // Clean parameters
if (isset($this->code)) { if (isset($this->code)) {
$this->code = trim($this->code); $this->code = trim($this->code);
} }
@ -103,14 +103,14 @@ class Cpaiement
$this->module = trim($this->module); $this->module = trim($this->module);
} }
// Check parameters // Check parameters
// Put here code to add control on parameters values // Put here code to add control on parameters values
// Insert request // Insert request
$sql = 'INSERT INTO ' . MAIN_DB_PREFIX . $this->table_element . '('; $sql = 'INSERT INTO ' . MAIN_DB_PREFIX . $this->table_element . '(';
$sql.= 'id,'; $sql.= 'id,';
$sql.= 'code,'; $sql.= 'code,';
$sql.= 'libelle,'; $sql.= 'libelle,';
@ -119,9 +119,9 @@ class Cpaiement
$sql.= 'accountancy_code,'; $sql.= 'accountancy_code,';
$sql.= 'module'; $sql.= 'module';
$sql .= ') VALUES ('; $sql .= ') VALUES (';
$sql .= ' '.(! isset($this->id)?'NULL':$this->id).','; $sql .= ' '.(! isset($this->id)?'NULL':$this->id).',';
$sql .= ' '.(! isset($this->code)?'NULL':"'".$this->db->escape($this->code)."'").','; $sql .= ' '.(! isset($this->code)?'NULL':"'".$this->db->escape($this->code)."'").',';
$sql .= ' '.(! isset($this->libelle)?'NULL':"'".$this->db->escape($this->libelle)."'").','; $sql .= ' '.(! isset($this->libelle)?'NULL':"'".$this->db->escape($this->libelle)."'").',';
@ -130,7 +130,7 @@ class Cpaiement
$sql .= ' '.(! isset($this->accountancy_code)?'NULL':"'".$this->db->escape($this->accountancy_code)."'").','; $sql .= ' '.(! isset($this->accountancy_code)?'NULL':"'".$this->db->escape($this->accountancy_code)."'").',';
$sql .= ' '.(! isset($this->module)?'NULL':"'".$this->db->escape($this->module)."'"); $sql .= ' '.(! isset($this->module)?'NULL':"'".$this->db->escape($this->module)."'");
$sql .= ')'; $sql .= ')';
$this->db->begin(); $this->db->begin();
@ -202,7 +202,7 @@ class Cpaiement
$obj = $this->db->fetch_object($resql); $obj = $this->db->fetch_object($resql);
$this->id = $obj->id; $this->id = $obj->id;
$this->code = $obj->code; $this->code = $obj->code;
$this->libelle = $obj->libelle; $this->libelle = $obj->libelle;
$this->type = $obj->type; $this->type = $obj->type;
@ -210,7 +210,7 @@ class Cpaiement
$this->accountancy_code = $obj->accountancy_code; $this->accountancy_code = $obj->accountancy_code;
$this->module = $obj->module; $this->module = $obj->module;
} }
$this->db->free($resql); $this->db->free($resql);
@ -252,7 +252,7 @@ class Cpaiement
$sql .= " t.accountancy_code,"; $sql .= " t.accountancy_code,";
$sql .= " t.module"; $sql .= " t.module";
$sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element. ' as t'; $sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element. ' as t';
// Manage filter // Manage filter
@ -265,7 +265,7 @@ class Cpaiement
if (count($sqlwhere) > 0) { if (count($sqlwhere) > 0) {
$sql .= ' WHERE ' . implode(' '.$filtermode.' ', $sqlwhere); $sql .= ' WHERE ' . implode(' '.$filtermode.' ', $sqlwhere);
} }
if (!empty($sortfield)) { if (!empty($sortfield)) {
$sql .= $this->db->order($sortfield,$sortorder); $sql .= $this->db->order($sortfield,$sortorder);
} }
@ -279,10 +279,10 @@ class Cpaiement
$num = $this->db->num_rows($resql); $num = $this->db->num_rows($resql);
while ($obj = $this->db->fetch_object($resql)) { while ($obj = $this->db->fetch_object($resql)) {
$line = new CpaiementLine(); $line = new Cpaiement();
$line->id = $obj->id; $line->id = $obj->id;
$line->code = $obj->code; $line->code = $obj->code;
$line->libelle = $obj->libelle; $line->libelle = $obj->libelle;
$line->type = $obj->type; $line->type = $obj->type;
@ -290,7 +290,7 @@ class Cpaiement
$line->accountancy_code = $obj->accountancy_code; $line->accountancy_code = $obj->accountancy_code;
$line->module = $obj->module; $line->module = $obj->module;
$this->lines[$line->id] = $line; $this->lines[$line->id] = $line;
} }
@ -320,7 +320,7 @@ class Cpaiement
dol_syslog(__METHOD__, LOG_DEBUG); dol_syslog(__METHOD__, LOG_DEBUG);
// Clean parameters // Clean parameters
if (isset($this->code)) { if (isset($this->code)) {
$this->code = trim($this->code); $this->code = trim($this->code);
} }
@ -340,7 +340,7 @@ class Cpaiement
$this->module = trim($this->module); $this->module = trim($this->module);
} }
// Check parameters // Check parameters
// Put here code to add a control on parameters values // Put here code to add a control on parameters values
@ -438,8 +438,8 @@ class Cpaiement
return 1; return 1;
} }
} }
/** /**
* Initialise object with example values * Initialise object with example values
* Id must be 0 if object instance is a specimen * Id must be 0 if object instance is a specimen
@ -449,7 +449,7 @@ class Cpaiement
public function initAsSpecimen() public function initAsSpecimen()
{ {
$this->id = 0; $this->id = 0;
$this->code = ''; $this->code = '';
$this->libelle = ''; $this->libelle = '';
$this->type = ''; $this->type = '';
@ -457,7 +457,7 @@ class Cpaiement
$this->accountancy_code = ''; $this->accountancy_code = '';
$this->module = ''; $this->module = '';
} }
} }