<?php

namespace Modules\Facture;

use Modules\Facture\Controller\ExportFactureController;
use Modules\Facture\Controller\FactureEventController;
use Modules\Facture\Controller\WorkflowController;
use Skeleton\Router;
use Skeleton\Module;
use Skeleton\Renderer\RendererInterface;
use Psr\Container\ContainerInterface;
use Helpers\Parametres\Parametres;
use Modules\Facture\Controller\AjaxFactureController;
use Modules\Facture\Controller\ArchivageFactureController;
use Modules\Facture\Controller\CreationFactureController;
use Modules\Facture\Controller\DocumentsRattachesController;
use Modules\Facture\Controller\PiecesJointesController;
use Modules\Facture\Controller\GestionFactureController;
use Modules\Facture\Controller\PopupFactureController;
use Modules\Facture\Controller\ReglementFactureController;
use Modules\Facture\Controller\ImpressionGlobaleFactureController;
use Modules\Facture\Controller\CutOfStandardFactureController;
use Modules\Facture\Controller\ModificationFactureController;
use Modules\Facture\Controller\ImpressionFactureController;
use Modules\Facture\Controller\FactureImporterController;
use Modules\Facture\Controller\FactureArchiveController;
use Modules\Facture\Controller\ZedocController;
use Modules\Facture\Controller\ListesFactureController;
use Modules\Facture\Controller\EditionEtatCcaController;
use Modules\Facture\Controller\IndicateurFactureController;
use Modules\Facture\Controller\VideocodageController;
use Modules\Facture\Controller\EtatCommandeController;
use Modules\Facture\Controller\FacturesPortailController;
use Modules\Facture\Controller\ExportMasseController;
use Modules\Facture\Controller\ExportMasseViaExcelController;
use Modules\Facture\Controller\FactureController;
use Modules\Facture\Controller\GestionFactureDematController;

class FactureModule extends Module
{

    const DEFINITIONS = __DIR__ . '/config.php';

    public function __construct(ContainerInterface $container)
    {
        // TODO : clean up
        $container->get(RendererInterface::class)->addPath('Facture', __DIR__ . '/views');
        $container->get(RendererInterface::class)->addPath('facture', __DIR__ . '/views/creation-facture');
        $container->get(RendererInterface::class)->addPath('modification-facture', __DIR__ . '/views/modification-facture');
        $container->get(RendererInterface::class)->addPath('gestion-facture', __DIR__ . '/views/gestion-facture');
        $container->get(RendererInterface::class)->addPath('ajax-facture', __DIR__ . '/views/ajax-facture');
        $container->get(RendererInterface::class)->addPath('popup-facture', __DIR__ . '/views/popup-facture');
        $container->get(RendererInterface::class)->addPath('reglement-facture', __DIR__ . '/views/reglement-facture');
        $container->get(RendererInterface::class)->addPath('archivage-facture', __DIR__ . '/views/archivage-facture');
        $container->get(RendererInterface::class)->addPath('impression-globale-facture', __DIR__ . '/views/impression-globale-facture');
        $container->get(RendererInterface::class)->addPath('cut-of-standard-facture', __DIR__ . '/views/cut-of-standard-facture');
        $container->get(RendererInterface::class)->addPath('lad', __DIR__ . '/views/lad');
        $container->get(RendererInterface::class)->addPath('impression', __DIR__ . '/views/impression');
        $container->get(RendererInterface::class)->addPath('Acquisition-des-Factures', __DIR__ . '/views/Acquisition-des-Factures');
        $container->get(RendererInterface::class)->addPath('Acquisition-des-Factures-popup', __DIR__ . '/views/Acquisition-des-Factures/popup');
        $container->get(RendererInterface::class)->addPath('listes-facture', __DIR__ . '/views/listes-facture');
        $container->get(RendererInterface::class)->addPath('edition-etat-cca-facture', __DIR__ . '/views/edition-etat-cca-facture');
        $container->get(RendererInterface::class)->addPath('etatCommande', __DIR__ . '/views/etatCommande');
        $container->get(RendererInterface::class)->addPath('factures-portail', __DIR__ . '/views/factures-portail');
        $container->get(RendererInterface::class)->addPath('mailFactures', __DIR__ . '/views/mail');
        $container->get(RendererInterface::class)->addPath('exportMasse', __DIR__ . '/views/ExportMasse');

        $container->get(RendererInterface::class)->addPath('Facture', __DIR__ . '/views');

        $router = $container->get(Router::class);

        $parametres     = new Parametres();
        $global         = $parametres->expression_global;
        $alpha          = $parametres->expression_alpha;
        $alpha_min      = $parametres->expression_point_tiret_underscore;
        $alpha_maj      = $parametres->expression_alpha_maj;
        $decimal        = $parametres->expression_decimal;
        $numFact        = $parametres->id_facture;
        $ficFacture     = $parametres->expression_point_tiret_underscore;
        $societe        = $parametres->id_societe;
        $fourniss       = $parametres->id_fournisseur;
        $commande       = $parametres->id_commande;
        $reglement      = $parametres->id_reglement;
        $cdeCreation    = $parametres->expression_global; // numéro de commande ou 'all'
        $idPdf          = $parametres->expression_point_tiret_underscore;
        $codeEvent      = $parametres->expression_point_tiret_underscore;
        $bool        = $parametres->expression_bool;
        $base_url = $container->get('baseUrl') . $container->get('Facture.prefix');


        // Controller GestionFacture
        $router->get($base_url . '/gestion-facture', GestionFactureController::class, 'Facture.GestionFacture.index');
        $router->get($base_url . '/detail/{numFact:' . $numFact . '+}', GestionFactureController::class, 'Facture.GestionFacture.detail');
        $router->get($base_url . '/editionImage[/{numFact:' . $numFact . '+}]', GestionFactureController::class, 'Facture.GestionFacture.editionImage');
        $router->get($base_url . '/impressionFacture/{numFact:' . $numFact . '+}/{codeSte:' . $societe . '+}', GestionFactureController::class, 'Facture.GestionFacture.impressionFacture');
        $router->get($base_url . '/commande-de-regularisation/{numFact:' . $numFact . '+}/{codeSte:' . $societe . '+}/{codeFour:' . $fourniss . '+}', GestionFactureController::class, 'Facture.GestionFacture.commandeDeRegularisation');
        $router->get($base_url . '/incidentsMail/{numFact:' . $numFact . '+}', GestionFactureController::class, 'Facture.GestionFacture.incidentsMail');
        $router->get($base_url . '/suivi-evenements/{numFact:' . $numFact . '+}[/{MODULE:' . $global . '+}]', GestionFactureController::class, 'Facture.GestionFacture.suivi');
        $router->get($base_url . '/signataires-attendus/{numFact:' . $numFact . '+}', GestionFactureController::class, 'Facture.GestionFacture.popupListSignatPending');
        $router->get($base_url . '/imageFacture/{numFact:' . $numFact . '+}', GestionFactureController::class, 'Facture.GestionFacture.imageFacture');
        $router->get($base_url . '/{numFact:' . $numFact . '+}/form-refus', GestionFactureController::class, 'Facture.GestionFacture.formRefus');
        $router->get($base_url . '/{numFact:' . $numFact . '+}/refus', GestionFactureController::class, 'Facture.GestionFacture.refus');

        $router->get($base_url . '/export-factures/{type:' . $alpha . '+}', ExportFactureController::class, 'Facture.GestionFacture.exportAll');
        $router->get($base_url . '/popupExport/{type:' . $alpha . '+}', ExportFactureController::class, 'Facture.GestionFacture.popupExport');
        $router->get($base_url . '/Export/{type:' . $alpha . '+}', ExportFactureController::class, 'Facture.GestionFacture.export');



        $router->get($base_url . '/indicateurFacture', IndicateurFactureController::class, 'IndicateurFacture.IndicateurFacture.index');


        // Controller CreationFacture
        $router->get($base_url . '/nouvelle-facture', CreationFactureController::class, 'Facture.CreationFacture.nouvelleFacture');
        $router->get($base_url . '/nouvelle-facture/creationaffectation/{action:' . $alpha_min . '+}', CreationFactureController::class, 'Facture.CreationFacture.creationAffectation');
        $router->get($base_url . '/nouvelle-facture/choix-commande/{action:' . $alpha_min . '+}/{numFact:' . $numFact . '+}/{fournisseur:' . $fourniss . '+}/{societe:' . $societe . '+}/{numCde:' . $cdeCreation . '+}[/{acompte:'.$bool.'}]', CreationFactureController::class, 'Facture.CreationFacture.choixCommande');
        $router->get($base_url . '/nouvelle-facture/choix-avoir/{action:' . $alpha_min . '+}/{numFact:' . $numFact . '+}/{fournisseur:' . $fourniss . '+}/{societe:' . $societe . '+}/{numCde:' . $cdeCreation . '+}', CreationFactureController::class, 'Facture.CreationFacture.choixAvoir');
        $router->get($base_url . '/nouvelle-facture/choix-affectation-lad/{action:' . $alpha_min . '+}/{numFact:' . $numFact . '+}/{fournisseur:' . $fourniss . '+}/{societe:' . $societe . '+}/{numCde:' . $cdeCreation . '+}', CreationFactureController::class, 'Facture.CreationFacture.choixAffectationLad');
        $router->get($base_url . '/nouvelle-facture/affectation/{action:' . $alpha_min . '+}/{numFact:' . $numFact . '+}/{fournisseur:' . $fourniss . '+}/{societe:' . $societe . '+}/{numCde:' . $cdeCreation . '+}/{typeListeAffichee:' . $alpha . '+}/{choixLad:' . $decimal . '+}[/{nonAffichageChoixCommande:' . $decimal . '+}/{articlesSansCommande:' . $decimal . '}]', CreationFactureController::class, 'Facture.CreationFacture.affectation');
        $router->get($base_url . '/nouvelle-facture/wsdlAffectation/{action:' . $alpha_min . '+}/{numFact:' . $numFact . '+}/{fournisseur:' . $fourniss . '+}/{societe:' . $societe . '+}/{numCde:' . $cdeCreation . '+}/{typeListeAffichee:' . $alpha . '+}/{choixLad:' . $decimal . '+}[/{nonAffichageChoixCommande:' . $decimal . '+}/{articlesSansCommande: ' . $decimal . '}]', CreationFactureController::class, 'Facture.CreationFacture.wsdlAffectation');
        $router->get($base_url . '/nouvelle-facture/transitionAffectation/{action:' . $alpha_min . '+}/{numFact:' . $numFact . '+}/{fournisseur:' . $fourniss . '+}/{societe:' . $societe . '+}/{numCde:' . $cdeCreation . '+}/{typeListeAffichee:' . $alpha . '+}/{choixLad:' . $decimal . '+}[/{nonAffichageChoixCommande:' . $decimal . '+}]', CreationFactureController::class, 'Facture.CreationFacture.transitionAffectation');
        $router->get($base_url . '/nouvelle-facture/choix-avoir/table-choix-commande/{action:' . $alpha_min . '+}/{numFact:' . $numFact . '+}/{fournisseur:' . $fourniss . '+}/{societe:' . $societe . '+}/{numCde:' . $cdeCreation . '+}', CreationFactureController::class, 'Facture.CreationFacture.tableChoixCommande');
        $router->get($base_url . '/nouvelle-facture/choix-avoir/table-choix-facture/{action:' . $alpha_min . '+}/{numFact:' . $numFact . '+}/{fournisseur:' . $fourniss . '+}/{societe:' . $societe . '+}/{numCde:' . $cdeCreation . '+}', CreationFactureController::class, 'Facture.CreationFacture.tableChoixFacture');
        
        $router->get($base_url . '/nouvelle-facture/enregistrerAffectation/{numFact:' . $numFact . '+}/{societe:' . $societe . '+}', CreationFactureController::class, 'Facture.CreationFacture.enregistrerAffectation');
        $router->get($base_url . '/nouvelle-facture/verifApresEnregistrementFacture/{numFact:' . $numFact . '+}', CreationFactureController::class, 'Facture.CreationFacture.verifApresEnregistrementFacture');
        $router->get($base_url . '/nouvelle-facture/validationViaAffectation/{numFact:' . $numFact . '+}', CreationFactureController::class, 'Facture.CreationFacture.validationViaAffectation');
        $router->get($base_url . '/nouvelle-facture/mail-acheteur/{numCde:' . $commande . '+}/{dest:' . $alpha_maj . '+}/{numFact:' . $numFact . '+}/{fournisseur:' . $fourniss . '+}/{societe:' . $societe . '+}/{page:' . $alpha . '+}/{action:' . $alpha . '+}', CreationFactureController::class, 'Facture.CreationFacture.mailAcheteurDemandeur');
        $router->get($base_url . '/nouvelle-facture/validationFacture/{numFact:' . $numFact . '+}', CreationFactureController::class, 'Facture.CreationFacture.validationFacture');
        $router->get($base_url . '/nouvelle-facture/choixSignataireFacture/{numFact:' . $numFact . '+}[/{mode:' . $alpha . '+}]', CreationFactureController::class, 'Facture.CreationFacture.choixSignataireFacture');
        $router->get($base_url . '/nouvelle-facture/confirmationValidationFacture/{numFact:' . $numFact . '+}[/{mode:' . $alpha . '+}]', CreationFactureController::class, 'Facture.CreationFacture.confirmationValidationFacture');
        $router->get($base_url . '/nouvelle-facture/confirmationAsyncValidationFacture/{numFact:' . $numFact . '+}[/{mode:' . $alpha . '+}]', CreationFactureController::class, 'Facture.CreationFacture.confirmationAsyncValidationFacture');
        $router->get($base_url . '/nouvelle-facture/suppressionAffectation/{numFact:' . $numFact . '+}', CreationFactureController::class, 'Facture.CreationFacture.supprimerAffectation');
        $router->get($base_url . '/nouvelle-facture/suppressionAffectationEnCours/{numFact:' . $numFact . '+}', CreationFactureController::class, 'Facture.CreationFacture.suppressionAffectationEnCours');


        // Controller ModificationFacture
        $router->get($base_url . '/modification-facture/{numFact:' . $numFact . '+}', ModificationFactureController::class, 'Facture.ModificationFacture.modificationFacture');
        $router->get($base_url . '/modification-facture/creationaffectation/{action:' . $alpha_min . '+}', ModificationFactureController::class, 'Facture.ModificationFacture.creationAffectation');


        // Controller ReglementFacture
        $router->get($base_url . '/reglement-facture', ReglementFactureController::class, 'Facture.ReglementFacture.reglement');
        $router->get($base_url . '/reglement/{numFact:' . $numFact . '+}', ReglementFactureController::class, 'Facture.ReglementFacture.reglementFacture');
        $router->get($base_url . '/deviseReglement', ReglementFactureController::class, 'Facture.ReglementFacture.deviseReglement');
        $router->get($base_url . '/verificationMontantReglement', ReglementFactureController::class, 'Facture.ReglementFacture.verificationMontantReglement');
        $router->get($base_url . '/ajout-reglement/{numFact:' . $numFact . '+}[/{confirmationCreation:' . $decimal . '+}]', ReglementFactureController::class, 'Facture.ReglementFacture.ajoutReglement');
        $router->get($base_url . '/modifier-reglement/{numFact:' . $numFact . '+}/{numReg:' . $reglement . '+}', ReglementFactureController::class, 'Facture.ReglementFacture.modifierReglement');
        $router->get($base_url . '/supprimer-reglement/{numFact:' . $numFact . '+}/{numReg:' . $reglement . '+}', ReglementFactureController::class, 'Facture.ReglementFacture.supprimerReglement');
        $router->get($base_url . '/export-reglements-facture', ReglementFactureController::class, 'Facture.ReglementFacture.exportReglements');


        // Controller ArchivageFacture
        $router->get($base_url . '/archivage-facture', ArchivageFactureController::class, 'Facture.ArchivageFactureController.archivage');


        // Controller DocumentsRattaches
        $router->get($base_url . '/documents-rattaches-facture/{numFact:' . $numFact . '+}', DocumentsRattachesController::class, 'Facture.DocumentsRattaches.docRattache');


        // Controller PiecesJointes
        $router->get($base_url . '/pieces-jointes-facture/{numFact:' . $numFact . '+}', PiecesJointesController::class, 'Facture.PiecesJointes.piecesJointes');
        $router->get($base_url . '/creation-pieces-jointes-facture/{numFact:' . $numFact . '+}', PiecesJointesController::class, 'Facture.PiecesJointes.creationPiecesJointes');
        $router->get($base_url . '/modification-pieces-jointes-facture/{numFact:' . $numFact . '+}', PiecesJointesController::class, 'Facture.PiecesJointes.modificationPiecesJointes');
        $router->get($base_url . '/suppression-pieces-jointes-facture/{numFact:' . $numFact . '+}', PiecesJointesController::class, 'Facture.PiecesJointes.suppressionPiecesJointes');


        // Controller ImpressionGlobaleFacture
        $router->get($base_url . '/impression-globale-facture', ImpressionGlobaleFactureController::class, 'Facture.ImpressionGlobaleFactureController.impressionGlobale');
        $router->get($base_url . '/pdf-impression-globale-facture', ImpressionGlobaleFactureController::class, 'Facture.ImpressionGlobaleFactureController.pdfImpressionGlobale');
        $router->get($base_url . '/download-facture/{idPdf:' . $idPdf . '+}', ImpressionGlobaleFactureController::class, 'Facture.ImpressionGlobaleFactureController.downloadFacture');


        // Controller CutOfStandardFacture
        $router->get($base_url . '/cut-of-standard-facture', CutOfStandardFactureController::class, 'Facture.CutOfStandardFactureController.cutOfStandard');
        $router->get($base_url . '/pdf-cut-of-standard-facture', CutOfStandardFactureController::class, 'Facture.CutOfStandardFactureController.pdfCutOfStandard');
        $router->get($base_url . '/export-cut-of-standard-facture', CutOfStandardFactureController::class, 'Facture.CutOfStandardFactureController.exportCutOfStandard');


        // Impression entete/ligne facture
        $router->get($base_url . '/impressionEntete', ImpressionFactureController::class, 'Facture.ImpressionFacture.impressionEntete');
        $router->get($base_url . '/pdf-entete-facture', ImpressionFactureController::class, 'Facture.ImpressionFactureController.pdfEnteteFacture');
        $router->get($base_url . '/impressionLigne', ImpressionFactureController::class, 'Facture.ImpressionFacture.impressionLigne');
        $router->get($base_url . '/pdf-ligne-facture', ImpressionFactureController::class, 'Facture.ImpressionFactureController.pdfLigneFacture');
        $router->get($base_url . '/{factureId:' . $numFact . '+}/impression', ImpressionFactureController::class, 'Facture.ImpressionFactureController.impressionEntity');


        // Controller EditionEtatCca
        $router->get($base_url . '/edition-etat-cca', EditionEtatCcaController::class, 'Facture.EditionEtatCcaController.editionEtatCca');
        $router->get($base_url . '/pdf-etat-cca', EditionEtatCcaController::class, 'Facture.EditionEtatCcaController.pdfEtatCca');
        $router->get($base_url . '/export-etat-cca', EditionEtatCcaController::class, 'Facture.EditionEtatCcaController.exportEtatCca');


        // Controller ListesFacture
        $router->get($base_url . '/liste-entete-facture', ListesFactureController::class, 'Facture.ListesFactureController.listeEntete');
        $router->get($base_url . '/liste-ligne-facture', ListesFactureController::class, 'Facture.ListesFactureController.listeLigne');

        $router->get($base_url . '/liste-evenements-facture', FactureEventController::class, 'Facture.Event.listeEvenements');
        $router->get($base_url . '/liste-evenements-facture/detail', FactureEventController::class, 'Facture.Event.detailFacEvent');
        $router->get($base_url . '/liste-evenements-facture/export', FactureEventController::class, 'Facture.Event.export');
        $router->get($base_url . '/liste-globale-evenements-facture', FactureEventController::class, 'Facture.Event.listeGlobaleEvenements');
        $router->get($base_url . '/liste-globale-evenements-facture/export[/{numFact:' . $numFact . '+}]', FactureEventController::class, 'Facture.Event.exportEventGlob');
        
        // Facture
        $router->get($base_url . '/{numFact:' . $numFact . '+}/form-annuler', FactureController::class, 'Facture.Facture.formAnnuler');
        $router->get($base_url . '/{numFact:' . $numFact . '+}/annuler', FactureController::class, 'Facture.Facture.annuler');

        // Controller AjaxFacutre
        $router->get($base_url . '/ajax-facture/calcul-date-periode', AjaxFactureController::class, 'Facture.ajax.calculDatePeriode');
        $router->get($base_url . '/ajax-facture/verifQteLigne', AjaxFactureController::class, 'Facture.ajax.verifQteLigne');
        $router->get($base_url . '/ajax-facture/verifPuRemiseLigne', AjaxFactureController::class, 'Facture.ajax.verifPuRemiseLigne');
        $router->get($base_url . '/ajax-facture/verifHTLigne', AjaxFactureController::class, 'Facture.ajax.verifHTLigne');
        $router->get($base_url . '/ajax-facture/verifTVALigne', AjaxFactureController::class, 'Facture.ajax.verifTVALigne');
        $router->get($base_url . '/ajax-facture/detail-choix-des-commandes', AjaxFactureController::class, 'Facture.ajax.detailChoixDesCommandes');
        $router->get($base_url . '/{numFact:' . $numFact . '+}/ajax/detail-ligne-facture', AjaxFactureController::class, 'Facture.ajax.ligneFacture');
        $router->get($base_url . '/ajax-facture/setCG', AjaxFactureController::class, 'Facture.ajax.setCG');
        $router->get($base_url . '/ajax-facture/getLONGCP', AjaxFactureController::class, 'Facture.ajax.getLONGCP');
        $router->get($base_url . '/ajax-facture/detail-ligne-affectation', AjaxFactureController::class, 'Facture.ajax.ligneAffectation');
        $router->get($base_url . '/ajax-facture/validerEclatement', AjaxFactureController::class, 'Facture.ajax.validerEclatement');
        $router->get($base_url . '/ajax-facture/validationMail', AjaxFactureController::class, 'Facture.ajax.validationMail');
        $router->get($base_url . '/ajax-facture/detail-ligne-visualisation/{numFact:' . $numFact . '+}/{ligne:' . $decimal . '+}', AjaxFactureController::class, 'Facture.ajax.ligneDetail');
        $router->get($base_url . '/ajax-facture/detail-ligne-liste-entete', AjaxFactureController::class, 'Facture.ajax.ligneListeEntete');
        $router->get($base_url . '/ajax-facture/detail-ligne-liste-ligne', AjaxFactureController::class, 'Facture.ajax.ligneListeLigne');
        $router->get($base_url . '/ajax-facture/specifiqueClient61', AjaxFactureController::class, 'Facture.ajax.specifiqueClient61');
        $router->get($base_url . '/ajax-facture/changeSousFamille', AjaxFactureController::class, 'Facture.ajax.changeSousFamille');
        $router->get($base_url . '/ajax-facture/changeArticle', AjaxFactureController::class, 'Facture.ajax.changeArticle');
        $router->get($base_url . '/ajax-facture/changeArticleSiCdcSca', AjaxFactureController::class, 'Facture.ajax.changeArticleSiCdcSca');
        $router->get($base_url . '/ajax-facture/changeTypeTva', AjaxFactureController::class, 'Facture.ajax.changeTypeTva');
        $router->get($base_url . '/ajax-facture/ajaxInsertValue', AjaxFactureController::class, 'Facture.ajax.ajaxInsertValue');
        $router->get($base_url . '/ajax-facture/calcultotal/{numFact:' . $numFact . '+}', AjaxFactureController::class, 'Facture.ajax.calculTotal');
        $router->get($base_url . '/ajax-facture/ajaxModificationGroupe/{numFact:' . $numFact . '+}', AjaxFactureController::class, 'Facture.ajax.ajaxModificationGroupe');
        //Controller Facture a changer
        $router->get($base_url . '/facture/facture-entete-fournisseur', AjaxFactureController::class, 'Facture.ajax.factureEnteteFournisseur');
        $router->get($base_url . '/facture/facture-mode-num', AjaxFactureController::class, 'Facture.ajax.factureModeNum');
        $router->get($base_url . '/facture/facture-entete-num-commande', AjaxFactureController::class, 'Facture.ajax.factureEnteteNumCde');
        $router->get($base_url . '/facture/devise', AjaxFactureController::class, 'Facture.ajax.devise');

        // Controller PopupFacture
        $router->get($base_url . '/popup/bloc-note/{numFact:' . $numFact . '+}', PopupFactureController::class, 'Facture.popup.blocNote');
        $router->get($base_url . '/popup/modifier-date-echeance/{numFact:' . $numFact . '+}', PopupFactureController::class, 'Facture.popup.modifierDateEcheance');
        $router->get($base_url . '/popup/upload-changer-image-facture/{numFact:' . $numFact . '+}', PopupFactureController::class, 'Facture.popup.uploadImageFacture');
        $router->get($base_url . '/popup/ajoutDocRattPJCreation', PopupFactureController::class, 'Facture.popup.ajoutDocRattPJCreation');
        $router->get($base_url . '/popup/interrogationAjoutCdeDeRegul', PopupFactureController::class, 'Facture.popup.interrogationAjoutCdeDeRegul');
        $router->get($base_url . '/popup/confirmationAjoutCdeDeRegul/{numCde:' . $commande . '+}', PopupFactureController::class, 'Facture.popup.confirmationAjoutCdeDeRegul');
        $router->get($base_url . '/popup/confirmation', PopupFactureController::class, 'Facture.popup.confirmation');
        $router->get($base_url . '/popup/erreurAjoutCdeDeRegul', PopupFactureController::class, 'Facture.popup.erreurAjoutCdeDeRegul');
        $router->get($base_url . '/popup/interrogation', PopupFactureController::class, 'Facture.popup.interrogation');
        $router->get($base_url . '/popup/interrogationPreaffectationMail', PopupFactureController::class, 'Facture.popup.interrogationPreaffectationMail');
        $router->get($base_url . '/popup/retourPreaffectationMail', PopupFactureController::class, 'Facture.popup.retourPreaffectationMail');
        $router->get($base_url . '/popup/gestionNonFacturable', PopupFactureController::class, 'Facture.popup.gestionNonFacturable');
        $router->get($base_url . '/popup/interrogationValidationFacture', PopupFactureController::class, 'Facture.popup.interrogationValidationFacture');
        $router->get($base_url . '/popup/choixValidationFacture/{numFact:' . $numFact . '+}/{fournisseur:' . $fourniss . '+}[/{mode:' . $alpha . '+}]', PopupFactureController::class, 'Facture.popup.choixValidationFacture');
        $router->get($base_url . '/popup/ajoutEvenement/{numFact:' . $numFact . '+}', PopupFactureController::class, 'Facture.popup.ajoutEvenementFacture');
        $router->get($base_url . '/popup/modificationEvenement/{numFact:' . $numFact . '+}/{numEvent:' . $codeEvent . '+}', PopupFactureController::class, 'Facture.popup.modificationEvenementFacture');
        $router->get($base_url . '/popup/suppressionEvenement/{numFact:' . $numFact . '+}/{numEvent:' . $codeEvent . '+}', PopupFactureController::class, 'Facture.popup.suppresionEvenementFacture');
        $router->get($base_url . '/popup/supprimer/{numFact:' . $numFact . '+}/{page:' . $decimal . '+}', PopupFactureController::class, 'Facture.popup.supprimerFacture');
        $router->get($base_url . '/popup/commandesNonFacturables', PopupFactureController::class, 'Facture.popup.commandesNonFacturables');
        $router->get($base_url . '/popup/calculPourcentage', PopupFactureController::class, 'Facture.popup.calculPourcentage');
        $router->get($base_url . '/popup/differenceCondPaie/{numFact:' . $numFact . '+}/{action:' . $alpha_min . '+}', PopupFactureController::class, 'Facture.popup.differenceCondPaie');

        //// LAD
        // Controller ZEDOC
        $router->get($base_url . '/zedoc', ZedocController::class, 'Facture.Zedoc.zedoc');
        $router->get($base_url . '/zedoc/lad/facture', ZedocController::class, 'Facture.Zedoc.affichagPDFLAD');
        $router->get($base_url . '/videocodage', VideocodageController::class, 'Facture.videocodage.index');

        $router->get($base_url . '/listRejected', ZedocController::class, 'Facture.Zedoc.listRejected');
        $router->get($base_url . '/affichagPDFJRejected', ZedocController::class, 'Facture.Zedoc.affichagPDFJRejected');
        $router->get($base_url . '/ajax/actionRejected/{action:' . $alpha_min . '+}[/{secto:' . $numFact . '+}]', ZedocController::class, 'Facture.Zedoc.ajaxActionRejected');

        
        
        
        // ACQUISTION FACTURE // FACTURE IMPORTER
        $router->get($base_url . '/facture-a-importer', FactureImporterController::class, 'Facture.FactureImporter.listeFactureImport');
        $router->get($base_url . '/facture-archivage', FactureImporterController::class, 'Facture.FactureImporter.archiver');
        $router->get($base_url . '/facture-annuler-transfert', FactureImporterController::class, 'Facture.FactureImporter.annulerTransfert');
        $router->get($base_url . '/alertePdfNotFound', FactureImporterController::class, 'Facture.FactureImporter.alertePdfNotFound');
        $router->get($base_url . '/export-facture-importer', FactureImporterController::class, 'Facture.FactureImporter.exportFactureImport');


        // ACQUISTION FACTURE // FACTURE ARCHIVE
        $router->get($base_url . '/facture-liste-archive[/{tab:' . $alpha_min . '+}]', FactureArchiveController::class, 'Facture.FactureArchive.listeFactureArchive');
        $router->get($base_url . '/facture-annulerArchivage', FactureArchiveController::class, 'Facture.FactureArchive.annulerArchivage');
        $router->get($base_url . '/export-facture-archive', FactureArchiveController::class, 'Facture.FactureArchive.exportFactureArchive');

        // POPUP ACQUISITION FACTURE
        $router->get($base_url . '/popup/popup-up-transfert-facture', FactureImporterController::class, 'Facture.FactureImporter.transfertFacture');

        $router->get($base_url . '/etat/{numFact:' . $numFact . '+}', EtatCommandeController::class, 'Facture.EtatCommande.etat');

        // Factures issues du Portail
        $router->get($base_url . '/factures-portail', FacturesPortailController::class, 'Facture.FacturesPortail.suiviFacturesPortail');
        $router->get($base_url . '/factures-portail/detail-facture', FacturesPortailController::class, 'Facture.FacturesPortail.detailFacture');

        // Export de factures en masse
        $router->get($base_url . '/exportMasse', ExportMasseController::class, 'Facture.ExportMasse.exportMasse');
        $router->get($base_url . '/exportMasse/validationExport', ExportMasseController::class, 'Facture.ExportMasse.validationExport');
        $router->get($base_url . '/exportMasseViaExcel', ExportMasseViaExcelController::class, 'Facture.ExportMasseViaExcel.import');
        $router->get($base_url . '/exportMasseViaExcel/validationExport', ExportMasseViaExcelController::class, 'Facture.ExportMasseViaExcel.ajaxImport');
        
        // BBA Test Flexi
        $router->get($base_url . '/zedocBBA', ZedocController::class, 'Facture.Zedoc.zedocBBA');

        // BonAPayer - workflow
        $router->get($base_url.'/{factureId:'.$numFact.'+}/workflow', WorkflowController::class, 'Facture.Workflow.summary');
        $router->get($base_url.'/{factureId:'.$numFact.'+}/workflow/{workflowId:'.$global.'+}', WorkflowController::class, 'Facture.Workflow.detail');

        // Facture démat
        $router->get($base_url.'/facture-demat', GestionFactureDematController::class, 'Facture.Demat.index');
        $router->get($base_url.'/facture-demat/export', GestionFactureDematController::class, 'Facture.Demat.export');
        $router->get($base_url.'/facture-demat/{id:[0-9]+}/form-resolve', GestionFactureDematController::class, 'Facture.Demat.formResolve');
        $router->get($base_url.'/facture-demat/{id:[0-9]+}/resolve', GestionFactureDematController::class, 'Facture.Demat.resolve');
        $router->get($base_url.'/facture-demat/{id:[0-9]+}/visual', GestionFactureDematController::class, 'Facture.Demat.visual');
        $router->get($base_url.'/facture-demat/{id:[0-9]+}/popupErrorValidation', GestionFactureDematController::class, 'Facture.Demat.popupErrorValidation');
        $router->get($base_url.'/facture-demat/{id:[0-9]+}/form-refus', GestionFactureDematController::class, 'Facture.Demat.formRefus');
        $router->get($base_url.'/facture-demat/{id:[0-9]+}/refus', GestionFactureDematController::class, 'Facture.Demat.refus');
        // DEBUG BATCH
        $router->get($base_url.'/facture-demat/batch', GestionFactureDematController::class, 'Facture.Demat.batch');
        $router->get($base_url.'/facture-demat/batch-status', GestionFactureDematController::class, 'Facture.Demat.batchStatus');
    }
}
