--- /tmp/dsg/dolibarr/htdocs/compta/sociales/class/github_19.0.3_cchargesociales.class.php +++ /tmp/dsg/dolibarr/htdocs/compta/sociales/class/client_cchargesociales.class.php @@ -37,4 +36,0 @@ - public $db; - - public $id; - @@ -51,4 +46,0 @@ - /** - * @var string Label - * @deprecated - */ @@ -56,6 +47,0 @@ - - /** - * @var string Label - */ - public $label; - @@ -67,2 +53,2 @@ - * @var int ID - */ + * @var int ID + */ @@ -71,3 +56,0 @@ - /** - * @var string module - */ @@ -77,4 +59,0 @@ - /** - * @var array array of errors - */ - public $errors = array(); @@ -98 +77 @@ - * @return int Return integer <0 if KO, Id of created object if OK + * @return int <0 if KO, Id of created object if OK @@ -106,12 +85,12 @@ - // Clean parameters - $this->trimParameters( - array( - 'libelle', - 'deductible', - 'active', - 'code', - 'fk_pays', - 'module', - 'accountancy_code', - ) - ); + // Clean parameters + $this->trimParameters( + array( + 'libelle', + 'deductible', + 'active', + 'code', + 'fk_pays', + 'module', + 'accountancy_code', + ) + ); @@ -123,0 +103 @@ + @@ -130,0 +111,2 @@ + + @@ -131,0 +114 @@ + @@ -138,0 +122,2 @@ + + @@ -182 +167 @@ - * @return int Return integer <0 if KO, 0 if not found, >0 if OK + * @return int <0 if KO, 0 if not found, >0 if OK @@ -190 +175 @@ - $sql .= " t.libelle as label,"; + $sql .= " t.libelle,"; @@ -201 +186 @@ - $sql .= ' WHERE t.id = '.((int) $id); + $sql .= ' WHERE t.id = '.$id; @@ -212,2 +197 @@ - $this->libelle = $obj->label; - $this->label = $obj->label; + $this->libelle = $obj->libelle; @@ -242 +226 @@ - * @return int Return integer <0 if KO, >0 if OK + * @return int <0 if KO, >0 if OK @@ -252,11 +236,11 @@ - $this->trimParameters( - array( - 'libelle', - 'deductible', - 'active', - 'code', - 'fk_pays', - 'module', - 'accountancy_code', - ) - ); + $this->trimParameters( + array( + 'libelle', + 'deductible', + 'active', + 'code', + 'fk_pays', + 'module', + 'accountancy_code', + ) + ); @@ -271,2 +255,2 @@ - $sql .= ' deductible = '.(isset($this->deductible) ? ((int) $this->deductible) : "null").','; - $sql .= ' active = '.(isset($this->active) ? ((int) $this->active) : "null").','; + $sql .= ' deductible = '.(isset($this->deductible) ? $this->deductible : "null").','; + $sql .= ' active = '.(isset($this->active) ? $this->active : "null").','; @@ -274 +258 @@ - $sql .= ' fk_pays = '.((isset($this->fk_pays) && $this->fk_pays > 0) ? ((int) $this->fk_pays) : "null").','; + $sql .= ' fk_pays = '.(isset($this->fk_pays) ? $this->fk_pays : "null").','; @@ -277 +261 @@ - $sql .= ' WHERE id='.((int) $this->id); + $sql .= ' WHERE id='.$this->id; @@ -289,7 +273,7 @@ - // Uncomment this and change MYOBJECT to your own tag if you - // want this action calls a trigger. - - //// Call triggers - //$result=$this->call_trigger('MYOBJECT_MODIFY',$user); - //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} - //// End call triggers + // Uncomment this and change MYOBJECT to your own tag if you + // want this action calls a trigger. + + //// Call triggers + //$result=$this->call_trigger('MYOBJECT_MODIFY',$user); + //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} + //// End call triggers @@ -316 +300 @@ - * @return int Return integer <0 if KO, >0 if OK + * @return int <0 if KO, >0 if OK @@ -327,9 +311,9 @@ - //if (!$notrigger) { - // Uncomment this and change MYOBJECT to your own tag if you - // want this action calls a trigger. - - //// Call triggers - //$result=$this->call_trigger('MYOBJECT_DELETE',$user); - //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} - //// End call triggers - //} + //if (!$notrigger) { + // Uncomment this and change MYOBJECT to your own tag if you + // want this action calls a trigger. + + //// Call triggers + //$result=$this->call_trigger('MYOBJECT_DELETE',$user); + //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} + //// End call triggers + //} @@ -340 +324 @@ - $sql .= ' WHERE id = '.((int) $this->id); + $sql .= ' WHERE id='.$this->id; @@ -369 +353 @@ - /*public function createFromClone(User $user, $fromid) + public function createFromClone(User $user, $fromid) @@ -409 +393 @@ - }*/ + } @@ -417,3 +401,3 @@ - * @param integer $notooltip 1=Disable tooltip - * @param int $maxlen Max length of visible user name - * @param string $morecss Add more css on link + * @param integer $notooltip 1=Disable tooltip + * @param int $maxlen Max length of visible user name + * @param string $morecss Add more css on link @@ -422 +406 @@ - /*public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen = 24, $morecss = '') + public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen = 24, $morecss = '') @@ -425,14 +409,14 @@ - global $dolibarr_main_authentication, $dolibarr_main_demo; - global $menumanager; - - - $result = ''; - $companylink = ''; - - $label = ''.$langs->trans("MyModule").''; - $label .= '