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
c700d8a8
Commit
c700d8a8
authored
Mar 17, 2015
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix remove warning
parent
166fda49
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/boxes/box_activity.php
+15
-9
15 additions, 9 deletions
htdocs/core/boxes/box_activity.php
with
15 additions
and
9 deletions
htdocs/core/boxes/box_activity.php
+
15
−
9
View file @
c700d8a8
...
@@ -342,7 +342,8 @@ class box_activity extends ModeleBoxes
...
@@ -342,7 +342,8 @@ class box_activity extends ModeleBoxes
}
}
// list the summary of the propals
// list the summary of the propals
if
(
!
empty
(
$conf
->
propal
->
enabled
)
&&
$user
->
rights
->
propal
->
lire
)
{
if
(
!
empty
(
$conf
->
propal
->
enabled
)
&&
$user
->
rights
->
propal
->
lire
)
{
include_once
DOL_DOCUMENT_ROOT
.
'/comm/propal/class/propal.class.php'
;
include_once
DOL_DOCUMENT_ROOT
.
'/comm/propal/class/propal.class.php'
;
$propalstatic
=
new
Propal
(
$db
);
$propalstatic
=
new
Propal
(
$db
);
...
@@ -350,7 +351,8 @@ class box_activity extends ModeleBoxes
...
@@ -350,7 +351,8 @@ class box_activity extends ModeleBoxes
$filename
=
'/boxactivity-propal'
.
$fileid
;
$filename
=
'/boxactivity-propal'
.
$fileid
;
$refresh
=
dol_cache_refresh
(
$cachedir
,
$filename
,
$cachetime
);
$refresh
=
dol_cache_refresh
(
$cachedir
,
$filename
,
$cachetime
);
$data
=
array
();
$data
=
array
();
if
(
$refresh
)
{
if
(
$refresh
)
{
$sql
=
"SELECT p.fk_statut, SUM(p.total) as Mnttot, COUNT(*) as nb"
;
$sql
=
"SELECT p.fk_statut, SUM(p.total) as Mnttot, COUNT(*) as nb"
;
$sql
.
=
" FROM ("
.
MAIN_DB_PREFIX
.
"societe as s, "
.
MAIN_DB_PREFIX
.
"propal as p"
;
$sql
.
=
" FROM ("
.
MAIN_DB_PREFIX
.
"societe as s, "
.
MAIN_DB_PREFIX
.
"propal as p"
;
if
(
!
$user
->
rights
->
societe
->
client
->
voir
&&
!
$user
->
societe_id
)
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"societe_commerciaux as sc"
;
if
(
!
$user
->
rights
->
societe
->
client
->
voir
&&
!
$user
->
societe_id
)
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"societe_commerciaux as sc"
;
...
@@ -365,8 +367,8 @@ class box_activity extends ModeleBoxes
...
@@ -365,8 +367,8 @@ class box_activity extends ModeleBoxes
$sql
.
=
" ORDER BY p.fk_statut DESC"
;
$sql
.
=
" ORDER BY p.fk_statut DESC"
;
$result
=
$db
->
query
(
$sql
);
$result
=
$db
->
query
(
$sql
);
if
(
$result
)
if
(
$result
)
{
{
$num
=
$db
->
num_rows
(
$result
)
+
$line
;
$num
=
$db
->
num_rows
(
$result
)
+
$line
;
$j
=
0
;
$j
=
0
;
while
(
$j
<
$num
)
{
while
(
$j
<
$num
)
{
...
@@ -380,12 +382,17 @@ class box_activity extends ModeleBoxes
...
@@ -380,12 +382,17 @@ class box_activity extends ModeleBoxes
}
else
{
}
else
{
dol_print_error
(
$db
);
dol_print_error
(
$db
);
}
}
}
else
{
}
else
{
$data
=
dol_readcachefile
(
$cachedir
,
$filename
);
$data
=
dol_readcachefile
(
$cachedir
,
$filename
);
}
}
if
(
!
empty
(
$data
))
{
if
(
!
empty
(
$data
))
{
$j
=
0
;
$j
=
0
;
while
(
$line
<
count
(
$data
))
{
while
(
$line
<
count
(
$data
))
{
$this
->
info_box_contents
[
$line
][]
=
array
(
$this
->
info_box_contents
[
$line
][]
=
array
(
'td'
=>
'align="left" width="16"'
,
'td'
=>
'align="left" width="16"'
,
'url'
=>
DOL_URL_ROOT
.
"/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&viewstatut="
.
$data
[
$j
]
->
fk_statut
,
'url'
=>
DOL_URL_ROOT
.
"/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&viewstatut="
.
$data
[
$j
]
->
fk_statut
,
...
@@ -393,7 +400,6 @@ class box_activity extends ModeleBoxes
...
@@ -393,7 +400,6 @@ class box_activity extends ModeleBoxes
'logo'
=>
'object_propal'
'logo'
=>
'object_propal'
);
);
$objp
=
$db
->
fetch_object
(
$result
);
$this
->
info_box_contents
[
$line
][]
=
array
(
$this
->
info_box_contents
[
$line
][]
=
array
(
'td'
=>
'align="left"'
,
'td'
=>
'align="left"'
,
'text'
=>
$langs
->
trans
(
"Proposals"
)
.
" "
.
$propalstatic
->
LibStatut
(
$data
[
$j
]
->
fk_statut
,
0
),
'text'
=>
$langs
->
trans
(
"Proposals"
)
.
" "
.
$propalstatic
->
LibStatut
(
$data
[
$j
]
->
fk_statut
,
0
),
...
...
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