Commit 8d848e98 authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

Merge branch 'dev/ripley-laminas-php8' into 'ripley-laminas-php8'

Fix erreur de parametre vide lorsque on veut télécharger un fichier xls ou pdf + feuille de synthèse

See merge request !10
parents 54a768f8 d635a42c
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1036,7 +1036,7 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif
        }

        if ($ids) {
            $ids = explode(',', $ids);
            $ids = array_filter( explode(',', $ids) );
            $result = $this->getEntityManager()->createQueryBuilder()->select('a')
                ->from(Activity::class, 'a')
                ->where('a.id IN(:ids)')
@@ -1180,7 +1180,7 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif
            }
        }

        $ids = explode(',', $paramID);
        $ids = array_filter( explode(',', $paramID) );

        $payments = $this->getProjectGrantService()->getPaymentsByActivityId(
            $ids,
+10 −10
Original line number Diff line number Diff line
@@ -260,12 +260,12 @@ class TimesheetActivityPeriodFormatter
        $colorAbsBG = 'faefea';
        $colorOtherBG = 'f8faea';

        $wpWidth = count($datas['wps']);
        $ceWidth = count($datas['ces']);
        $educationWidth = count($datas['othersGroups']['education']);
        $absWidth = count($datas['othersGroups']['abs']);
        $otherWidth = count($datas['othersGroups']['other']);
        $researchWidth = count($datas['othersGroups']['research']);
        $wpWidth = count($datas['wps'] ?? []);
        $ceWidth = count($datas['ces'] ?? []);
        $educationWidth = count($datas['othersGroups']['education'] ?? []);
        $absWidth = count($datas['othersGroups']['abs'] ?? []);
        $otherWidth = count($datas['othersGroups']['other'] ?? []);
        $researchWidth = count($datas['othersGroups']['research'] ?? []);

        $fullWidth = $wpWidth + $ceWidth + $educationWidth + $absWidth + $otherWidth + $researchWidth + 5;

@@ -610,21 +610,21 @@ class TimesheetActivityPeriodFormatter
            foreach ($datas['othersGroups']['education'] as $r) {
                $this->drawCell($r['label'], 0, true, 'headEducation');
            }
            if( count($datas['othersGroups']['education']) > 1 ){
            if( isset( $datas['othersGroups']['education'] ) && count($datas['othersGroups']['education']) > 1 ){
                $this->drawCell("Total Enseignement", 0, true, 'headEducation');
            }

            foreach ($datas['othersGroups']['abs'] as $r) {
                $this->drawCell($r['label'], 0, true, 'headAbs');
            }
            if( count($datas['othersGroups']['abs']) > 1 ){
            if( isset( $datas['othersGroups']['abs'] ) && count($datas['othersGroups']['abs']) > 1 ){
                $this->drawCell("Total absent", 0, true, 'headAbs');
            }

            foreach ($datas['othersGroups']['other'] as $r) {
                $this->drawCell($r['label'], 0, true, 'headOther');
            }
            if( count($datas['othersGroups']['other']) > 1 ){
            if( isset( $datas['othersGroups']['other'] ) && count($datas['othersGroups']['other']) > 1 ){
                $this->drawCell("Total autre", 0, true, 'headOther');
            }

+2 −2
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ class ExportDatas implements UseOscarConfigurationService, UseProjectGrantServic
        }

        if ($paramID) {
            $ids = explode(',', $paramID);
            $ids = array_filter( explode(',', $paramID) );
            $qb->andWhere('a.id IN (:ids)');
            $parameters['ids'] = $ids;
        }