Skip to content
Snippets Groups Projects
Commit 7e8faed6 authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Fix #29565

parent cd045f3c
Branches
Tags
No related merge requests found
......@@ -28,7 +28,6 @@ class ContratService extends AbstractEntityService
use FichierServiceAwareTrait;
/**
* retourne la classe des entités
*
......@@ -87,7 +86,7 @@ class ContratService extends AbstractEntityService
*/
public function orderBy(QueryBuilder $qb = null, $alias = null)
{
list($qb, $alias) = $this->initQuery($qb, $alias);
[$qb, $alias] = $this->initQuery($qb, $alias);
$qb->addOrderBy("$alias.intervenant, $alias.typeContrat, $alias.numeroAvenant");
......@@ -107,7 +106,7 @@ class ContratService extends AbstractEntityService
*/
public function finderByValidation($validation, QueryBuilder $qb = null, $alias = null)
{
list($qb, $alias) = $this->initQuery($qb, $alias);
[$qb, $alias] = $this->initQuery($qb, $alias);
if ($validation instanceof \Application\Entity\Db\Validation) {
$qb
......@@ -173,7 +172,7 @@ class ContratService extends AbstractEntityService
foreach ($files as $file) {
$path = $file['tmp_name'];
$nomFichier = $file['name'];
$nomFichier = str_replace([',', ';', ':'], '', $file['name']);
$typeFichier = $file['type'];
$tailleFichier = $file['size'];
......
......@@ -126,6 +126,7 @@ class PieceJointeService extends AbstractEntityService
}
/**
* @param Intervenant $intervenant
*
......@@ -155,6 +156,7 @@ class PieceJointeService extends AbstractEntityService
}
/**
* @param Intervenant $intervenant
*
......@@ -194,8 +196,7 @@ class PieceJointeService extends AbstractEntityService
$pj = $pjf->getPieceJointe();
$pj->annee = $pjf->getAnnee();
//Gérer les cas où plusieurs PJ sont éligible mais sans date d'archive, on prend la première uniquement.
if(!array_key_exists($pj->getType()->getId(), $result))
{
if (!array_key_exists($pj->getType()->getId(), $result)) {
$result[$pj->getType()->getId()] = $pj;
}
}
......@@ -233,6 +234,8 @@ class PieceJointeService extends AbstractEntityService
return $validation;
}
public function archiver(PieceJointe $pj)
{
$annee = $this->getServiceContext()->getAnnee();
......@@ -241,7 +244,6 @@ class PieceJointeService extends AbstractEntityService
$this->getEntityManager()->flush();
return $pj;
}
......@@ -298,7 +300,7 @@ class PieceJointeService extends AbstractEntityService
foreach ($files as $file) {
$path = $file['tmp_name'];
$nomFichier = $file['name'];
$nomFichier = str_replace([',', ';', ':'], '', $file['name']);
$typeFichier = $file['type'];
$tailleFichier = $file['size'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment