Clean code

This commit is contained in:
Laurent Destailleur 2023-08-04 10:51:11 +02:00
parent c6a1c5cfcd
commit 0e7bcef866
2 changed files with 6 additions and 12 deletions

View file

@ -1539,25 +1539,19 @@ class Account extends CommonObject
{
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
$this->error_number = 0;
// Call function to check BAN
$error = 0;
// Call functions to check BAN
if (!checkIbanForAccount($this)) {
$this->error_number = 12;
$error++;
$this->error_message = 'IBANNotValid';
}
if (!checkSwiftForAccount($this)) {
$this->error_number = 12;
$error++;
$this->error_message = 'SwiftNotValid';
}
/*if (! checkBanForAccount($this))
{
$this->error_number = 12;
$this->error_message = 'BANControlError';
}*/
if ($this->error_number == 0) {
if (! $error) {
return 1;
} else {
return 0;

View file

@ -78,7 +78,7 @@ class UserBankAccount extends Account
$this->userid = 0;
$this->solde = 0;
$this->error_number = 0;
$this->balance = 0;
}