Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
c2568020
Commit
c2568020
authored
10 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix IBAN class is uppercase
parent
32626c5a
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/core/lib/bank.lib.php
+12
-11
12 additions, 11 deletions
htdocs/core/lib/bank.lib.php
with
12 additions
and
11 deletions
htdocs/core/lib/bank.lib.php
+
12
−
11
View file @
c2568020
<?php
<?php
/* Copyright (C) 2006-20
07
Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2006-20
15
Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
* Copyright (C) 2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
*
*
...
@@ -134,7 +134,7 @@ function checkSwiftForAccount($account)
...
@@ -134,7 +134,7 @@ function checkSwiftForAccount($account)
}
}
/**
/**
* Check IBAN number informations for a bank account
* Check IBAN number informations for a bank account
.
*
*
* @param Account $account A bank account
* @param Account $account A bank account
* @return boolean True if informations are valid, false otherwise
* @return boolean True if informations are valid, false otherwise
...
@@ -142,14 +142,12 @@ function checkSwiftForAccount($account)
...
@@ -142,14 +142,12 @@ function checkSwiftForAccount($account)
function
checkIbanForAccount
(
$account
)
function
checkIbanForAccount
(
$account
)
{
{
require_once
DOL_DOCUMENT_ROOT
.
'/includes/php-iban/oophp-iban.php'
;
require_once
DOL_DOCUMENT_ROOT
.
'/includes/php-iban/oophp-iban.php'
;
$iban
=
new
Iban
(
$account
->
iban
);
$iban
=
new
IBAN
(
$account
->
iban
);
$check
=
$iban
->
Verify
();
$check
=
$iban
->
Verify
();
if
(
$check
)
{
return
true
;
}
else
{
return
false
;
}
if
(
$check
)
return
true
;
else
return
false
;
}
}
/**
/**
...
@@ -225,6 +223,8 @@ function checkBanForAccount($account)
...
@@ -225,6 +223,8 @@ function checkBanForAccount($account)
return
true
;
return
true
;
}
}
/**
/**
* Returns the key for Spanish Banks Accounts
* Returns the key for Spanish Banks Accounts
*
*
...
@@ -232,7 +232,8 @@ function checkBanForAccount($account)
...
@@ -232,7 +232,8 @@ function checkBanForAccount($account)
* @param string $InumCta InumCta
* @param string $InumCta InumCta
* @return string Key
* @return string Key
*/
*/
function
checkES
(
$IentOfi
,
$InumCta
)
{
function
checkES
(
$IentOfi
,
$InumCta
)
{
if
(
empty
(
$IentOfi
)
||
empty
(
$InumCta
)
||
strlen
(
$IentOfi
)
!=
8
||
strlen
(
$InumCta
)
!=
10
)
{
if
(
empty
(
$IentOfi
)
||
empty
(
$InumCta
)
||
strlen
(
$IentOfi
)
!=
8
||
strlen
(
$InumCta
)
!=
10
)
{
$keycontrol
=
""
;
$keycontrol
=
""
;
return
$keycontrol
;
return
$keycontrol
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment