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
5842d1ee
Commit
5842d1ee
authored
8 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix link to notes ko for contracts.
parent
57b532cd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/contrat/class/contrat.class.php
+40
-10
40 additions, 10 deletions
htdocs/contrat/class/contrat.class.php
htdocs/contrat/list.php
+18
-5
18 additions, 5 deletions
htdocs/contrat/list.php
with
58 additions
and
15 deletions
htdocs/contrat/class/contrat.class.php
+
40
−
10
View file @
5842d1ee
...
@@ -1823,24 +1823,54 @@ class Contrat extends CommonObject
...
@@ -1823,24 +1823,54 @@ class Contrat extends CommonObject
*
*
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
* @param int $maxlength Max length of ref
* @param int $maxlength Max length of ref
* @param int $notooltip 1=Disable tooltip
* @return string Chaine avec URL
* @return string Chaine avec URL
*/
*/
function
getNomUrl
(
$withpicto
=
0
,
$maxlength
=
0
)
function
getNomUrl
(
$withpicto
=
0
,
$maxlength
=
0
,
$notooltip
=
0
)
{
{
global
$
langs
;
global
$
conf
,
$langs
,
$user
;
$result
=
''
;
$result
=
''
;
$label
=
$langs
->
trans
(
"ShowContract"
)
.
': '
.
$this
->
ref
;
$link
=
'<a href="'
.
DOL_URL_ROOT
.
'/contrat/card.php?id='
.
$this
->
id
.
'" title="'
.
dol_escape_htmltag
(
$label
,
1
)
.
'" class="classfortooltip">'
;
$linkend
=
'</a>'
;
$picto
=
'contract'
;
$url
=
DOL_URL_ROOT
.
'/contrat/card.php?id='
.
$this
->
id
;
$picto
=
'contract'
;
$label
=
''
;
if
(
$user
->
rights
->
contrat
->
lire
)
{
$label
=
'<u>'
.
$langs
->
trans
(
"ShowContract"
)
.
'</u>'
;
$label
.
=
'<br><b>'
.
$langs
->
trans
(
'Ref'
)
.
':</b> '
.
$this
->
ref
;
$label
.
=
'<br><b>'
.
$langs
->
trans
(
'RefCustomer'
)
.
':</b> '
.
(
$this
->
ref_customer
?
$this
->
ref_customer
:
$this
->
ref_client
);
$label
.
=
'<br><b>'
.
$langs
->
trans
(
'RefSupplier'
)
.
':</b> '
.
$this
->
ref_supplier
;
if
(
!
empty
(
$this
->
total_ht
))
{
$label
.
=
'<br><b>'
.
$langs
->
trans
(
'AmountHT'
)
.
':</b> '
.
price
(
$this
->
total_ht
,
0
,
$langs
,
0
,
-
1
,
-
1
,
$conf
->
currency
);
}
if
(
!
empty
(
$this
->
total_tva
))
{
$label
.
=
'<br><b>'
.
$langs
->
trans
(
'VAT'
)
.
':</b> '
.
price
(
$this
->
total_tva
,
0
,
$langs
,
0
,
-
1
,
-
1
,
$conf
->
currency
);
}
if
(
!
empty
(
$this
->
total_ttc
))
{
$label
.
=
'<br><b>'
.
$langs
->
trans
(
'AmountTTC'
)
.
':</b> '
.
price
(
$this
->
total_ttc
,
0
,
$langs
,
0
,
-
1
,
-
1
,
$conf
->
currency
);
}
}
$linkclose
=
''
;
if
(
empty
(
$notooltip
)
&&
$user
->
rights
->
contrat
->
lire
)
{
if
(
!
empty
(
$conf
->
global
->
MAIN_OPTIMIZEFORTEXTBROWSER
))
{
$label
=
$langs
->
trans
(
"ShowOrder"
);
$linkclose
.
=
' alt="'
.
dol_escape_htmltag
(
$label
,
1
)
.
'"'
;
}
$linkclose
.
=
' title="'
.
dol_escape_htmltag
(
$label
,
1
)
.
'"'
;
$linkclose
.
=
' class="classfortooltip"'
;
}
if
(
$withpicto
)
$result
.
=
(
$link
.
img_object
(
$label
,
$picto
,
'class="classfortooltip"'
)
.
$linkend
);
$linkstart
=
'<a href="'
.
$url
.
'"'
;
$linkstart
.
=
$linkclose
.
'>'
;
$linkend
=
'</a>'
;
if
(
$withpicto
)
$result
.
=
(
$linkstart
.
img_object
((
$notooltip
?
''
:
$label
),
$picto
,
(
$notooltip
?
''
:
'class="classfortooltip"'
),
0
,
0
,
$notooltip
?
0
:
1
)
.
$linkend
);
if
(
$withpicto
&&
$withpicto
!=
2
)
$result
.
=
' '
;
if
(
$withpicto
&&
$withpicto
!=
2
)
$result
.
=
' '
;
if
(
$withpicto
!=
2
)
$result
.
=
$link
.
(
$maxlength
?
dol_trunc
(
$this
->
ref
,
$maxlength
)
:
$this
->
ref
)
.
$linkend
;
$result
.
=
$linkstart
.
$this
->
ref
.
$linkend
;
return
$result
;
return
$result
;
}
}
...
...
This diff is collapsed.
Click to expand it.
htdocs/contrat/list.php
+
18
−
5
View file @
5842d1ee
...
@@ -187,11 +187,12 @@ $now=dol_now();
...
@@ -187,11 +187,12 @@ $now=dol_now();
$form
=
new
Form
(
$db
);
$form
=
new
Form
(
$db
);
$formother
=
new
FormOther
(
$db
);
$formother
=
new
FormOther
(
$db
);
$socstatic
=
new
Societe
(
$db
);
$socstatic
=
new
Societe
(
$db
);
$contracttmp
=
new
Contrat
(
$db
);
llxHeader
();
llxHeader
(
''
,
$langs
->
trans
(
"Contracts"
)
);
$sql
=
'SELECT'
;
$sql
=
'SELECT'
;
$sql
.
=
" c.rowid, c.ref, c.datec as date_creation, c.tms as date_update, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier,"
;
$sql
.
=
" c.rowid, c.ref, c.datec as date_creation, c.tms as date_update, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier,
c.note_private, c.note_public,
"
;
$sql
.
=
' s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client,'
;
$sql
.
=
' s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client,'
;
$sql
.
=
" typent.code as typent_code,"
;
$sql
.
=
" typent.code as typent_code,"
;
$sql
.
=
" state.code_departement as state_code, state.nom as state_name,"
;
$sql
.
=
" state.code_departement as state_code, state.nom as state_name,"
;
...
@@ -265,7 +266,7 @@ $parameters=array();
...
@@ -265,7 +266,7 @@ $parameters=array();
$reshook
=
$hookmanager
->
executeHooks
(
'printFieldListWhere'
,
$parameters
);
// Note that $action and $object may have been modified by hook
$reshook
=
$hookmanager
->
executeHooks
(
'printFieldListWhere'
,
$parameters
);
// Note that $action and $object may have been modified by hook
$sql
.
=
$hookmanager
->
resPrint
;
$sql
.
=
$hookmanager
->
resPrint
;
$sql
.
=
" GROUP BY c.rowid, c.ref, c.datec, c.tms, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier,"
;
$sql
.
=
" GROUP BY c.rowid, c.ref, c.datec, c.tms, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier,
c.note_private, c.note_public,
"
;
$sql
.
=
' s.rowid, s.nom, s.town, s.zip, s.fk_pays, s.client, s.code_client,'
;
$sql
.
=
' s.rowid, s.nom, s.town, s.zip, s.fk_pays, s.client, s.code_client,'
;
$sql
.
=
" typent.code,"
;
$sql
.
=
" typent.code,"
;
$sql
.
=
" state.code_departement, state.nom"
;
$sql
.
=
" state.code_departement, state.nom"
;
...
@@ -556,13 +557,25 @@ if ($resql)
...
@@ -556,13 +557,25 @@ if ($resql)
while
(
$i
<
min
(
$num
,
$limit
))
while
(
$i
<
min
(
$num
,
$limit
))
{
{
$obj
=
$db
->
fetch_object
(
$resql
);
$obj
=
$db
->
fetch_object
(
$resql
);
$contracttmp
->
ref
=
$obj
->
ref
;
$contracttmp
->
id
=
$obj
->
rowid
;
$contracttmp
->
ref_customer
=
$obj
->
ref_customer
;
$contracttmp
->
ref_supplier
=
$obj
->
ref_supplier
;
$var
=!
$var
;
$var
=!
$var
;
print
'<tr '
.
$bc
[
$var
]
.
'>'
;
print
'<tr '
.
$bc
[
$var
]
.
'>'
;
if
(
!
empty
(
$arrayfields
[
'c.ref'
][
'checked'
]))
if
(
!
empty
(
$arrayfields
[
'c.ref'
][
'checked'
]))
{
{
print
'<td class="nowrap">
<a href="card.php?id='
.
$obj
->
rowid
.
'">
'
;
print
'<td class="nowrap">'
;
print
img_object
(
$langs
->
trans
(
"ShowContract"
),
"contract"
)
.
' '
.
(
isset
(
$obj
->
ref
)
?
$obj
->
ref
:
$obj
->
rowid
)
.
'</a>'
;
print
$contracttmp
->
getNomUrl
(
1
)
;
if
(
$obj
->
nb_late
)
print
img_warning
(
$langs
->
trans
(
"Late"
));
if
(
$obj
->
nb_late
)
print
img_warning
(
$langs
->
trans
(
"Late"
));
if
(
!
empty
(
$obj
->
note_private
)
||
!
empty
(
$obj
->
note_public
))
{
print
' <span class="note">'
;
print
'<a href="'
.
DOL_URL_ROOT
.
'/contrat/note.php?id='
.
$obj
->
rowid
.
'">'
.
img_picto
(
$langs
->
trans
(
"ViewPrivateNote"
),
'object_generic'
)
.
'</a>'
;
print
'</span>'
;
}
print
'</td>'
;
print
'</td>'
;
}
}
if
(
!
empty
(
$arrayfields
[
'c.ref_customer'
][
'checked'
]))
if
(
!
empty
(
$arrayfields
[
'c.ref_customer'
][
'checked'
]))
...
...
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