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
6a72ef72
Commit
6a72ef72
authored
Jun 13, 2024
by
Yvon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
send mail to tresorier as well
parent
f201d4ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
SendCcasTransactionsExportToPrestatairesCommand.php
...mmand/SendCcasTransactionsExportToPrestatairesCommand.php
+10
-1
No files found.
src/Command/SendCcasTransactionsExportToPrestatairesCommand.php
View file @
6a72ef72
...
...
@@ -7,6 +7,7 @@ namespace App\Command;
use
App\Entity\Flux
;
use
App\Entity\GlobalParameter
;
use
App\Entity\Prestataire
;
use
App\Entity\User
;
use
App\Utils\CustomEntityManager
;
use
App\Utils\OperationUtils
;
use
IntlDateFormatter
;
...
...
@@ -71,10 +72,18 @@ class SendCcasTransactionsExportToPrestatairesCommand extends Command
$this
->
io
->
text
(
'Envoi du mail pour le prestataire '
.
$p
->
getRaison
());
$subject
=
"Expérimentation de Sécurité Sociale de l’Alimentation en Gironde – Facture CCAS
$monthYearStr
"
;
$globalParamRepo
=
$this
->
em
->
getRepository
(
GlobalParameter
::
class
);
//Send to prestataire
//Send copy to tresoriers + gestionnaire de groupe (or default contact if linked gestionnaire de groupe does not exists)
$copyTo
=
array
();
$users
=
$this
->
em
->
getRepository
(
User
::
class
)
->
findByRole
(
'ROLE_TRESORIER'
);
foreach
(
$users
as
$userTresorier
)
{
$copyTo
[]
=
$userTresorier
->
getEmail
();
}
$copyTo
[]
=
$globalParamRepo
->
getMailOfGestionnaireDeGroupeOrDefaultContact
(
$p
);
$mail
=
(
new
\Swift_Message
(
$subject
))
->
setFrom
(
$globalParamRepo
->
val
(
GlobalParameter
::
MLC_NOTIF_EMAIL
))
->
setTo
(
$p
->
getGestionnairesEmailsArray
())
->
setCc
(
$
globalParamRepo
->
getMailOfGestionnaireDeGroupeOrDefaultContact
(
$p
)
)
->
setCc
(
$
copyTo
)
->
setBody
(
$this
->
templating
->
render
(
'@kohinos/email/tav/ccas_transactions.html.twig'
,
...
...
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