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
ec2a8b55
Commit
ec2a8b55
authored
Sep 29, 2014
by
Laurent Destailleur
Browse files
Options
Downloads
Plain Diff
Merge pull request #1800 from Devensys/Develop-HighlitingIBAN
Highliting IBAN (sepa)
parents
e35135d5
92a5030f
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/pdf.lib.php
+37
-26
37 additions, 26 deletions
htdocs/core/lib/pdf.lib.php
with
37 additions
and
26 deletions
htdocs/core/lib/pdf.lib.php
+
37
−
26
View file @
ec2a8b55
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr>
* Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr>
* Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com>
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU General Public License as published by
...
@@ -498,7 +499,6 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
...
@@ -498,7 +499,6 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
$diffsizetitle
=
(
empty
(
$conf
->
global
->
PDF_DIFFSIZE_TITLE
)
?
3
:
$conf
->
global
->
PDF_DIFFSIZE_TITLE
);
$diffsizetitle
=
(
empty
(
$conf
->
global
->
PDF_DIFFSIZE_TITLE
)
?
3
:
$conf
->
global
->
PDF_DIFFSIZE_TITLE
);
$diffsizecontent
=
(
empty
(
$conf
->
global
->
PDF_DIFFSIZE_CONTENT
)
?
4
:
$conf
->
global
->
PDF_DIFFSIZE_CONTENT
);
$diffsizecontent
=
(
empty
(
$conf
->
global
->
PDF_DIFFSIZE_CONTENT
)
?
4
:
$conf
->
global
->
PDF_DIFFSIZE_CONTENT
);
$pdf
->
SetXY
(
$curx
,
$cury
);
$pdf
->
SetXY
(
$curx
,
$cury
);
if
(
empty
(
$onlynumber
))
if
(
empty
(
$onlynumber
))
...
@@ -526,6 +526,27 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
...
@@ -526,6 +526,27 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
$cury
+=
3
;
$cury
+=
3
;
}
}
// Use correct name of bank id according to country
$ibankey
=
"IBANNumber"
;
if
(
$account
->
getCountryCode
()
==
'IN'
)
$ibankey
=
"IFSC"
;
if
(
!
empty
(
$account
->
iban
))
{
$ibanDisplay_temp
=
$outputlangs
->
convToOutputCharset
(
$account
->
iban
);
$ibanDisplay
=
""
;
for
(
$i
=
0
;
$i
<
dol_strlen
(
$ibanDisplay_temp
);
$i
++
){
$ibanDisplay
.
=
$ibanDisplay_temp
[
$i
];
if
(
$i
%
4
==
3
&&
$i
>
0
){
$ibanDisplay
.
=
" "
;
}
}
$pdf
->
SetFont
(
''
,
'B'
,
$default_font_size
-
3
);
$pdf
->
SetXY
(
$curx
,
$cury
);
$pdf
->
MultiCell
(
100
,
3
,
$outputlangs
->
transnoentities
(
$ibankey
)
.
': '
.
$ibanDisplay
,
0
,
'L'
,
0
);
$cury
+=
3
;
}
if
(
empty
(
$onlynumber
))
$pdf
->
line
(
$curx
+
1
,
$cury
+
1
,
$curx
+
1
,
$cury
+
8
);
if
(
empty
(
$onlynumber
))
$pdf
->
line
(
$curx
+
1
,
$cury
+
1
,
$curx
+
1
,
$cury
+
8
);
if
(
$usedetailedbban
==
1
)
if
(
$usedetailedbban
==
1
)
...
@@ -606,9 +627,7 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
...
@@ -606,9 +627,7 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
}
}
// Use correct name of bank id according to country
// Use correct name of bank id according to country
$ibankey
=
"IBANNumber"
;
$bickey
=
"BICNumber"
;
$bickey
=
"BICNumber"
;
if
(
$account
->
getCountryCode
()
==
'IN'
)
$ibankey
=
"IFSC"
;
if
(
$account
->
getCountryCode
()
==
'IN'
)
$bickey
=
"SWIFT"
;
if
(
$account
->
getCountryCode
()
==
'IN'
)
$bickey
=
"SWIFT"
;
$pdf
->
SetFont
(
''
,
''
,
$default_font_size
-
$diffsizecontent
);
$pdf
->
SetFont
(
''
,
''
,
$default_font_size
-
$diffsizecontent
);
...
@@ -625,13 +644,6 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
...
@@ -625,13 +644,6 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
}
}
else
if
(
!
$usedetailedbban
)
$cury
+=
1
;
else
if
(
!
$usedetailedbban
)
$cury
+=
1
;
if
(
!
empty
(
$account
->
iban
))
{
$pdf
->
SetXY
(
$curx
,
$cury
);
$pdf
->
MultiCell
(
100
,
3
,
$outputlangs
->
transnoentities
(
$ibankey
)
.
': '
.
$outputlangs
->
convToOutputCharset
(
$account
->
iban
),
0
,
'L'
,
0
);
$cury
+=
3
;
}
if
(
!
empty
(
$account
->
bic
))
if
(
!
empty
(
$account
->
bic
))
{
{
$pdf
->
SetXY
(
$curx
,
$cury
);
$pdf
->
SetXY
(
$curx
,
$cury
);
...
@@ -641,7 +653,6 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
...
@@ -641,7 +653,6 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
return
$pdf
->
getY
();
return
$pdf
->
getY
();
}
}
/**
/**
* Show footer of page for PDF generation
* Show footer of page for PDF generation
*
*
...
...
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