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
227c970d
Commit
227c970d
authored
20 years ago
by
Rodolphe Quiedeville
Browse files
Options
Downloads
Patches
Plain Diff
Bugfix
parent
be822a9e
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/telephonie/stats/graph/comm.nbminutes.class.php
+13
-4
13 additions, 4 deletions
htdocs/telephonie/stats/graph/comm.nbminutes.class.php
with
13 additions
and
4 deletions
htdocs/telephonie/stats/graph/comm.nbminutes.class.php
+
13
−
4
View file @
227c970d
...
...
@@ -31,10 +31,12 @@ class GraphCommNbMinutes extends GraphBar{
$this
->
db
=
$DB
;
$this
->
file
=
$file
;
$this
->
showframe
=
true
;
$this
->
client
=
0
;
$this
->
contrat
=
0
;
$this
->
titre
=
"Nombre de minutes"
;
$this
->
ligne
=
0
;
$this
->
titre
=
"Nombre de minutes"
;
$this
->
barcolor
=
"bisque2"
;
$this
->
datas
=
array
();
...
...
@@ -57,11 +59,11 @@ class GraphCommNbMinutes extends GraphBar{
$sql
=
"SELECT date_format(td.date,'%Y%m'), sum(duree)"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"telephonie_communications_details as td"
;
if
(
$this
->
client
==
0
&&
$this
->
contrat
==
0
)
if
(
$this
->
client
==
0
&&
$this
->
contrat
==
0
&&
$this
->
ligne
==
0
)
{
$sql
.
=
" GROUP BY date_format(td.date, '%Y%m') ASC"
;
}
elseif
(
$this
->
client
>
0
&&
$this
->
contrat
==
0
)
elseif
(
$this
->
client
>
0
&&
$this
->
contrat
==
0
&&
$this
->
ligne
==
0
)
{
$sql
.
=
" , "
.
MAIN_DB_PREFIX
.
"telephonie_societe_ligne as s"
;
...
...
@@ -70,7 +72,7 @@ class GraphCommNbMinutes extends GraphBar{
$sql
.
=
" GROUP BY date_format(td.date,'%Y%m') ASC "
;
}
elseif
(
$this
->
client
==
0
&&
$this
->
contrat
>
0
)
elseif
(
$this
->
client
==
0
&&
$this
->
contrat
>
0
&&
$this
->
ligne
==
0
)
{
$sql
.
=
" , "
.
MAIN_DB_PREFIX
.
"telephonie_societe_ligne as s"
;
...
...
@@ -79,6 +81,13 @@ class GraphCommNbMinutes extends GraphBar{
$sql
.
=
" GROUP BY date_format(td.date,'%Y%m') ASC "
;
}
elseif
(
$this
->
client
==
0
&&
$this
->
contrat
==
0
&&
$this
->
ligne
>
0
)
{
$sql
.
=
" WHERE td.fk_ligne = "
.
$this
->
ligne
;
$sql
.
=
" GROUP BY date_format(td.date,'%Y%m') ASC "
;
}
if
(
$this
->
db
->
query
(
$sql
))
{
...
...
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