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
2f8ed32f
Commit
2f8ed32f
authored
9 years ago
by
Juanjo Menent
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Issues if strict mode option ONLY_FULL_GROUP_BY is activated
parent
dc743029
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/compta/index.php
+7
-6
7 additions, 6 deletions
htdocs/compta/index.php
with
7 additions
and
6 deletions
htdocs/compta/index.php
+
7
−
6
View file @
2f8ed32f
...
...
@@ -2,6 +2,7 @@
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -321,7 +322,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
$sql
.
=
" AND f.entity = "
.
$conf
->
entity
;
if
(
!
$user
->
rights
->
societe
->
client
->
voir
&&
!
$socid
)
$sql
.
=
" AND s.rowid = sc.fk_soc AND sc.fk_user = "
.
$user
->
id
;
if
(
$socid
)
$sql
.
=
" AND f.fk_soc = "
.
$socid
;
$sql
.
=
" GROUP BY f.rowid, f.facnumber, f.fk_statut, f.type, f.total, f.total_ttc, f.paye, f.tms, f.date_lim_reglement, s.nom, s.rowid"
;
$sql
.
=
" GROUP BY f.rowid, f.facnumber, f.fk_statut, f.type, f.total,
f.tva,
f.total_ttc, f.paye, f.tms, f.date_lim_reglement, s.nom, s.rowid
, s.code_client
"
;
$sql
.
=
" ORDER BY f.tms DESC "
;
$sql
.
=
$db
->
plimit
(
$max
,
0
);
...
...
@@ -426,7 +427,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
$sql
.
=
" AND ff.entity = "
.
$conf
->
entity
;
if
(
!
$user
->
rights
->
societe
->
client
->
voir
&&
!
$socid
)
$sql
.
=
" AND s.rowid = sc.fk_soc AND sc.fk_user = "
.
$user
->
id
;
if
(
$socid
)
$sql
.
=
" AND ff.fk_soc = "
.
$socid
;
$sql
.
=
" GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.tva, ff.total_ttc, ff.tms, ff.paye, s.nom, s.rowid"
;
$sql
.
=
" GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.tva,
ff.total_tva,
ff.total_ttc, ff.tms, ff.paye, s.nom, s.rowid
, s.code_fournisseur
"
;
$sql
.
=
" ORDER BY ff.tms DESC "
;
$sql
.
=
$db
->
plimit
(
$max
,
0
);
...
...
@@ -658,7 +659,7 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us
if
(
$socid
)
$sql
.
=
" AND c.fk_soc = "
.
$socid
;
$sql
.
=
" AND c.fk_statut = 3"
;
$sql
.
=
" AND c.facture = 0"
;
$sql
.
=
" GROUP BY s.nom, s.rowid, c.rowid, c.ref, c.facture, c.fk_statut, c.total_ht, c.total_ttc"
;
$sql
.
=
" GROUP BY s.nom, s.rowid,
s.code_client,
c.rowid, c.ref, c.facture, c.fk_statut,
c.tva,
c.total_ht, c.total_ttc"
;
$resql
=
$db
->
query
(
$sql
);
if
(
$resql
)
...
...
@@ -762,7 +763,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
$sql
.
=
" AND f.entity = "
.
$conf
->
entity
;
if
(
!
$user
->
rights
->
societe
->
client
->
voir
&&
!
$socid
)
$sql
.
=
" AND s.rowid = sc.fk_soc AND sc.fk_user = "
.
$user
->
id
;
if
(
$socid
)
$sql
.
=
" AND f.fk_soc = "
.
$socid
;
$sql
.
=
" GROUP BY f.rowid, f.facnumber, f.fk_statut, f.datef, f.type, f.total, f.total_ttc, f.paye, f.tms, f.date_lim_reglement, s.nom, s.rowid"
;
$sql
.
=
" GROUP BY f.rowid, f.facnumber, f.fk_statut, f.datef, f.type, f.total,
f.tva,
f.total_ttc, f.paye, f.tms, f.date_lim_reglement, s.nom, s.rowid
, s.code_client
"
;
$sql
.
=
" ORDER BY f.datef ASC, f.facnumber ASC"
;
$resql
=
$db
->
query
(
$sql
);
...
...
@@ -876,8 +877,8 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
$sql
.
=
" AND ff.fk_statut = 1"
;
if
(
!
$user
->
rights
->
societe
->
client
->
voir
&&
!
$socid
)
$sql
.
=
" AND s.rowid = sc.fk_soc AND sc.fk_user = "
.
$user
->
id
;
if
(
$socid
)
$sql
.
=
" AND ff.fk_soc = "
.
$socid
;
$sql
.
=
" GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.tva, ff.total_ttc, ff.paye,"
;
$sql
.
=
" s.nom, s.rowid"
;
$sql
.
=
" GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.tva,
ff.total_tva,
ff.total_ttc, ff.paye,"
;
$sql
.
=
" s.nom, s.rowid
, s.code_client, s.code_fournisseur
"
;
$resql
=
$db
->
query
(
$sql
);
if
(
$resql
)
...
...
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