Fix error message on IBAN/BIC validation
This commit is contained in:
parent
0b8f4489c8
commit
5a8d5618f2
@ -1441,9 +1441,13 @@ class Account extends CommonObject
|
|||||||
|
|
||||||
// Call function to check BAN
|
// Call function to check BAN
|
||||||
|
|
||||||
if (!checkIbanForAccount($this) || !checkSwiftForAccount($this)) {
|
if (!checkIbanForAccount($this)) {
|
||||||
$this->error_number = 12;
|
$this->error_number = 12;
|
||||||
$this->error_message = 'IBANSWIFTControlError';
|
$this->error_message = 'IBANNotValid';
|
||||||
|
}
|
||||||
|
if (!checkSwiftForAccount($this)) {
|
||||||
|
$this->error_number = 12;
|
||||||
|
$this->error_message = 'SwiftNotValid';
|
||||||
}
|
}
|
||||||
/*if (! checkBanForAccount($this))
|
/*if (! checkBanForAccount($this))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -449,9 +449,17 @@ if ($resql) {
|
|||||||
|
|
||||||
// RIB
|
// RIB
|
||||||
print '<td>';
|
print '<td>';
|
||||||
|
if ($bac->id > 0) {
|
||||||
|
if (!empty($bac->iban) || !empty($bac->bic)) {
|
||||||
print $bac->iban.(($bac->iban && $bac->bic) ? ' / ' : '').$bac->bic;
|
print $bac->iban.(($bac->iban && $bac->bic) ? ' / ' : '').$bac->bic;
|
||||||
if ($bac->verif() <= 0) {
|
if ($bac->verif() <= 0) {
|
||||||
print img_warning('Error on default bank number for IBAN : '.$bac->error_message);
|
print img_warning('Error on default bank number for IBAN : '.$langs->trans($bac->error_message));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print img_warning($langs->trans("IBANNotDefined"));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print img_warning($langs->trans("NoBankAccountDefined"));
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user