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
b3291d1e
Commit
b3291d1e
authored
19 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Logo ne s'affiche pas sur model oursin
parent
a4e86139
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/includes/modules/facture/pdf_oursin.modules.php
+21
-18
21 additions, 18 deletions
htdocs/includes/modules/facture/pdf_oursin.modules.php
with
21 additions
and
18 deletions
htdocs/includes/modules/facture/pdf_oursin.modules.php
+
21
−
18
View file @
b3291d1e
...
@@ -49,16 +49,18 @@ class pdf_oursin extends ModelePDFFactures
...
@@ -49,16 +49,18 @@ class pdf_oursin extends ModelePDFFactures
*/
*/
function
pdf_oursin
(
$db
)
function
pdf_oursin
(
$db
)
{
{
global
$langs
;
global
$conf
,
$langs
;
$langs
->
load
(
"main"
);
$langs
->
load
(
"main"
);
$langs
->
load
(
"bills"
);
$langs
->
load
(
"bills"
);
$langs
->
load
(
"products"
);
$langs
->
load
(
"products"
);
$this
->
db
=
$db
;
$this
->
db
=
$db
;
$this
->
name
=
"oursin"
;
$this
->
description
=
$langs
->
trans
(
'PDFOursinDescription'
);
$this
->
description
=
$langs
->
trans
(
'PDFOursinDescription'
);
// Dimension page pour format A4
// Dimension page pour format A4
$this
->
type
=
'pdf'
;
$this
->
page_largeur
=
210
;
$this
->
page_largeur
=
210
;
$this
->
page_hauteur
=
297
;
$this
->
page_hauteur
=
297
;
$this
->
format
=
array
(
$this
->
page_largeur
,
$this
->
page_hauteur
);
$this
->
format
=
array
(
$this
->
page_largeur
,
$this
->
page_hauteur
);
...
@@ -67,24 +69,23 @@ class pdf_oursin extends ModelePDFFactures
...
@@ -67,24 +69,23 @@ class pdf_oursin extends ModelePDFFactures
$this
->
option_tva
=
1
;
// Gere option tva FACTURE_TVAOPTION
$this
->
option_tva
=
1
;
// Gere option tva FACTURE_TVAOPTION
$this
->
option_modereg
=
1
;
// Gere choix mode rglement FACTURE_CHQ_NUMBER, FACTURE_RIB_NUMBER
$this
->
option_modereg
=
1
;
// Gere choix mode rglement FACTURE_CHQ_NUMBER, FACTURE_RIB_NUMBER
$this
->
option_codeproduitservice
=
1
;
// Affiche code produit-service FACTURE_CODEPRODUITSERVICE
$this
->
option_codeproduitservice
=
1
;
// Affiche code produit-service FACTURE_CODEPRODUITSERVICE
$this
->
option_tvaintra
=
1
;
// Affiche tva intra MAIN_INFO_TVAINTRA
$this
->
option_capital
=
1
;
// Affiche capital MAIN_INFO_CAPITAL
if
(
defined
(
"FACTURE_TVAOPTION"
)
&&
FACTURE_TVAOPTION
==
'franchise'
)
if
(
defined
(
"FACTURE_TVAOPTION"
)
&&
FACTURE_TVAOPTION
==
'franchise'
)
$this
->
franchise
=
1
;
$this
->
franchise
=
1
;
// Recupere code pays
// Recupere code pays
de l'emmetteur
$this
->
code_pays
=
substr
(
$langs
->
defaultlang
,
-
2
);
// Par defaut,
pays de la localisation
$this
->
emetteur
->
code_pays
=
substr
(
$langs
->
defaultlang
,
-
2
);
// Par defaut,
si on trouve pas
$sql
=
"SELECT code from "
.
MAIN_DB_PREFIX
.
"c_pays"
;
$sql
=
"SELECT code from "
.
MAIN_DB_PREFIX
.
"c_pays"
;
$sql
.
=
" WHERE rowid = "
.
MAIN_INFO_SOCIETE_PAYS
;
$sql
.
=
" WHERE rowid =
'
"
.
$conf
->
global
->
MAIN_INFO_SOCIETE_PAYS
.
"'"
;
$result
=
$this
->
db
->
query
(
$sql
);
$result
=
$this
->
db
->
query
(
$sql
);
if
(
$result
)
{
if
(
$result
)
{
$obj
=
$this
->
db
->
fetch_object
(
$result
);
$obj
=
$this
->
db
->
fetch_object
(
$result
);
if
(
$obj
->
code
)
$this
->
code_pays
=
$obj
->
code
;
if
(
$obj
->
code
)
$this
->
emetteur
->
code_pays
=
$obj
->
code
;
}
}
else
{
else
{
dolibarr_print_error
(
$this
->
db
);
dolibarr_print_error
(
$this
->
db
);
}
}
$this
->
db
->
free
(
$result
);
$this
->
db
->
free
(
$result
);
}
}
...
@@ -109,7 +110,7 @@ class pdf_oursin extends ModelePDFFactures
...
@@ -109,7 +110,7 @@ class pdf_oursin extends ModelePDFFactures
*/
*/
function
write_pdf_file
(
$facid
)
function
write_pdf_file
(
$facid
)
{
{
global
$user
,
$langs
,
$conf
;
global
$user
,
$langs
,
$conf
,
$mysoc
;
$langs
->
load
(
"main"
);
$langs
->
load
(
"main"
);
$langs
->
load
(
"bills"
);
$langs
->
load
(
"bills"
);
...
@@ -136,7 +137,7 @@ class pdf_oursin extends ModelePDFFactures
...
@@ -136,7 +137,7 @@ class pdf_oursin extends ModelePDFFactures
if
(
file_exists
(
$dir
))
if
(
file_exists
(
$dir
))
{
{
// Initialisation facture vierge
// Initialisation facture vierge
$pdf
=
new
FPDF
(
'P'
,
'mm'
,
'A4'
);
$pdf
=
new
FPDF
(
'P'
,
'mm'
,
$this
->
format
);
$pdf
->
Open
();
$pdf
->
Open
();
$pdf
->
AddPage
();
$pdf
->
AddPage
();
...
@@ -318,6 +319,8 @@ class pdf_oursin extends ModelePDFFactures
...
@@ -318,6 +319,8 @@ class pdf_oursin extends ModelePDFFactures
/*
/*
* Conditions de rglements
* Conditions de rglements
*/
*/
if
(
$fac
->
cond_reglement_code
)
{
$pdf
->
SetFont
(
'Arial'
,
'B'
,
10
);
$pdf
->
SetFont
(
'Arial'
,
'B'
,
10
);
$pdf
->
SetXY
(
$this
->
marges
[
'g'
],
217
);
$pdf
->
SetXY
(
$this
->
marges
[
'g'
],
217
);
$titre
=
$langs
->
trans
(
"PaymentConditions"
)
.
':'
;
$titre
=
$langs
->
trans
(
"PaymentConditions"
)
.
':'
;
...
@@ -325,7 +328,7 @@ class pdf_oursin extends ModelePDFFactures
...
@@ -325,7 +328,7 @@ class pdf_oursin extends ModelePDFFactures
$pdf
->
SetFont
(
'Arial'
,
''
,
10
);
$pdf
->
SetFont
(
'Arial'
,
''
,
10
);
$pdf
->
SetXY
(
$this
->
marges
[
'g'
]
+
44
,
217
);
$pdf
->
SetXY
(
$this
->
marges
[
'g'
]
+
44
,
217
);
$pdf
->
MultiCell
(
80
,
5
,
$fac
->
cond_reglement_facture
,
0
,
'L'
);
$pdf
->
MultiCell
(
80
,
5
,
$fac
->
cond_reglement_facture
,
0
,
'L'
);
}
/*
/*
* Pied de page
* Pied de page
...
@@ -573,7 +576,7 @@ class pdf_oursin extends ModelePDFFactures
...
@@ -573,7 +576,7 @@ class pdf_oursin extends ModelePDFFactures
*/
*/
function
_pagehead
(
&
$pdf
,
$fac
)
function
_pagehead
(
&
$pdf
,
$fac
)
{
{
global
$langs
,
$conf
;
global
$langs
,
$conf
,
$mysoc
;
$langs
->
load
(
"main"
);
$langs
->
load
(
"main"
);
$langs
->
load
(
"bills"
);
$langs
->
load
(
"bills"
);
$langs
->
load
(
"propal"
);
$langs
->
load
(
"propal"
);
...
...
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