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
61edda61
Commit
61edda61
authored
9 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix remove some warnings
parent
4b4de22a
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/core/class/commonobject.class.php
+4
-2
4 additions, 2 deletions
htdocs/core/class/commonobject.class.php
htdocs/core/lib/pdf.lib.php
+19
-16
19 additions, 16 deletions
htdocs/core/lib/pdf.lib.php
with
23 additions
and
18 deletions
htdocs/core/class/commonobject.class.php
+
4
−
2
View file @
61edda61
...
@@ -768,9 +768,10 @@ abstract class CommonObject
...
@@ -768,9 +768,10 @@ abstract class CommonObject
* @param int $statut Status of links to get (-1=all)
* @param int $statut Status of links to get (-1=all)
* @param string $source Source of contact: external or thirdparty (llx_socpeople) or internal (llx_user)
* @param string $source Source of contact: external or thirdparty (llx_socpeople) or internal (llx_user)
* @param int $list 0:Return array contains all properties, 1:Return array contains just id
* @param int $list 0:Return array contains all properties, 1:Return array contains just id
* @param string $code Filter on this code of contact type ('SHIPPING', 'BILLING', ...)
* @return array Array of contacts
* @return array Array of contacts
*/
*/
function
liste_contact
(
$statut
=-
1
,
$source
=
'external'
,
$list
=
0
)
function
liste_contact
(
$statut
=-
1
,
$source
=
'external'
,
$list
=
0
,
$code
=
''
)
{
{
global
$langs
;
global
$langs
;
...
@@ -788,6 +789,7 @@ abstract class CommonObject
...
@@ -788,6 +789,7 @@ abstract class CommonObject
$sql
.
=
" WHERE ec.element_id ="
.
$this
->
id
;
$sql
.
=
" WHERE ec.element_id ="
.
$this
->
id
;
$sql
.
=
" AND ec.fk_c_type_contact=tc.rowid"
;
$sql
.
=
" AND ec.fk_c_type_contact=tc.rowid"
;
$sql
.
=
" AND tc.element='"
.
$this
->
element
.
"'"
;
$sql
.
=
" AND tc.element='"
.
$this
->
element
.
"'"
;
if
(
$code
)
$sql
.
=
" AND tc.code = '"
.
$this
->
db
->
escape
(
$code
)
.
"'"
;
if
(
$source
==
'internal'
)
$sql
.
=
" AND tc.source = 'internal'"
;
if
(
$source
==
'internal'
)
$sql
.
=
" AND tc.source = 'internal'"
;
if
(
$source
==
'external'
||
$source
==
'thirdparty'
)
$sql
.
=
" AND tc.source = 'external'"
;
if
(
$source
==
'external'
||
$source
==
'thirdparty'
)
$sql
.
=
" AND tc.source = 'external'"
;
$sql
.
=
" AND tc.active=1"
;
$sql
.
=
" AND tc.active=1"
;
...
@@ -825,7 +827,7 @@ abstract class CommonObject
...
@@ -825,7 +827,7 @@ abstract class CommonObject
}
}
else
else
{
{
$this
->
error
=
$this
->
db
->
error
();
$this
->
error
=
$this
->
db
->
last
error
();
dol_print_error
(
$this
->
db
);
dol_print_error
(
$this
->
db
);
return
-
1
;
return
-
1
;
}
}
...
...
This diff is collapsed.
Click to expand it.
htdocs/core/lib/pdf.lib.php
+
19
−
16
View file @
61edda61
...
@@ -1922,6 +1922,8 @@ function pdf_getLinkedObjects($object,$outputlangs)
...
@@ -1922,6 +1922,8 @@ function pdf_getLinkedObjects($object,$outputlangs)
{
{
$elementobject
->
fetchObjectLinked
();
$elementobject
->
fetchObjectLinked
();
if
(
count
(
$elementobject
->
linkedObjects
)
>
0
)
{
$order
=
reset
(
$elementobject
->
linkedObjects
[
'commande'
]);
// Get first order
$order
=
reset
(
$elementobject
->
linkedObjects
[
'commande'
]);
// Get first order
if
(
!
empty
(
$object
->
linkedObjects
[
'commande'
]))
// There is already a link to order so we show only info of shipment
if
(
!
empty
(
$object
->
linkedObjects
[
'commande'
]))
// There is already a link to order so we show only info of shipment
...
@@ -1943,6 +1945,7 @@ function pdf_getLinkedObjects($object,$outputlangs)
...
@@ -1943,6 +1945,7 @@ function pdf_getLinkedObjects($object,$outputlangs)
}
}
}
}
}
}
}
// For add external linked objects
// For add external linked objects
if
(
is_object
(
$hookmanager
))
if
(
is_object
(
$hookmanager
))
...
...
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