Fix PHP 7.1 error
This commit is contained in:
parent
10a10f459c
commit
a05132d26e
@ -662,7 +662,7 @@ class Account extends CommonObject
|
||||
*
|
||||
* @param User $user Object user making action
|
||||
* @param int $notrigger 1=Disable triggers
|
||||
* @return int <0 si ko, >0 si ok
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function update(User $user = null, $notrigger = 0)
|
||||
{
|
||||
|
||||
@ -197,9 +197,10 @@ function checkBanForAccount($account)
|
||||
$rib = strtr($rib, "abcdefghijklmnopqrstuvwxyz", "12345678912345678923456789");
|
||||
// Separation du rib en 3 groupes de 7 + 1 groupe de 2.
|
||||
// Multiplication de chaque groupe par les coef du tableau
|
||||
var_dump($rib);
|
||||
for ($i = 0, $s = 0; $i < 3; $i++) {
|
||||
$code = substr($rib, 7 * $i, 7);
|
||||
$s += (0 + $code) * $coef[$i];
|
||||
$s += (0 + (int) $code) * $coef[$i];
|
||||
}
|
||||
// Soustraction du modulo 97 de $s a 97 pour obtenir la cle
|
||||
$cle_rib = 97 - ($s % 97);
|
||||
|
||||
@ -102,10 +102,11 @@ class CompanyBankAccount extends Account
|
||||
/**
|
||||
* Update bank account
|
||||
*
|
||||
* @param User $user Object user
|
||||
* @return int <=0 if KO, >0 if OK
|
||||
* @param User $user Object user
|
||||
* @param int $notrigger 1=Disable triggers
|
||||
* @return int <=0 if KO, >0 if OK
|
||||
*/
|
||||
function update(User $user = null)
|
||||
function update(User $user = null, $notrigger=0)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
|
||||
@ -1909,10 +1909,9 @@ class Societe extends CommonObject
|
||||
if (! empty($conf->accounting->enabled) && $this->fournisseur)
|
||||
$label.= '<br><b>' . $langs->trans('SupplierAccountancyCode') . ':</b> '. $this->code_compta_fournisseur;
|
||||
|
||||
if (! empty($this->logo))
|
||||
if (! empty($this->logo) && class_exists('Form'))
|
||||
{
|
||||
$label.= '</br><div class="photointooltip">';
|
||||
//if (! is_object($form)) $form = new Form($db);
|
||||
$label.= Form::showphoto('societe', $this, 80, 0, 0, 'photowithmargin', 'mini');
|
||||
$label.= '</div><div style="clear: both;"></div>';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user