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
753c7df0
Commit
753c7df0
authored
Apr 10, 2024
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix error at tav household based cotisation, when cotis amount equals allowance amount
parent
fa7afb7c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
TAVCotisationUtils.php
src/Utils/TAVCotisationUtils.php
+7
-3
No files found.
src/Utils/TAVCotisationUtils.php
View file @
753c7df0
...
...
@@ -162,6 +162,7 @@ class TAVCotisationUtils
/**
* Method called to create Flux based on allowance amount (for household based allowance).
* Only create flux if amount paid != allowance amount.
*/
public
function
applyHouseholdAllowance
(
Flux
$flux
)
{
// get allowance
...
...
@@ -171,15 +172,17 @@ class TAVCotisationUtils
// get the mlc amount the user is supposed to receive
$mlcAllowanceAmount
=
$adherent
->
getAllocationAmount
();
// get the difference between what the user paid and what he•she's supposed to receive
$amountDiff
=
$mlcAllowanceAmount
-
$cotisationAmount
;
// only create new flux if there is a difference
if
(
$amountDiff
!=
0
)
{
if
(
$flux
->
getExpediteur
()
instanceof
Siege
)
{
$siege
=
$flux
->
getExpediteur
();
}
else
{
$siege
=
$flux
->
getExpediteur
()
->
getGroupe
()
->
getSiege
();
}
// get the difference between what the user paid and what he•she's supposed to receive
$amountDiff
=
$mlcAllowanceAmount
-
$cotisationAmount
;
if
(
$amountDiff
>
0
)
{
// User should receive more than he•she paid: send a new flux to the user to complete its cotisation
$fluxCotis
=
new
CotisationTavReversement
();
...
...
@@ -202,6 +205,7 @@ class TAVCotisationUtils
$this
->
em
->
persist
(
$fluxCotis
);
$this
->
operationUtils
->
executeOperations
(
$fluxCotis
);
}
}
/**
* Method called to create Flux based on allowance amount (for household based allowance).
...
...
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