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
5229690a
Commit
5229690a
authored
19 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
New: Ajoute code produit sur propal azur si parametre PROPALE_CODEPRODUITSERVICE defini.
parent
35e9b880
Branches
Branches containing commit
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/propale/pdf_propale_azur.modules.php
+14
-8
14 additions, 8 deletions
htdocs/includes/modules/propale/pdf_propale_azur.modules.php
with
14 additions
and
8 deletions
htdocs/includes/modules/propale/pdf_propale_azur.modules.php
+
14
−
8
View file @
5229690a
...
@@ -42,7 +42,7 @@ class pdf_propale_azur extends ModelePDFPropales
...
@@ -42,7 +42,7 @@ class pdf_propale_azur extends ModelePDFPropales
\brief Constructeur
\brief Constructeur
\param db Handler accs base de donne
\param db Handler accs base de donne
*/
*/
function
pdf_propale_azur
(
$db
=
0
)
function
pdf_propale_azur
(
$db
)
{
{
global
$langs
;
global
$langs
;
...
@@ -158,29 +158,35 @@ class pdf_propale_azur extends ModelePDFPropales
...
@@ -158,29 +158,35 @@ class pdf_propale_azur extends ModelePDFPropales
$nexY
=
$pdf
->
GetY
();
$nexY
=
$pdf
->
GetY
();
$nblignes
=
sizeof
(
$prop
->
lignes
);
$nblignes
=
sizeof
(
$prop
->
lignes
);
// Boucle sur les lignes
de propales
// Boucle sur les lignes
for
(
$i
=
0
;
$i
<
$nblignes
;
$i
++
)
for
(
$i
=
0
;
$i
<
$nblignes
;
$i
++
)
{
{
$curY
=
$nexY
;
$curY
=
$nexY
;
// Description produit
// Description produit
$codeproduitservice
=
""
;
$libelleproduitservice
=
$prop
->
lignes
[
$i
]
->
libelle
;
if
(
$prop
->
lignes
[
$i
]
->
desc
&&
$prop
->
lignes
[
$i
]
->
desc
!=
$prop
->
lignes
[
$i
]
->
libelle
)
{
if
(
$libelleproduitservice
)
$libelleproduitservice
.
=
"
\n
"
;
$libelleproduitservice
.
=
$prop
->
lignes
[
$i
]
->
desc
;
}
$pdf
->
SetXY
(
11
,
$curY
);
$pdf
->
SetXY
(
11
,
$curY
);
if
(
defined
(
"PROPALE_CODEPRODUITSERVICE"
)
&&
PROPALE_CODEPRODUITSERVICE
)
{
// Affiche code produit si ligne associe un code produit
if
(
$conf
->
global
->
PROPALE_CODEPRODUITSERVICE
&&
$fac
->
lignes
[
$i
]
->
produit_id
)
{
// Affiche code produit si ligne associe un code produit
$prodser
=
new
Product
(
$this
->
db
);
$prodser
=
new
Product
(
$this
->
db
);
$prodser
->
fetch
(
$prop
->
lignes
[
$i
]
->
produit_id
);
$prodser
->
fetch
(
$prop
->
lignes
[
$i
]
->
produit_id
);
if
(
$prodser
->
ref
)
{
if
(
$prodser
->
ref
)
{
$
cod
eproduitservice
=
" - "
.
$langs
->
trans
(
"ProductCode"
)
.
" "
.
$prodser
->
ref
;
$
libell
eproduitservice
=
$langs
->
trans
(
"ProductCode"
)
.
" "
.
$prodser
->
ref
.
" - "
.
$libelleproduitservice
;
}
}
}
}
if
(
$prop
->
lignes
[
$i
]
->
date_start
&&
$prop
->
lignes
[
$i
]
->
date_end
)
{
if
(
$prop
->
lignes
[
$i
]
->
date_start
&&
$prop
->
lignes
[
$i
]
->
date_end
)
{
// Affichage dure si il y en a une
// Affichage dure si il y en a une
$
cod
eproduitservice
.
=
"
("
.
$langs
->
trans
(
"From"
)
.
" "
.
dolibarr_print_date
(
$prop
->
lignes
[
$i
]
->
date_start
)
.
" "
.
$langs
->
trans
(
"to"
)
.
" "
.
dolibarr_print_date
(
$prop
->
lignes
[
$i
]
->
date_end
)
.
")"
;
$
libell
eproduitservice
.
=
"
\n
("
.
$langs
->
trans
(
"From"
)
.
" "
.
dolibarr_print_date
(
$prop
->
lignes
[
$i
]
->
date_start
)
.
" "
.
$langs
->
trans
(
"to"
)
.
" "
.
dolibarr_print_date
(
$prop
->
lignes
[
$i
]
->
date_end
)
.
")"
;
}
}
$pdf
->
MultiCell
(
108
,
5
,
$
prop
->
lignes
[
$i
]
->
desc
.
"
$cod
eproduitservice
"
,
0
,
'J'
);
$pdf
->
MultiCell
(
108
,
5
,
$
libell
eproduitservice
,
0
,
'J'
);
$nexY
=
$pdf
->
GetY
();
$nexY
=
$pdf
->
GetY
();
...
...
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