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
8dd2a2a4
Commit
8dd2a2a4
authored
May 03, 2024
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ccas: mark refund transaction as ccas if base transaction is ccas
parent
5ec6fb59
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
17 deletions
+24
-17
UserController.php
src/Controller/UserController.php
+5
-0
Transaction.php
src/Entity/Transaction.php
+19
-0
TransactionAdherentPrestataire.php
src/Entity/TransactionAdherentPrestataire.php
+0
-17
No files found.
src/Controller/UserController.php
View file @
8dd2a2a4
...
@@ -294,6 +294,11 @@ class UserController extends AbstractController
...
@@ -294,6 +294,11 @@ class UserController extends AbstractController
$flux
->
setMontant
(
$montant
);
$flux
->
setMontant
(
$montant
);
$flux
->
setMoyen
(
MoyenEnum
::
MOYEN_EMLC
);
$flux
->
setMoyen
(
MoyenEnum
::
MOYEN_EMLC
);
// The flux to cancel a ccas flux is also marked as ccas
if
(
$this
->
getParameter
(
'ccas_mode'
))
{
$flux
->
setIsCcas
(
$transactionAdherentPrestataire
->
getIsCcas
());
}
$now
=
(
new
\Datetime
(
'now'
))
->
format
(
'd/m/Y H:i:s'
);
$now
=
(
new
\Datetime
(
'now'
))
->
format
(
'd/m/Y H:i:s'
);
$flux
->
setReference
(
$flux
->
setReference
(
'Remboursement en Monnaie Solidaire du '
.
$now
.
' annule '
.
$transactionAdherentPrestataire
->
getReference
()
'Remboursement en Monnaie Solidaire du '
.
$now
.
' annule '
.
$transactionAdherentPrestataire
->
getReference
()
...
...
src/Entity/Transaction.php
View file @
8dd2a2a4
...
@@ -31,6 +31,13 @@ class Transaction extends Flux
...
@@ -31,6 +31,13 @@ class Transaction extends Flux
const
TYPE_TRANSACTION_PRESTATAIRE_ADHERENT
=
'prestataire_adherent'
;
const
TYPE_TRANSACTION_PRESTATAIRE_ADHERENT
=
'prestataire_adherent'
;
const
TYPE_TRANSACTION_PRESTATAIRE_PRESTATAIRE
=
'prestataire_prestataire'
;
const
TYPE_TRANSACTION_PRESTATAIRE_PRESTATAIRE
=
'prestataire_prestataire'
;
/**
* A transaction is marked as CCAS if both parties are CCAS complient.
*
* @ORM\Column(type="boolean", options={"default": false})
*/
protected
$isCcas
=
false
;
public
static
function
getAvailableTypes
()
:
array
public
static
function
getAvailableTypes
()
:
array
{
{
return
[
return
[
...
@@ -84,4 +91,16 @@ class Transaction extends Flux
...
@@ -84,4 +91,16 @@ class Transaction extends Flux
{
{
return
[];
return
[];
}
}
public
function
getIsCcas
()
:
?
bool
{
return
$this
->
isCcas
;
}
public
function
setIsCcas
(
bool
$isCcas
)
:
self
{
$this
->
isCcas
=
$isCcas
;
return
$this
;
}
}
}
src/Entity/TransactionAdherentPrestataire.php
View file @
8dd2a2a4
...
@@ -38,11 +38,6 @@ class TransactionAdherentPrestataire extends Transaction
...
@@ -38,11 +38,6 @@ class TransactionAdherentPrestataire extends Transaction
protected
$cancellerFlux
;
protected
$cancellerFlux
;
/**
/**
* @ORM\Column(type="boolean", options={"default": false})
*/
private
$isCcas
=
false
;
/**
* @return string
* @return string
*/
*/
public
function
getType
()
:
string
public
function
getType
()
:
string
...
@@ -60,16 +55,4 @@ class TransactionAdherentPrestataire extends Transaction
...
@@ -60,16 +55,4 @@ class TransactionAdherentPrestataire extends Transaction
public
function
setCancellerFlux
(
$var
)
{
$this
->
cancellerFlux
=
$var
;}
public
function
setCancellerFlux
(
$var
)
{
$this
->
cancellerFlux
=
$var
;}
public
function
getCancellerFlux
()
{
return
$this
->
cancellerFlux
;}
public
function
getCancellerFlux
()
{
return
$this
->
cancellerFlux
;}
public
function
getIsCcas
()
:
?
bool
{
return
$this
->
isCcas
;
}
public
function
setIsCcas
(
bool
$isCcas
)
:
self
{
$this
->
isCcas
=
$isCcas
;
return
$this
;
}
}
}
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