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
449ac5fa
Commit
449ac5fa
authored
15 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Amount in Income / Expense report
parent
0433ea82
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/compta/resultat/clientfourn.php
+12
-2
12 additions, 2 deletions
htdocs/compta/resultat/clientfourn.php
htdocs/compta/resultat/index.php
+10
-2
10 additions, 2 deletions
htdocs/compta/resultat/index.php
with
22 additions
and
4 deletions
htdocs/compta/resultat/clientfourn.php
+
12
−
2
View file @
449ac5fa
...
...
@@ -164,6 +164,7 @@ print adodb_gmstrftime('%Y-%d-%m %H:%M',$date_end).'<br>';
print $sql;
*/
dol_syslog
(
"get customer invoices sql="
.
$sql
);
$result
=
$db
->
query
(
$sql
);
if
(
$result
)
{
$num
=
$db
->
num_rows
(
$result
);
...
...
@@ -206,6 +207,7 @@ if ($modecompta != 'CREANCES-DETTES')
$sql
.
=
" GROUP BY nom"
;
$sql
.
=
" ORDER BY nom"
;
dol_syslog
(
"get old customer payments not linked to invoices sql="
.
$sql
);
$result
=
$db
->
query
(
$sql
);
if
(
$result
)
{
$num
=
$db
->
num_rows
(
$result
);
...
...
@@ -276,8 +278,10 @@ $sql .= " GROUP BY nom, s.rowid";
$sql
.
=
" ORDER BY nom, s.rowid"
;
print
'<tr><td colspan="4">'
.
$langs
->
trans
(
"SuppliersInvoices"
)
.
'</td></tr>'
;
$subtotal_ht
=
0
;
$subtotal_ttc
=
0
;
dol_syslog
(
"get suppliers invoices sql="
.
$sql
);
$result
=
$db
->
query
(
$sql
);
if
(
$result
)
{
$num
=
$db
->
num_rows
(
$result
);
...
...
@@ -324,7 +328,7 @@ print '</tr>';
* Charges sociales non deductibles
*/
print
'<tr><td colspan="4">
Prestations/Charges NON deductibles
</td></tr>'
;
print
'<tr><td colspan="4">
'
.
$langs
->
trans
(
"SocialContributions"
)
.
'
</td></tr>'
;
if
(
$modecompta
==
'CREANCES-DETTES'
)
{
$sql
=
"SELECT c.libelle as nom, sum(s.amount) as amount"
;
...
...
@@ -347,6 +351,7 @@ else {
$sql
.
=
" AND s.entity = "
.
$conf
->
entity
;
$sql
.
=
" GROUP BY c.libelle"
;
dol_syslog
(
"get social contributions deductible=0 sql="
.
$sql
);
$result
=
$db
->
query
(
$sql
);
$subtotal_ht
=
0
;
$subtotal_ttc
=
0
;
...
...
@@ -391,7 +396,7 @@ print '</tr>';
* Charges sociales deductibles
*/
print
'<tr><td colspan="4">
Prestations/Charges deductibles
</td></tr>'
;
print
'<tr><td colspan="4">
'
.
$langs
->
trans
(
"SocialContributions"
)
.
'
</td></tr>'
;
if
(
$modecompta
==
'CREANCES-DETTES'
)
{
$sql
=
"SELECT c.libelle as nom, sum(s.amount) as amount"
;
...
...
@@ -416,6 +421,7 @@ else {
$sql
.
=
" GROUP BY c.libelle"
;
}
dol_syslog
(
"get social contributions deductible=1 sql="
.
$sql
);
$result
=
$db
->
query
(
$sql
);
$subtotal_ht
=
0
;
$subtotal_ttc
=
0
;
...
...
@@ -492,6 +498,7 @@ if ($modecompta == 'CREANCES-DETTES')
$sql
.
=
" GROUP BY dm"
;
$sql
.
=
" ORDER BY dm DESC"
;
dol_syslog
(
"get vat to pay sql="
.
$sql
);
$result
=
$db
->
query
(
$sql
);
if
(
$result
)
{
$num
=
$db
->
num_rows
(
$result
);
...
...
@@ -528,6 +535,7 @@ if ($modecompta == 'CREANCES-DETTES')
$sql
.
=
" GROUP BY dm"
;
$sql
.
=
" ORDER BY dm DESC"
;
dol_syslog
(
"get vat received back sql="
.
$sql
);
$result
=
$db
->
query
(
$sql
);
if
(
$result
)
{
$num
=
$db
->
num_rows
(
$result
);
...
...
@@ -567,6 +575,7 @@ else
$sql
.
=
" GROUP BY dm"
;
$sql
.
=
" ORDER BY dm DESC"
;
dol_syslog
(
"get vat really paid sql="
.
$sql
);
$result
=
$db
->
query
(
$sql
);
if
(
$result
)
{
$num
=
$db
->
num_rows
(
$result
);
...
...
@@ -605,6 +614,7 @@ else
$sql
.
=
" GROUP BY dm"
;
$sql
.
=
" ORDER BY dm DESC"
;
dol_syslog
(
"get vat really received back sql="
.
$sql
);
$result
=
$db
->
query
(
$sql
);
if
(
$result
)
{
$num
=
$db
->
num_rows
(
$result
);
...
...
This diff is collapsed.
Click to expand it.
htdocs/compta/resultat/index.php
+
10
−
2
View file @
449ac5fa
...
...
@@ -111,6 +111,7 @@ $sql.= " GROUP BY dm";
$sql
.
=
" ORDER BY dm"
;
//print $sql;
dol_syslog
(
"get customers invoices sql="
.
$sql
);
$result
=
$db
->
query
(
$sql
);
if
(
$result
)
{
...
...
@@ -143,6 +144,7 @@ if ($modecompta != 'CREANCES-DETTES') {
$sql
.
=
" GROUP BY dm"
;
$sql
.
=
" ORDER BY dm"
;
dol_syslog
(
"get old customers payments not linked to invoices sql="
.
$sql
);
$result
=
$db
->
query
(
$sql
);
if
(
$result
)
{
$num
=
$db
->
num_rows
(
$result
);
...
...
@@ -174,7 +176,7 @@ if ($modecompta == 'CREANCES-DETTES') {
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"facture_fourn as f"
;
$sql
.
=
" WHERE f.fk_statut IN (1,2)"
;
}
else
{
$sql
=
"SELECT sum(p.amount) as amount_ttc, date_format(p.datep,'%Y-%m') as dm"
;
$sql
=
"SELECT sum(p
f
.amount) as amount_ttc, date_format(p.datep,'%Y-%m') as dm"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"paiementfourn as p"
;
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"facture_fourn as f"
;
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"paiementfourn_facturefourn as pf"
;
...
...
@@ -185,6 +187,7 @@ $sql.= " AND f.entity = ".$conf->entity;
if
(
$socid
)
$sql
.
=
" AND f.fk_soc = "
.
$socid
;
$sql
.
=
" GROUP BY dm"
;
dol_syslog
(
"get suppliers invoices sql="
.
$sql
);
$result
=
$db
->
query
(
$sql
);
if
(
$result
)
{
...
...
@@ -219,6 +222,7 @@ if ($modecompta == 'CREANCES-DETTES') {
$sql
.
=
" AND f.entity = "
.
$conf
->
entity
;
$sql
.
=
" GROUP BY dm DESC"
;
dol_syslog
(
"get vat to pay sql="
.
$sql
);
$result
=
$db
->
query
(
$sql
);
if
(
$result
)
{
$num
=
$db
->
num_rows
(
$result
);
...
...
@@ -244,6 +248,7 @@ if ($modecompta == 'CREANCES-DETTES') {
$sql
.
=
" AND f.entity = "
.
$conf
->
entity
;
$sql
.
=
" GROUP BY dm"
;
dol_syslog
(
"get vat to receive back sql="
.
$sql
);
$result
=
$db
->
query
(
$sql
);
if
(
$result
)
{
$num
=
$db
->
num_rows
(
$result
);
...
...
@@ -271,6 +276,7 @@ else {
$sql
.
=
" AND t.entity = "
.
$conf
->
entity
;
$sql
.
=
" GROUP BY dm"
;
dol_syslog
(
"get vat really paid sql="
.
$sql
);
$result
=
$db
->
query
(
$sql
);
if
(
$result
)
{
$num
=
$db
->
num_rows
(
$result
);
...
...
@@ -296,6 +302,7 @@ else {
$sql
.
=
" AND t.entity = "
.
$conf
->
entity
;
$sql
.
=
" GROUP BY dm"
;
dol_syslog
(
"get vat really received back sql="
.
$sql
);
$result
=
$db
->
query
(
$sql
);
if
(
$result
)
{
$num
=
$db
->
num_rows
(
$result
);
...
...
@@ -340,8 +347,8 @@ else {
$sql
.
=
" AND s.entity = "
.
$conf
->
entity
;
$sql
.
=
" GROUP BY c.libelle, dm"
;
dol_syslog
(
"get social contributions deductible=0 sql="
.
$sql
);
$result
=
$db
->
query
(
$sql
);
if
(
$result
)
{
$num
=
$db
->
num_rows
(
$result
);
$var
=
false
;
...
...
@@ -387,6 +394,7 @@ else
$sql
.
=
" AND s.entity = "
.
$conf
->
entity
;
$sql
.
=
" GROUP BY c.libelle, dm"
;
dol_syslog
(
"get social contributions paid deductible=1 sql="
.
$sql
);
$result
=
$db
->
query
(
$sql
);
if
(
$result
)
{
$num
=
$db
->
num_rows
(
$result
);
...
...
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