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
489e4b18
Commit
489e4b18
authored
Mar 29, 2024
by
Kohinos Cooperatic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make recurrent payment existence control work
parent
a4fcb34f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
Payment.php
src/Entity/Payment.php
+7
-3
No files found.
src/Entity/Payment.php
View file @
489e4b18
...
...
@@ -202,11 +202,15 @@ class Payment extends BasePayment
$reason
=
"Attribut détails vide ou clés absentes."
;
return
null
;
}
$firstDayOf
c
reationMonth
=
DateTime
::
createFromFormat
(
'Y
Md'
,
substr
(
$this
->
details
,
0
,
6
)
.
"01"
$firstDayOf
C
reationMonth
=
DateTime
::
createFromFormat
(
'Y
md'
,
substr
(
$this
->
details
[
'vads_effective_creation_date'
]
,
0
,
6
)
.
"01"
);
if
(
!
$firstDayOfCreationMonth
)
{
$reason
=
"Error parsing vads_effective_creation_date : "
.
$this
->
details
[
'vads_effective_creation_date'
];
return
null
;
}
$day
=
$this
->
getRecurrenceMonthDay
()
?
$this
->
getRecurrenceMonthDay
()
-
1
:
0
;
//if not set assume first day of month (not a big deal anyway)
$dateOfFirstOccurenceAfterInitialPayment
=
$firstDayOf
c
reationMonth
->
modify
(
$dateOfFirstOccurenceAfterInitialPayment
=
$firstDayOf
C
reationMonth
->
modify
(
$day
.
" days next month"
);
...
...
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