Commit 4c01a181 authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

Système de personnalisation du numéro financier (PFI)

parent 7f729541
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -346,6 +346,12 @@ class AdministrationController extends AbstractOscarController implements UsePro
                case OscarConfigurationService::pfi_strict:
                    $strict = $this->params()->fromPost(OscarConfigurationService::pfi_strict) == "on";
                    $regex = $this->params()->fromPost(OscarConfigurationService::pfi_strict_format);
                    $label = $this->params()->fromPost(OscarConfigurationService::financial_label);
                    //$description = $this->params()->fromPost(OscarConfigurationService::financial_description);

                    $this->getOscarConfigurationService()->setFinancialLabel($label);
                    //$this->getOscarConfigurationService()->setFinancialDescription($description);

                    if ($strict == true && !$regex) {
                        throw new OscarException(
                            "Vous ne pouvez pas appliquer le mode strict avec une expression régulière vide"
+1 −1
Original line number Diff line number Diff line
@@ -247,7 +247,7 @@ class DepenseController extends AbstractOscarController implements UseServiceCon

        try {
            if( !$activity->getCodeEOTP() ){
                throw new OscarException(sprintf(_("Cette activité n'a pas de PFI")));
                throw new OscarException(sprintf(_("Cette activité n'a pas de Numéro financier")));
            }
            //$spents = $this->getSpentService()->getGroupedSpentsDatas($activity->getCodeEOTP());
            $spents = $this->getSpentService()->getSpentsDatas($activity->getCodeEOTP());
+3 −3
Original line number Diff line number Diff line
@@ -1869,7 +1869,7 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif
            }

            if (count($pfis) == 0) {
                return $this->getResponseInternalError("Pas de PFI");
                return $this->getResponseInternalError("Pas de numéro financier");
            }

            $out = $this->baseJsonResponse();
@@ -2445,7 +2445,7 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif
                'adc' => 'Date de création',
                'adm' => 'Date de dernière mise à jour',
                'ads' => 'Date de signature',
                'adp' => 'Date d\'ouverture du PFI dans SIFAC',
                'adp' => 'Date d\'ouverture du numéro financier ('. $this->getOscarConfigurationService()->getFinancialLabel() .')',
                'pp' => 'Activités sans projet',
                'fdt' => 'Activités soumise à feuille de temps',
                'ds' => 'Ayant pour discipline',
@@ -2475,7 +2475,7 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif
                'dateEnd' => 'Date fin',
                'dateUpdated' => 'Date de mise à jour',
                'dateSigned' => 'Date de signature',
                'dateOpened' => "Date d'ouverture du PFI dans SIFAC",
                'dateOpened' => "Date d'ouverture du " . $this->getOscarConfigurationService()->getFinancialLabel()
            ];

            $milestonesCriterias = [
+5 −4
Original line number Diff line number Diff line
@@ -2258,6 +2258,7 @@ class Activity implements ResourceInterface
        $datas['acronym'] = htmlspecialchars($this->getAcronym());
        $datas['amount'] = $this->getAmount();
        $datas['pfi'] = $this->getCodeEOTP();
        $datas['financial-number'] = $this->getCodeEOTP();
        $datas['oscar'] = $this->getOscarNum();
        $datas['montant'] = number_format((double)$this->getAmount(), 2, ',', ' ') . $this->getCurrency()->getSymbol();
        $datas['annee-debut'] = $this->getDateStartStr('Y');
@@ -2401,8 +2402,8 @@ class Activity implements ResourceInterface
            'Acronyme' => $this->getAcronym(),
            'Projet' => $this->getProject() ? $this->getProject()->getLabel() : '',
            'Intitulé' => $this->getLabel(),
            'PFI' => $this->getCodeEOTP(),
            'Date du PFI' => $this->getDateOpened() ? $this->getDateOpened()->format($dateFormat) : '',
            'N°Financier' => $this->getCodeEOTP(),
            'Date du N°Financier' => $this->getDateOpened() ? $this->getDateOpened()->format($dateFormat) : '',
            'Montant' => number_format($this->getAmount(), 2, ',', ''), //.$this->getCurrency()->getSymbol(),
            'numéro SAIC' => $this->getCentaureNumConvention(),
            'numéro oscar' => $this->getOscarNum(),
@@ -2442,8 +2443,8 @@ class Activity implements ResourceInterface
            'Acronyme',
            'Projet',
            'Intitulé',
            'PFI',
            'Date du PFI',
            'N°Financier',
            'Date du N°Financier',
            'Montant',
            'numéro SAIC',
            'numéro oscar',
+1 −1
Original line number Diff line number Diff line
@@ -314,7 +314,7 @@ class ProjectGrantForm extends Form implements InputFilterProviderInterface, Use
        $this->add([
            'name' => 'dateOpened',
            'options' => [
                'label' => "Création du PFI"
                'label' => "Création du N°financier"
            ],
            'attributes' => [
                'class' => 'input-date form-control'
Loading