Fix PHP 7.1 error

This commit is contained in:
Laurent Destailleur 2017-01-16 00:53:59 +01:00
parent 10a10f459c
commit a05132d26e
4 changed files with 8 additions and 7 deletions

View File

@ -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)
{

View File

@ -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);

View File

@ -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;

View File

@ -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>';
}