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
d1cbe354
Commit
d1cbe354
authored
20 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Corrections mauvais résultat du ca par société et support des 2 modes comptables.
parent
2a480075
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/compta/stats/cabyuser.php
+32
-11
32 additions, 11 deletions
htdocs/compta/stats/cabyuser.php
htdocs/compta/stats/casoc.php
+2
-8
2 additions, 8 deletions
htdocs/compta/stats/casoc.php
with
34 additions
and
19 deletions
htdocs/compta/stats/cabyuser.php
+
32
−
11
View file @
d1cbe354
...
...
@@ -29,19 +29,19 @@
require
(
"./pre.inc.php"
);
/*
* Scurit accs client
*/
if
(
$user
->
societe_id
>
0
)
{
$socidp
=
$user
->
societe_id
;
}
$year
=
$_GET
[
"year"
];
if
(
!
$year
)
{
$year
=
strftime
(
"%Y"
,
time
());
}
$modecompta
=
$conf
->
compta
->
mode
;
if
(
$_GET
[
"modecompta"
])
$modecompta
=
$_GET
[
"modecompta"
];
$sortorder
=
isset
(
$_GET
[
"sortorder"
])
?
$_GET
[
"sortorder"
]
:
$_POST
[
"sortorder"
];
$sortfield
=
isset
(
$_GET
[
"sortfield"
])
?
$_GET
[
"sortfield"
]
:
$_POST
[
"sortfield"
];
if
(
!
$sortorder
)
$sortorder
=
"desc"
;
if
(
!
$sortfield
)
$sortfield
=
"amount_ttc"
;
// Scurit accs client
if
(
$user
->
societe_id
>
0
)
$socidp
=
$user
->
societe_id
;
llxHeader
();
...
...
@@ -146,13 +146,34 @@ if ($modecompta != 'CREANCES-DETTES')
$i
=
0
;
print
"<table class=
\"
noborder
\"
width=
\"
100%
\"
>"
;
print
"<tr class=
\"
liste_titre
\"
>"
;
print
"<td>"
.
$langs
->
trans
(
"User"
)
.
"</td>"
;
print
'<td align="right">'
.
$langs
->
trans
(
"AmountTTC"
)
.
'</td><td align="right">'
.
$langs
->
trans
(
"Percentage"
)
.
'</td>'
;
print_liste_field_titre
(
$langs
->
trans
(
"User"
),
$_SERVER
[
"PHP_SELF"
],
"name"
,
""
,
'&year='
.
(
$year
)
.
'&modecompta='
.
$modecompta
,
""
,
$sortfield
);
print_liste_field_titre
(
$langs
->
trans
(
"AmountTTC"
),
$_SERVER
[
"PHP_SELF"
],
"amount_ttc"
,
""
,
'&year='
.
(
$year
)
.
'&modecompta='
.
$modecompta
,
'align="right"'
,
$sortfield
);
print_liste_field_titre
(
$langs
->
trans
(
"Percentage"
),
$_SERVER
[
"PHP_SELF"
],
"amount_ttc"
,
""
,
'&year='
.
(
$year
)
.
'&modecompta='
.
$modecompta
,
'align="right"'
,
$sortfield
);
print
"</tr>
\n
"
;
$var
=
true
;
if
(
sizeof
(
$amount
))
{
$arrayforsort
=
$name
;
// On dfinit tableau arrayforsort
if
(
$sortfield
==
'nom'
&&
$sortorder
==
'asc'
)
{
asort
(
$name
);
$arrayforsort
=
$name
;
}
if
(
$sortfield
==
'nom'
&&
$sortorder
==
'desc'
)
{
arsort
(
$name
);
$arrayforsort
=
$name
;
}
if
(
$sortfield
==
'amount_ttc'
&&
$sortorder
==
'asc'
)
{
asort
(
$amount
);
$arrayforsort
=
$amount
;
}
if
(
$sortfield
==
'amount_ttc'
&&
$sortorder
==
'desc'
)
{
arsort
(
$amount
);
$arrayforsort
=
$amount
;
}
foreach
(
$amount
as
$key
=>
$value
)
{
$var
=!
$var
;
...
...
@@ -166,8 +187,8 @@ if (sizeof($amount))
$linkname
=
$langs
->
trans
(
"Paiements lis aucune facture"
);
}
print
"<td>"
.
$linkname
.
"</td>
\n
"
;
print
'<td align="right">'
.
price
(
$
value
)
.
'</td>'
;
print
'<td align="right">'
.
(
$catotal
>
0
?
price
(
100
/
$catotal
*
$
value
)
.
'%'
:
' '
)
.
'</td>'
;
print
'<td align="right">'
.
price
(
$
amount
[
$key
]
)
.
'</td>'
;
print
'<td align="right">'
.
(
$catotal
>
0
?
price
(
100
/
$catotal
*
$
amount
[
$key
]
)
.
'%'
:
' '
)
.
'</td>'
;
print
"</tr>
\n
"
;
$i
++
;
}
...
...
This diff is collapsed.
Click to expand it.
htdocs/compta/stats/casoc.php
+
2
−
8
View file @
d1cbe354
...
...
@@ -39,14 +39,8 @@ $sortfield=isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"];
if
(
!
$sortorder
)
$sortorder
=
"desc"
;
if
(
!
$sortfield
)
$sortfield
=
"amount_ttc"
;
/*
* Scurit accs client
*/
if
(
$user
->
societe_id
>
0
)
{
$socidp
=
$user
->
societe_id
;
}
// Scurit accs client
if
(
$user
->
societe_id
>
0
)
$socidp
=
$user
->
societe_id
;
llxHeader
();
...
...
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