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
f08e1296
Commit
f08e1296
authored
Aug 12, 2024
by
Yvon Kerdoncuff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix 1 month shift in computation of last recurring payment occurence
parent
4a6deb62
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
+6
-1
Payment.php
src/Entity/Payment.php
+6
-1
No files found.
src/Entity/Payment.php
View file @
f08e1296
...
@@ -216,7 +216,12 @@ class Payment extends BasePayment
...
@@ -216,7 +216,12 @@ class Payment extends BasePayment
$paymentEndDate
=
$this
->
getRecurrenceMonthsCount
()
?
$paymentEndDate
=
$this
->
getRecurrenceMonthsCount
()
?
$dateOfFirstOccurenceAfterInitialPayment
->
modify
(
$dateOfFirstOccurenceAfterInitialPayment
->
modify
(
"+"
.
(
$this
->
getRecurrenceMonthsCount
()
-
1
)
.
" months"
//minus one because initial payment is not considered by payzen as the first occurence
/* why minus 2 ?
* Imagine adherent selected 2 occurences on d/m/Y, then
* paymentEndDate should be d/m+1/Y,
* which is already $dateOfFirstOccurenceAfterInitialPayment
*/
"+"
.
(
$this
->
getRecurrenceMonthsCount
()
-
2
)
.
" months"
)
)
:
null
;
//assume no end date if recurrenceMonthsCount not set
:
null
;
//assume no end date if recurrenceMonthsCount not set
...
...
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