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