fix scrutinizer
This commit is contained in:
parent
a7e0fdba49
commit
8e84b733dc
@ -1602,8 +1602,9 @@ class Adherent extends CommonObject
|
||||
// Define output language
|
||||
$outputlangs = $langs;
|
||||
$newlang = '';
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id']))
|
||||
$newlang = $_REQUEST['lang_id'];
|
||||
$lang_id=GETPOST('lang_id');
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($lang_id))
|
||||
$newlang = $lang_id;
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang))
|
||||
$newlang = $customer->default_lang;
|
||||
if (! empty($newlang)) {
|
||||
|
||||
@ -509,6 +509,8 @@ class Account extends CommonObject
|
||||
{
|
||||
global $langs,$conf, $hookmanager;
|
||||
|
||||
$error=0;
|
||||
|
||||
// Clean parameters
|
||||
if (! $this->min_allowed) $this->min_allowed=0;
|
||||
if (! $this->min_desired) $this->min_desired=0;
|
||||
@ -668,7 +670,7 @@ class Account extends CommonObject
|
||||
* @param int $notrigger 1=Disable triggers
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function update(User $user = null, $notrigger = 0)
|
||||
function update(User $user, $notrigger = 0)
|
||||
{
|
||||
global $langs,$conf, $hookmanager;
|
||||
|
||||
@ -1135,6 +1137,8 @@ class Account extends CommonObject
|
||||
*/
|
||||
function solde($option=0)
|
||||
{
|
||||
$solde=0;
|
||||
|
||||
$sql = "SELECT sum(amount) as amount";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank";
|
||||
$sql.= " WHERE fk_account = ".$this->id;
|
||||
@ -1149,8 +1153,13 @@ class Account extends CommonObject
|
||||
$solde = $obj->amount;
|
||||
}
|
||||
$this->db->free($resql);
|
||||
return $solde;
|
||||
} else {
|
||||
$this->errors[]=$this->db->lasterror;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return $solde;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1593,7 +1602,7 @@ class Account extends CommonObject
|
||||
$this->code_banque = '123';
|
||||
$this->code_guichet = '456';
|
||||
$this->number = 'ABC12345';
|
||||
$this->cle_rib = 50;
|
||||
$this->cle_rib = '50';
|
||||
$this->bic = 'AA12';
|
||||
$this->iban = 'FR999999999';
|
||||
$this->domiciliation = 'My bank address';
|
||||
@ -1904,7 +1913,7 @@ class AccountLine extends CommonObject
|
||||
*/
|
||||
function update_conciliation(User $user, $cat)
|
||||
{
|
||||
global $conf;
|
||||
global $conf,$langs;
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
@ -2132,9 +2141,10 @@ class AccountLine extends CommonObject
|
||||
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
|
||||
* @param int $maxlen Longueur max libelle
|
||||
* @param string $option Option ('showall')
|
||||
* @param int $notooltip 1=Disable tooltip
|
||||
* @return string Chaine avec URL
|
||||
*/
|
||||
function getNomUrl($withpicto=0,$maxlen=0,$option='')
|
||||
function getNomUrl($withpicto=0,$maxlen=0,$option='',$notooltip=0)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user