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
3aeeab96
Commit
3aeeab96
authored
Oct 5, 2015
by
Andreas, OE8APR
Committed by
Andreas Pachler
Oct 5, 2015
Browse files
Options
Downloads
Patches
Plain Diff
Get proposal customer contact
Added functionality to get proposal customer contact as contact_xx tags
parent
e3bdc8aa
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/modules/propale/doc/doc_generic_proposal_odt.modules.php
+12
-5
12 additions, 5 deletions
.../modules/propale/doc/doc_generic_proposal_odt.modules.php
with
12 additions
and
5 deletions
htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php
+
12
−
5
View file @
3aeeab96
...
...
@@ -288,9 +288,9 @@ class doc_generic_proposal_odt extends ModelePDFPropales
dol_mkdir
(
$conf
->
propal
->
dir_temp
);
// If
BILLING
contact defined on
invoice
, we use it
// If
CUSTOMER
contact defined on
proposal
, we use it
$usecontact
=
false
;
$arrayidcontact
=
$object
->
getIdContact
(
'external'
,
'
BILLING
'
);
$arrayidcontact
=
$object
->
getIdContact
(
'external'
,
'
CUSTOMER
'
);
if
(
count
(
$arrayidcontact
)
>
0
)
{
$usecontact
=
true
;
...
...
@@ -302,13 +302,16 @@ class doc_generic_proposal_odt extends ModelePDFPropales
{
// On peut utiliser le nom de la societe du contact
if
(
!
empty
(
$conf
->
global
->
MAIN_USE_COMPANY_NAME_OF_CONTACT
))
$socobject
=
$object
->
contact
;
else
$socobject
=
$object
->
client
;
else
{
$socobject
=
$object
->
client
;
// if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use
$contactobject
=
$object
->
contact
;
}
}
else
{
$socobject
=
$object
->
client
;
}
// Make substitution
$substitutionarray
=
array
(
'__FROM_NAME__'
=>
$this
->
emetteur
->
name
,
...
...
@@ -369,8 +372,12 @@ class doc_generic_proposal_odt extends ModelePDFPropales
$array_thirdparty
=
$this
->
get_substitutionarray_thirdparty
(
$socobject
,
$outputlangs
);
$array_objet
=
$this
->
get_substitutionarray_object
(
$object
,
$outputlangs
);
$array_other
=
$this
->
get_substitutionarray_other
(
$outputlangs
);
// retrieve contact information for use in proposal as contact_xxx tags
$array_thirdparty_contact
=
array
();
if
(
$usecontact
)
$array_thirdparty_contact
=
$this
->
get_substitutionarray_contact
(
$contactobject
,
$outputlangs
,
'contact'
);
$tmparray
=
array_merge
(
$array_user
,
$array_soc
,
$array_thirdparty
,
$array_objet
,
$array_other
);
$tmparray
=
array_merge
(
$array_user
,
$array_soc
,
$array_thirdparty
,
$array_objet
,
$array_other
,
$array_thirdparty_contact
);
complete_substitutions_array
(
$tmparray
,
$outputlangs
,
$object
);
// Call the ODTSubstitution hook
$parameters
=
array
(
'file'
=>
$file
,
'object'
=>
$object
,
'outputlangs'
=>
$outputlangs
,
'substitutionarray'
=>&
$tmparray
);
...
...
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