Clean code
This commit is contained in:
parent
c6a1c5cfcd
commit
0e7bcef866
2 changed files with 6 additions and 12 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class UserBankAccount extends Account
|
|||
|
||||
$this->userid = 0;
|
||||
$this->solde = 0;
|
||||
$this->error_number = 0;
|
||||
$this->balance = 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue