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
d82fff31
Commit
d82fff31
authored
15 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Debug reporting
parent
cb61c1cc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
htdocs/compta/resultat/clientfourn.php
+35
-10
35 additions, 10 deletions
htdocs/compta/resultat/clientfourn.php
htdocs/compta/tva/clients.php
+9
-10
9 additions, 10 deletions
htdocs/compta/tva/clients.php
htdocs/compta/tva/quadri_detail.php
+12
-4
12 additions, 4 deletions
htdocs/compta/tva/quadri_detail.php
with
56 additions
and
24 deletions
htdocs/compta/resultat/clientfourn.php
+
35
−
10
View file @
d82fff31
<?php
/* Copyright (C) 2002-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-200
9
Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-20
1
0 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -19,10 +19,10 @@
*/
/**
\file htdocs/compta/resultat/clientfourn.php
\brief Page reporting resultat
\version $Id$
*/
*
\file htdocs/compta/resultat/clientfourn.php
*
\brief Page reporting resultat
*
\version $Id$
*/
require
(
"./pre.inc.php"
);
require_once
(
DOL_DOCUMENT_ROOT
.
"/compta/tva/tva.class.php"
);
...
...
@@ -35,8 +35,33 @@ $langs->load("bills");
if
(
!
$user
->
rights
->
facture
->
lire
)
accessforbidden
();
$year
=
$_GET
[
"year"
];
if
(
!
$year
)
{
$year
=
strftime
(
"%Y"
,
time
());
}
// Date range
$year
=
$_REQUEST
[
"year"
];
if
(
empty
(
$year
))
{
$year_current
=
strftime
(
"%Y"
,
dol_now
());
$year_start
=
$year_current
;
}
else
{
$year_current
=
$year
;
$year_start
=
$year
;
}
$date_start
=
dol_mktime
(
$_REQUEST
[
"date_starthour"
],
$_REQUEST
[
"date_startmin"
],
$_REQUEST
[
"date_startsec"
],
$_REQUEST
[
"date_startmonth"
],
$_REQUEST
[
"date_startday"
],
$_REQUEST
[
"date_startyear"
]);
$date_end
=
dol_mktime
(
$_REQUEST
[
"date_endhour"
],
$_REQUEST
[
"date_endmin"
],
$_REQUEST
[
"date_endsec"
],
$_REQUEST
[
"date_endmonth"
],
$_REQUEST
[
"date_endday"
],
$_REQUEST
[
"date_endyear"
]);
// Quarter
if
(
empty
(
$date_start
)
||
empty
(
$date_end
))
// We define date_start and date_end
{
$q
=
(
!
empty
(
$_REQUEST
[
"q"
]))
?
$_REQUEST
[
"q"
]
:
1
;
// TODO Set current quarter
if
(
$q
==
1
)
{
$date_start
=
dol_get_first_day
(
$year_start
,
1
);
$date_end
=
dol_get_last_day
(
$year_start
,
3
);
}
if
(
$q
==
2
)
{
$date_start
=
dol_get_first_day
(
$year_start
,
4
);
$date_end
=
dol_get_last_day
(
$year_start
,
6
);
}
if
(
$q
==
3
)
{
$date_start
=
dol_get_first_day
(
$year_start
,
7
);
$date_end
=
dol_get_last_day
(
$year_start
,
9
);
}
if
(
$q
==
4
)
{
$date_start
=
dol_get_first_day
(
$year_start
,
10
);
$date_end
=
dol_get_last_day
(
$year_start
,
12
);
}
}
else
{
// TODO We define q
}
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES')
$modecompta
=
$conf
->
compta
->
mode
;
if
(
$_GET
[
"modecompta"
])
$modecompta
=
$_GET
[
"modecompta"
];
...
...
@@ -451,7 +476,7 @@ if ($modecompta == 'CREANCES-DETTES')
$sql
.
=
" AND f.entity = "
.
$conf
->
entity
;
$sql
.
=
" GROUP BY dm"
;
$sql
.
=
" ORDER BY dm DESC"
;
$result
=
$db
->
query
(
$sql
);
if
(
$result
)
{
$num
=
$db
->
num_rows
(
$result
);
...
...
@@ -530,7 +555,7 @@ else
$sql
.
=
" AND t.entity = "
.
$conf
->
entity
;
$sql
.
=
" GROUP BY dm"
;
$sql
.
=
" ORDER BY dm DESC"
;
$result
=
$db
->
query
(
$sql
);
if
(
$result
)
{
$num
=
$db
->
num_rows
(
$result
);
...
...
@@ -570,7 +595,7 @@ else
$sql
.
=
" AND t.entity = "
.
$conf
->
entity
;
$sql
.
=
" GROUP BY dm"
;
$sql
.
=
" ORDER BY dm DESC"
;
$result
=
$db
->
query
(
$sql
);
if
(
$result
)
{
$num
=
$db
->
num_rows
(
$result
);
...
...
This diff is collapsed.
Click to expand it.
htdocs/compta/tva/clients.php
+
9
−
10
View file @
d82fff31
...
...
@@ -113,12 +113,10 @@ if ($modetax==1) // Calculate on invoice for goods and services
$elementcust
=
$langs
->
trans
(
"CustomersInvoices"
);
$productcust
=
$langs
->
trans
(
"Description"
);
$amountcust
=
$langs
->
trans
(
"AmountHT"
);
$vatcust
=
$langs
->
trans
(
"VATReceived"
);
if
(
$mysoc
->
tva_assuj
)
$vatcust
.
=
' ('
.
$langs
->
trans
(
"ToPay"
)
.
')'
;
$elementsup
=
$langs
->
trans
(
"SuppliersInvoices"
);
$productsup
=
$langs
->
trans
(
"Description"
);
$amountsup
=
$langs
->
trans
(
"AmountHT"
);
$vatsup
=
$langs
->
trans
(
"VATPaid"
);
if
(
$mysoc
->
tva_assuj
)
$vatsup
.
=
' ('
.
$langs
->
trans
(
"ToGetBack"
)
.
')'
;
}
if
(
$modetax
==
0
)
// Invoice for goods, payment for services
...
...
@@ -137,21 +135,22 @@ if ($modetax==0) // Invoice for goods, payment for services
$elementcust
=
$langs
->
trans
(
"CustomersInvoices"
);
$productcust
=
$langs
->
trans
(
"Description"
);
$amountcust
=
$langs
->
trans
(
"AmountHT"
);
$vatcust
=
$langs
->
trans
(
"VATReceived"
);
if
(
$mysoc
->
tva_assuj
)
$vatcust
.
=
' ('
.
$langs
->
trans
(
"ToPay"
)
.
')'
;
$elementsup
=
$langs
->
trans
(
"SuppliersInvoices"
);
$productsup
=
$langs
->
trans
(
"Description"
);
$amountsup
=
$langs
->
trans
(
"AmountHT"
);
$vatsup
=
$langs
->
trans
(
"VATPaid"
);
if
(
$mysoc
->
tva_assuj
)
$vatsup
.
=
' ('
.
$langs
->
trans
(
"ToGetBack"
)
.
')'
;
}
report_header
(
$nom
,
$nomlink
,
$period
,
$periodlink
,
$description
,
$builddate
,
$exportlink
);
$vatcust
=
$langs
->
trans
(
"VATReceived"
);
$vatsup
=
$langs
->
trans
(
"VATPaid"
);
// VAT Received
print
"<br>"
;
print_titre
(
$vatcust
);
//
print "<br>";
//
print_titre($vatcust);
print
"<table class=
\"
noborder
\"
width=
\"
100%
\"
>"
;
print
"<tr class=
\"
liste_titre
\"
>"
;
...
...
@@ -215,15 +214,15 @@ else
print
'<tr><td colspan="5">'
.
$langs
->
trans
(
"Error"
)
.
'</td></tr>'
;
}
print
'</table>'
;
//
print '</table>';
// VAT Paid
print
"<br>"
;
print_titre
(
$vatsup
);
//
print "<br>";
//
print_titre($vatsup);
print
"<table class=
\"
noborder
\"
width=
\"
100%
\"
>"
;
//
print "<table class=\"noborder\" width=\"100%\">";
print
"<tr class=
\"
liste_titre
\"
>"
;
print
'<td align="left">'
.
$langs
->
trans
(
"Num"
)
.
"</td>"
;
print
'<td align="left">'
.
$langs
->
trans
(
"Supplier"
)
.
"</td>"
;
...
...
This diff is collapsed.
Click to expand it.
htdocs/compta/tva/quadri_detail.php
+
12
−
4
View file @
d82fff31
<?php
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2004-200
9
Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-20
1
0 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006-2007 Yannick Warnier <ywarnier@beeznest.org>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -174,9 +174,15 @@ if ($modetax==0) // Invoice for goods, payment for services
}
report_header
(
$nom
,
$nomlink
,
$period
,
$periodlink
,
$description
,
$builddate
,
$exportlink
);
$vatcust
=
$langs
->
trans
(
"VATReceived"
);
$vatsup
=
$langs
->
trans
(
"VATPaid"
);
// VAT Received and paid
//print "<br>";
//print_titre($vatcust);
echo
'<table class="noborder" width="100%">'
;
$y
=
$year_current
;
...
...
@@ -402,6 +408,8 @@ else
$x_coll_sum
+=
$temp_vat
;
}
}
// Total customers
print
'<tr class="liste_total">'
;
print
'<td></td>'
;
print
'<td align="right">'
.
$langs
->
trans
(
"Total"
)
.
':</td>'
;
...
...
@@ -415,7 +423,6 @@ else
print
'</tr>'
;
}
print
'<tr><td colspan="'
.
(
$span
+
1
)
.
'"> </td></tr>'
;
//print table headers for this quadri - expenses now
...
...
@@ -538,6 +545,7 @@ else
}
}
// Total suppliers
print
'<tr class="liste_total">'
;
print
'<td> </td>'
;
print
'<td align="right">'
.
$langs
->
trans
(
"Total"
)
.
':</td>'
;
...
...
@@ -555,11 +563,11 @@ else
// Total to pay
print
'<tr class="liste_titre">'
;
print
'<td class="liste_titre" colspan="'
.
(
$span
-
1
)
.
'"></td><td class="liste_titre" align="right" colspan="2">'
.
$langs
->
trans
(
"TotalToPay"
)
.
', '
.
$langs
->
trans
(
"Quadri"
)
.
' '
.
$q
.
':</td>'
;
print
'<td class="liste_titre" colspan="'
.
(
$span
-
1
)
.
'"></td><td class="liste_titre" align="right" colspan="2">'
.
$langs
->
trans
(
"TotalToPay"
)
.
(
$q
?
', '
.
$langs
->
trans
(
"Quadri"
)
.
' '
.
$q
:
''
)
.
':</td>'
;
print
'</tr>'
.
"
\n
"
;
$diff
=
$x_coll_sum
-
$x_paye_sum
;
print
'<tr class="list_total">'
;
print
'<tr class="list
e
_total">'
;
print
'<td class="liste_total" colspan="'
.
$span
.
'"></td>'
;
print
'<td class="liste_total" nowrap="nowrap" align="right"><b>'
.
price
(
price2num
(
$diff
,
'MT'
))
.
"</b></td>
\n
"
;
print
"</tr>
\n
"
;
...
...
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