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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
d49d264b
Commit
d49d264b
authored
8 years ago
by
Laurent Destailleur
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #6608 from LordVan/patch-2
NEW Add phone numbers of project contacts as ODT vars
parents
67cf3a1e
a76ddc8b
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/core/modules/project/doc/doc_generic_project_odt.modules.php
+23
-1
23 additions, 1 deletion
...e/modules/project/doc/doc_generic_project_odt.modules.php
with
23 additions
and
1 deletion
htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php
+
23
−
1
View file @
d49d264b
...
...
@@ -186,6 +186,25 @@ class doc_generic_project_odt extends ModelePDFProjects
{
global
$conf
;
// adding phone numbers if external
$phone_pro
=
''
;
$phone_perso
=
''
;
$phone_mobile
=
''
;
$ct
=
new
Contact
(
$this
->
db
);
if
(
$contact
[
'source'
]
==
'external'
)
{
$ct
=
new
Contact
(
$this
->
db
);
$ct
->
fetch
(
$contact
[
'id'
]);
$phone_pro
=
$ct
->
phone_pro
;
$phone_perso
=
$ct
->
phone_perso
;
$phone_mobile
=
$ct
->
phone_mobile
;
}
elseif
(
$contact
[
'source'
]
==
'internal'
)
{
$ct
=
new
User
(
$this
->
db
);
$ct
->
fetch
(
$contact
[
'id'
]);
$phone_pro
=
$ct
->
office_phone
;
$phone_mobile
=
$ct
->
user_mobile
;
}
return
array
(
'projcontacts_id'
=>
$contact
[
'id'
],
'projcontacts_rowid'
=>
$contact
[
'rowid'
],
...
...
@@ -194,7 +213,10 @@ class doc_generic_project_odt extends ModelePDFProjects
'projcontacts_firstname'
=>
$contact
[
'firstname'
],
'projcontacts_fullcivname'
=>
$contact
[
'fullname'
],
'projcontacts_socname'
=>
$contact
[
'socname'
],
'projcontacts_email'
=>
$contact
[
'email'
]
'projcontacts_email'
=>
$contact
[
'email'
],
'projcontacts_phone_pro'
=>
$phone_pro
,
'projcontacts_phone_perso'
=>
$phone_perso
,
'projcontacts_phone_mobile'
=>
$phone_mobile
);
}
...
...
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