Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
open-source
OSE
Commits
644b99d8
Commit
644b99d8
authored
Nov 17, 2021
by
Laurent Lécluse
Browse files
Possibilité pour OSE de fonctionner en ayant suprimé le paiement tardif
parent
5ea7c7fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
module/Application/src/Application/Form/Paiement/MiseEnPaiementForm.php
View file @
644b99d8
...
...
@@ -18,7 +18,6 @@ class MiseEnPaiementForm extends AbstractForm
use
PeriodeServiceAwareTrait
;
/**
*
*/
...
...
@@ -32,11 +31,11 @@ class MiseEnPaiementForm extends AbstractForm
$datesMiseEnPaiement
[
$periode
->
getId
()]
=
$periode
->
getDatePaiement
(
$annee
)
->
format
(
'd/m/Y'
);
}
$paiementTardif
=
$this
->
getServicePeriode
()
->
getPaiementTardif
();
$this
->
setAttribute
(
'method'
,
'post'
)
->
setAttribute
(
'class'
,
'paiement-mise-en-paiement-form'
)
->
setAttribute
(
'data-dates-mise-en-paiement'
,
json_encode
(
$datesMiseEnPaiement
))
->
setAttribute
(
'data-periode-paiement-tardif-id'
,
$this
->
getServicePeriode
()
->
getP
aiementTardif
()
->
getId
());
->
setAttribute
(
'data-periode-paiement-tardif-id'
,
(
$paiementTardif
?
$p
aiementTardif
->
getId
()
:
null
)
);
$defaultPeriode
=
$this
->
getServicePeriode
()
->
getPeriodePaiement
();
...
...
module/Application/src/Application/Service/PeriodeService.php
View file @
644b99d8
...
...
@@ -110,7 +110,7 @@ class PeriodeService extends AbstractEntityService
*/
public
function
finderByEnseignement
(
QueryBuilder
$qb
=
null
,
$alias
=
null
)
{
list
(
$qb
,
$alias
)
=
$this
->
initQuery
(
$qb
,
$alias
);
[
$qb
,
$alias
]
=
$this
->
initQuery
(
$qb
,
$alias
);
$qb
->
andWhere
(
"
$alias
.enseignement = 1"
);
return
$qb
;
...
...
@@ -122,7 +122,7 @@ class PeriodeService extends AbstractEntityService
{
$serviceMIS
=
$this
->
getServiceMiseEnPaiementIntervenantStructure
();
list
(
$qb
,
$alias
)
=
$this
->
initQuery
(
$qb
,
$alias
);
[
$qb
,
$alias
]
=
$this
->
initQuery
(
$qb
,
$alias
);
$this
->
join
(
$serviceMIS
,
$qb
,
'miseEnPaiementIntervenantStructure'
,
false
,
$alias
);
$serviceMIS
->
join
(
$this
->
getServiceMiseEnPaiement
(),
$qb
,
'miseEnPaiement'
);
...
...
@@ -146,7 +146,7 @@ class PeriodeService extends AbstractEntityService
*/
public
function
orderBy
(
QueryBuilder
$qb
=
null
,
$alias
=
null
)
{
list
(
$qb
,
$alias
)
=
$this
->
initQuery
(
$qb
,
$alias
);
[
$qb
,
$alias
]
=
$this
->
initQuery
(
$qb
,
$alias
);
$qb
->
orderBy
(
"
$alias
.ordre"
);
...
...
@@ -198,9 +198,9 @@ class PeriodeService extends AbstractEntityService
/**
* Retourne le paiement tardif
*
* @return Periode
* @return Periode
|null
*/
public
function
getPaiementTardif
()
public
function
getPaiementTardif
()
:
?Periode
{
return
$this
->
getRepo
()
->
findOneBy
([
'code'
=>
Periode
::
PAIEMENT_TARDIF
]);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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