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
02439bed
Commit
02439bed
authored
9 years ago
by
Juanjo Menent
Committed by
GitHub
9 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #5458 from hregis/3.8_bug
Fix: wrong multicompany filter
parents
148f2e4c
4503659c
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/product/index.php
+2
-3
2 additions, 3 deletions
htdocs/product/index.php
with
2 additions
and
3 deletions
htdocs/product/index.php
+
2
−
3
View file @
02439bed
...
@@ -372,14 +372,13 @@ function activitytrim($product_type)
...
@@ -372,14 +372,13 @@ function activitytrim($product_type)
// breakdown by quarter
// breakdown by quarter
$sql
=
"SELECT DATE_FORMAT(p.datep,'%Y') as annee, DATE_FORMAT(p.datep,'%m') as mois, SUM(fd.total_ht) as Mnttot"
;
$sql
=
"SELECT DATE_FORMAT(p.datep,'%Y') as annee, DATE_FORMAT(p.datep,'%m') as mois, SUM(fd.total_ht) as Mnttot"
;
$sql
.
=
" FROM
"
.
MAIN_DB_PREFIX
.
"societe as s,
"
.
MAIN_DB_PREFIX
.
"facture as f, "
.
MAIN_DB_PREFIX
.
"facturedet as fd"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"facture as f, "
.
MAIN_DB_PREFIX
.
"facturedet as fd"
;
$sql
.
=
" , "
.
MAIN_DB_PREFIX
.
"paiement as p,"
.
MAIN_DB_PREFIX
.
"paiement_facture as pf"
;
$sql
.
=
" , "
.
MAIN_DB_PREFIX
.
"paiement as p,"
.
MAIN_DB_PREFIX
.
"paiement_facture as pf"
;
$sql
.
=
" WHERE f.
fk_soc = s.rowid"
;
$sql
.
=
" WHERE f.
entity = "
.
$conf
->
entity
;
$sql
.
=
" AND f.rowid = fd.fk_facture"
;
$sql
.
=
" AND f.rowid = fd.fk_facture"
;
$sql
.
=
" AND pf.fk_facture = f.rowid"
;
$sql
.
=
" AND pf.fk_facture = f.rowid"
;
$sql
.
=
" AND pf.fk_paiement= p.rowid"
;
$sql
.
=
" AND pf.fk_paiement= p.rowid"
;
$sql
.
=
" AND fd.product_type="
.
$product_type
;
$sql
.
=
" AND fd.product_type="
.
$product_type
;
$sql
.
=
" AND s.entity IN ("
.
getEntity
(
'societe'
,
1
)
.
")"
;
$sql
.
=
" AND p.datep >= '"
.
$db
->
idate
(
dol_get_first_day
(
$yearofbegindate
),
1
)
.
"'"
;
$sql
.
=
" AND p.datep >= '"
.
$db
->
idate
(
dol_get_first_day
(
$yearofbegindate
),
1
)
.
"'"
;
$sql
.
=
" GROUP BY annee, mois "
;
$sql
.
=
" GROUP BY annee, mois "
;
$sql
.
=
" ORDER BY annee, mois "
;
$sql
.
=
" ORDER BY annee, mois "
;
...
...
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