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
c5a3b448
Commit
c5a3b448
authored
10 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fixed: use object
parent
d16ce7eb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/societe/agenda.php
+25
-28
25 additions, 28 deletions
htdocs/societe/agenda.php
with
25 additions
and
28 deletions
htdocs/societe/agenda.php
+
25
−
28
View file @
c5a3b448
...
...
@@ -59,9 +59,6 @@ $contactstatic = new Contact($db);
$form
=
new
Form
(
$db
);
/*
* Fiche categorie de client et/ou fournisseur
*/
if
(
$socid
)
{
require_once
DOL_DOCUMENT_ROOT
.
'/core/lib/company.lib.php'
;
...
...
@@ -70,79 +67,79 @@ if ($socid)
$langs
->
load
(
"companies"
);
$
soc
=
new
Societe
(
$db
);
$result
=
$
soc
->
fetch
(
$socid
);
$
object
=
new
Societe
(
$db
);
$result
=
$
object
->
fetch
(
$socid
);
llxHeader
(
""
,
$langs
->
trans
(
"Agenda"
),
''
);
if
(
!
empty
(
$conf
->
notification
->
enabled
))
$langs
->
load
(
"mails"
);
$head
=
societe_prepare_head
(
$
soc
);
$head
=
societe_prepare_head
(
$
object
);
dol_fiche_head
(
$head
,
'agenda'
,
$langs
->
trans
(
"ThirdParty"
),
0
,
'company'
);
print
'<table class="border" width="100%">'
;
print
'<tr><td width="25%">'
.
$langs
->
trans
(
"ThirdPartyName"
)
.
'</td><td colspan="3">'
;
print
$form
->
showrefnav
(
$
soc
,
'socid'
,
''
,(
$user
->
societe_id
?
0
:
1
),
'rowid'
,
'nom'
);
print
$form
->
showrefnav
(
$
object
,
'socid'
,
''
,(
$user
->
societe_id
?
0
:
1
),
'rowid'
,
'nom'
);
print
'</td></tr>'
;
if
(
!
empty
(
$conf
->
global
->
SOCIETE_USEPREFIX
))
// Old not used prefix field
{
print
'<tr><td>'
.
$langs
->
trans
(
'Prefix'
)
.
'</td><td colspan="3">'
.
$
soc
->
prefix_comm
.
'</td></tr>'
;
print
'<tr><td>'
.
$langs
->
trans
(
'Prefix'
)
.
'</td><td colspan="3">'
.
$
object
->
prefix_comm
.
'</td></tr>'
;
}
if
(
$
soc
->
client
)
if
(
$
object
->
client
)
{
print
'<tr><td>'
;
print
$langs
->
trans
(
'CustomerCode'
)
.
'</td><td colspan="3">'
;
print
$
soc
->
code_client
;
if
(
$
soc
->
check_codeclient
()
<>
0
)
print
' <font class="error">('
.
$langs
->
trans
(
"WrongCustomerCode"
)
.
')</font>'
;
print
$
object
->
code_client
;
if
(
$
object
->
check_codeclient
()
<>
0
)
print
' <font class="error">('
.
$langs
->
trans
(
"WrongCustomerCode"
)
.
')</font>'
;
print
'</td></tr>'
;
}
if
(
$
soc
->
fournisseur
)
if
(
$
object
->
fournisseur
)
{
print
'<tr><td>'
;
print
$langs
->
trans
(
'SupplierCode'
)
.
'</td><td colspan="3">'
;
print
$
soc
->
code_fournisseur
;
if
(
$
soc
->
check_codefournisseur
()
<>
0
)
print
' <font class="error">('
.
$langs
->
trans
(
"WrongSupplierCode"
)
.
')</font>'
;
print
$
object
->
code_fournisseur
;
if
(
$
object
->
check_codefournisseur
()
<>
0
)
print
' <font class="error">('
.
$langs
->
trans
(
"WrongSupplierCode"
)
.
')</font>'
;
print
'</td></tr>'
;
}
if
(
!
empty
(
$conf
->
barcode
->
enabled
))
{
print
'<tr><td>'
.
$langs
->
trans
(
'Gencod'
)
.
'</td><td colspan="3">'
.
$
soc
->
barcode
.
'</td></tr>'
;
print
'<tr><td>'
.
$langs
->
trans
(
'Gencod'
)
.
'</td><td colspan="3">'
.
$
object
->
barcode
.
'</td></tr>'
;
}
print
"<tr><td valign=
\"
top
\"
>"
.
$langs
->
trans
(
'Address'
)
.
"</td><td colspan=
\"
3
\"
>"
;
dol_print_address
(
$
soc
->
address
,
'gmap'
,
'thirdparty'
,
$
soc
->
id
);
dol_print_address
(
$
object
->
address
,
'gmap'
,
'thirdparty'
,
$
object
->
id
);
print
"</td></tr>"
;
// Zip / Town
print
'<tr><td width="25%">'
.
$langs
->
trans
(
'Zip'
)
.
'</td><td width="25%">'
.
$
soc
->
zip
.
"</td>"
;
print
'<td width="25%">'
.
$langs
->
trans
(
'Town'
)
.
'</td><td width="25%">'
.
$
soc
->
town
.
"</td></tr>"
;
print
'<tr><td width="25%">'
.
$langs
->
trans
(
'Zip'
)
.
'</td><td width="25%">'
.
$
object
->
zip
.
"</td>"
;
print
'<td width="25%">'
.
$langs
->
trans
(
'Town'
)
.
'</td><td width="25%">'
.
$
object
->
town
.
"</td></tr>"
;
// Country
if
(
$
soc
->
country
)
{
if
(
$
object
->
country
)
{
print
'<tr><td>'
.
$langs
->
trans
(
'Country'
)
.
'</td><td colspan="3">'
;
$img
=
picto_from_langcode
(
$
soc
->
country_code
);
$img
=
picto_from_langcode
(
$
object
->
country_code
);
print
(
$img
?
$img
.
' '
:
''
);
print
$
soc
->
country
;
print
$
object
->
country
;
print
'</td></tr>'
;
}
// EMail
print
'<tr><td>'
.
$langs
->
trans
(
'EMail'
)
.
'</td><td colspan="3">'
;
print
dol_print_email
(
$
soc
->
email
,
0
,
$
soc
->
id
,
'AC_EMAIL'
);
print
dol_print_email
(
$
object
->
email
,
0
,
$
object
->
id
,
'AC_EMAIL'
);
print
'</td></tr>'
;
// Web
print
'<tr><td>'
.
$langs
->
trans
(
'Web'
)
.
'</td><td colspan="3">'
;
print
dol_print_url
(
$
soc
->
url
);
print
dol_print_url
(
$
object
->
url
);
print
'</td></tr>'
;
// Phone / Fax
print
'<tr><td>'
.
$langs
->
trans
(
'Phone'
)
.
'</td><td>'
.
dol_print_phone
(
$
soc
->
phone
,
$
soc
->
country_code
,
0
,
$
soc
->
id
,
'AC_TEL'
)
.
'</td>'
;
print
'<td>'
.
$langs
->
trans
(
'Fax'
)
.
'</td><td>'
.
dol_print_phone
(
$
soc
->
fax
,
$
soc
->
country_code
,
0
,
$
soc
->
id
,
'AC_FAX'
)
.
'</td></tr>'
;
print
'<tr><td>'
.
$langs
->
trans
(
'Phone'
)
.
'</td><td>'
.
dol_print_phone
(
$
object
->
phone
,
$
object
->
country_code
,
0
,
$
object
->
id
,
'AC_TEL'
)
.
'</td>'
;
print
'<td>'
.
$langs
->
trans
(
'Fax'
)
.
'</td><td>'
.
dol_print_phone
(
$
object
->
fax
,
$
object
->
country_code
,
0
,
$
object
->
id
,
'AC_FAX'
)
.
'</td></tr>'
;
print
'</table>'
;
...
...
@@ -171,7 +168,7 @@ if ($socid)
print
'<br>'
;
$objthirdparty
=
$
soc
;
$objthirdparty
=
$
object
;
$objcon
=
new
stdClass
();
$out
=
''
;
...
...
@@ -189,10 +186,10 @@ if ($socid)
print
load_fiche_titre
(
$langs
->
trans
(
"ActionsOnCompany"
),
$out
,
''
);
// List of todo actions
show_actions_todo
(
$conf
,
$langs
,
$db
,
$
soc
);
show_actions_todo
(
$conf
,
$langs
,
$db
,
$
object
);
// List of done actions
show_actions_done
(
$conf
,
$langs
,
$db
,
$
soc
);
show_actions_done
(
$conf
,
$langs
,
$db
,
$
object
);
}
...
...
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