Skip to content
Snippets Groups Projects
Commit 644b99d8 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Possibilité pour OSE de fonctionner en ayant suprimé le paiement tardif

parent 5ea7c7fc
No related branches found
No related tags found
No related merge requests found
......@@ -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()->getPaiementTardif()->getId());
->setAttribute('data-periode-paiement-tardif-id', ($paiementTardif ? $paiementTardif->getId() : null));
$defaultPeriode = $this->getServicePeriode()->getPeriodePaiement();
......
......@@ -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]);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment