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
dbb02cfc
Commit
dbb02cfc
authored
Oct 31, 2024
by
Yvon Kerdoncuff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
always send ccas mail to mlc_contact_email
parent
fe5e0cde
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletions
+14
-1
SendCcasTransactionsExportToPrestatairesCommand.php
...mmand/SendCcasTransactionsExportToPrestatairesCommand.php
+3
-1
GlobalParameterRepository.php
src/Repository/GlobalParameterRepository.php
+11
-0
No files found.
src/Command/SendCcasTransactionsExportToPrestatairesCommand.php
View file @
dbb02cfc
...
@@ -79,7 +79,9 @@ class SendCcasTransactionsExportToPrestatairesCommand extends Command
...
@@ -79,7 +79,9 @@ class SendCcasTransactionsExportToPrestatairesCommand extends Command
foreach
(
$users
as
$userTresorier
)
{
foreach
(
$users
as
$userTresorier
)
{
$copyTo
[]
=
$userTresorier
->
getEmail
();
$copyTo
[]
=
$userTresorier
->
getEmail
();
}
}
$copyTo
[]
=
$globalParamRepo
->
getMailOfGestionnaireDeGroupeOrDefaultContact
(
$p
);
foreach
(
$globalParamRepo
->
getMailOfGestionnaireDeGroupeAndDefaultContact
(
$p
)
as
$copyToEmail
)
{
$copyTo
[]
=
$copyToEmail
;
}
$mail
=
(
new
\Swift_Message
(
$subject
))
$mail
=
(
new
\Swift_Message
(
$subject
))
->
setFrom
(
$globalParamRepo
->
val
(
GlobalParameter
::
MLC_NOTIF_EMAIL
))
->
setFrom
(
$globalParamRepo
->
val
(
GlobalParameter
::
MLC_NOTIF_EMAIL
))
->
setTo
(
$p
->
getGestionnairesEmailsArray
())
->
setTo
(
$p
->
getGestionnairesEmailsArray
())
...
...
src/Repository/GlobalParameterRepository.php
View file @
dbb02cfc
...
@@ -59,4 +59,15 @@ class GlobalParameterRepository extends ServiceEntityRepository
...
@@ -59,4 +59,15 @@ class GlobalParameterRepository extends ServiceEntityRepository
return
$gestionnaires
->
first
()
->
getEmail
();
return
$gestionnaires
->
first
()
->
getEmail
();
}
}
}
}
public
function
getMailOfGestionnaireDeGroupeAndDefaultContact
(
$presta
)
{
$emails
=
[];
$emails
[]
=
$this
->
val
(
GlobalParameter
::
MLC_CONTACT_EMAIL
);
$gestionnaires
=
$presta
->
getGroupe
()
->
getGestionnaires
();
if
(
$gestionnaires
&&
!
$gestionnaires
->
isEmpty
()
&&
$gestionnaires
->
first
()
->
getEmail
())
{
$emails
[]
=
$gestionnaires
->
first
()
->
getEmail
();
}
return
$emails
;
}
}
}
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