Fix scrutinizer errors
This commit is contained in:
parent
6338328c90
commit
82fd84fb48
@ -1189,7 +1189,7 @@ if ($action == 'create')
|
||||
$disableedit=1;
|
||||
$disablemove=1;
|
||||
$disableremove=1;
|
||||
$ret = $object->printObjectLines('', $mysoc, $object->thirdparty, $lineid, 0); // No date selector for template invoice
|
||||
$object->printObjectLines('', $mysoc, $object->thirdparty, $lineid, 0); // No date selector for template invoice
|
||||
}
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
@ -132,7 +132,7 @@ class Localtax extends CommonObject
|
||||
* @param int $notrigger 0=no, 1=yes (no update trigger)
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function update($user=null, $notrigger=0)
|
||||
function update(User $user, $notrigger=0)
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
@ -149,8 +149,8 @@ class Localtax extends CommonObject
|
||||
$this->db->begin();
|
||||
|
||||
// Update request
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."localtax SET";
|
||||
$sql.= " localtaxtype=".$this->ltt.",";
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."localtax SET";
|
||||
$sql.= " localtaxtype=".$this->ltt.",";
|
||||
$sql.= " tms='".$this->db->idate($this->tms)."',";
|
||||
$sql.= " datep='".$this->db->idate($this->datep)."',";
|
||||
$sql.= " datev='".$this->db->idate($this->datev)."',";
|
||||
@ -160,7 +160,7 @@ class Localtax extends CommonObject
|
||||
$sql.= " fk_bank=".$this->fk_bank.",";
|
||||
$sql.= " fk_user_creat=".$this->fk_user_creat.",";
|
||||
$sql.= " fk_user_modif=".$this->fk_user_modif;
|
||||
$sql.= " WHERE rowid=".$this->id;
|
||||
$sql.= " WHERE rowid=".$this->id;
|
||||
|
||||
dol_syslog(get_class($this)."::update", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
@ -255,12 +255,12 @@ class Localtax extends CommonObject
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Delete object in database
|
||||
*
|
||||
* @param User $user User that delete
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
/**
|
||||
* Delete object in database
|
||||
*
|
||||
* @param User $user User that delete
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function delete($user)
|
||||
{
|
||||
// Call trigger
|
||||
@ -285,11 +285,11 @@ class Localtax extends CommonObject
|
||||
|
||||
|
||||
/**
|
||||
* Initialise an instance with random values.
|
||||
* Used to build previews or test instances.
|
||||
* id must be 0 if object instance is a specimen.
|
||||
*
|
||||
* @return void
|
||||
* Initialise an instance with random values.
|
||||
* Used to build previews or test instances.
|
||||
* id must be 0 if object instance is a specimen.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function initAsSpecimen()
|
||||
{
|
||||
|
||||
@ -2739,7 +2739,7 @@ abstract class CommonObject
|
||||
* @param string $targettype Object target type (if not defined, elemennt name of object)
|
||||
* @param string $clause 'OR' or 'AND' clause used when both source id and target id are provided
|
||||
* @param int $alsosametype 0=Return only links to object that differs from source. 1=Include also link to objects of same type.
|
||||
* @return void
|
||||
* @return int <0 if KO, >0 if OK
|
||||
* @see add_object_linked, updateObjectLinked, deleteObjectLinked
|
||||
*/
|
||||
function fetchObjectLinked($sourceid=null,$sourcetype='',$targetid=null,$targettype='',$clause='OR',$alsosametype=1)
|
||||
@ -2920,10 +2920,12 @@ abstract class CommonObject
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($this->db);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3582,7 +3584,7 @@ abstract class CommonObject
|
||||
* Return HTML table for object lines
|
||||
* TODO Move this into an output class file (htmlline.class.php)
|
||||
* If lines are into a template, title must also be into a template
|
||||
* But for the moment we don't know if it'st possible as we keep a method available on overloaded objects.
|
||||
* But for the moment we don't know if it's possible as we keep a method available on overloaded objects.
|
||||
*
|
||||
* @param string $action Action code
|
||||
* @param string $seller Object of seller third party
|
||||
|
||||
Loading…
Reference in New Issue
Block a user