mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Fix check always ended up setting to null
This commit is contained in:
committed by
Laurent Destailleur
parent
e9cfb1e08a
commit
0890c37ae2
@@ -280,7 +280,7 @@ function checkSwiftForAccount(Account $account = null, $swift = null)
|
||||
{
|
||||
if ($account == null && $swift == null) {
|
||||
return false;
|
||||
} else {
|
||||
} elseif ($swift == null) {
|
||||
$swift = $account->bic;
|
||||
}
|
||||
if (preg_match("/^([a-zA-Z]){4}([a-zA-Z]){2}([0-9a-zA-Z]){2}([0-9a-zA-Z]{3})?$/", $swift)) {
|
||||
@@ -300,7 +300,7 @@ function checkIbanForAccount(Account $account = null, $ibantocheck = null)
|
||||
{
|
||||
if ($account == null && $ibantocheck == null) {
|
||||
return false;
|
||||
} else {
|
||||
} elseif ($ibantocheck == null) {
|
||||
$ibantocheck = ($account->iban ? $account->iban : $account->iban_prefix); // iban or iban_prefix for backward compatibility
|
||||
}
|
||||
require_once DOL_DOCUMENT_ROOT.'/includes/php-iban/oophp-iban.php';
|
||||
|
||||
Reference in New Issue
Block a user