Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kohinos-tav
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
agplv3
kohinos-tav
Commits
d71ca3ea
Commit
d71ca3ea
authored
Oct 09, 2022
by
Julien Jorry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix SolidoumeCommand bug : if someone has not been yet taken
parent
015f5263
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
SolidoumeCommand.php
src/Command/SolidoumeCommand.php
+8
-2
No files found.
src/Command/SolidoumeCommand.php
View file @
d71ca3ea
...
...
@@ -296,9 +296,14 @@ class SolidoumeCommand extends Command
foreach
(
$items
as
$item
)
{
if
(
$this
->
isItemPayedThisMonth
(
$item
))
{
$datas
=
$this
->
em
->
getRepository
(
Flux
::
class
)
->
getQueryByAdherentAndDestinataire
(
$item
->
getAdherent
(),
$this
->
em
->
getRepository
(
Prestataire
::
class
)
->
getPrestataireSolidoume
(),
'adherent_prestataire'
);
if
(
count
(
$datas
)
>
0
)
{
$lastPrelevement
=
$datas
[
0
];
$lastPrelevement
=
null
;
foreach
(
$datas
as
$data
)
{
if
(
$data
->
getCreatedAt
()
->
format
(
'd'
)
<=
$this
->
param
->
getExecutionDate
())
{
$lastPrelevement
=
$data
;
}
}
if
(
$lastPrelevement
==
null
&&
count
(
$datas
)
>
0
)
{
$lastPrelevement
=
$datas
[
0
];
$total
+=
$lastPrelevement
->
getMontant
();
if
(
!
$item
->
getIsDonation
())
{
++
$countParticipants
;
...
...
@@ -306,6 +311,7 @@ class SolidoumeCommand extends Command
++
$countPerson
;
}
}
}
$totalByParticipant
=
round
(((
$total
/
$countParticipants
)
*
((
100
-
$this
->
param
->
getCommission
())
/
100
)),
2
,
PHP_ROUND_HALF_DOWN
);
$this
->
io
->
success
(
'Total de eMLC récolté : '
.
$total
.
' !'
);
$this
->
io
->
success
(
'Nombre de personnes : '
.
$countPerson
.
' !'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment