<?php

namespace Modules\DemandeAchat;

use Modules\DemandeAchat\Controller\ConversionTypeDemandeAchatController;
use Modules\DemandeAchat\Controller\ModificationGroupeeLignesDemandeAchatController;
use Modules\DemandeAchat\Controller\ModificationPrixLigneDemandeAchatController;
use Modules\DemandeAchat\Controller\WorkflowController;
use Skeleton\Router;
use Skeleton\Module;
use Psr\Container\ContainerInterface;
use Skeleton\Renderer\RendererInterface;
use Helpers\Parametres\Parametres;
use Modules\DemandeAchat\Controller\IndexController;
use Modules\DemandeAchat\Controller\GestionDemandeAchatController;
use Modules\DemandeAchat\Controller\CreationDemandeAchatController;
use Modules\DemandeAchat\Controller\ModificationDemandeAchatController;
use Modules\DemandeAchat\Controller\ModificationLigneDemandeAchatController;
use Modules\DemandeAchat\Controller\ModificationClauseDemandeAchatController;
use Modules\DemandeAchat\Controller\AjaxModificationDemandeAchatController;
use Modules\DemandeAchat\Controller\ArticleDemandeAchatController;
use Modules\DemandeAchat\Controller\DemandeAchatController;
use Modules\DemandeAchat\Controller\ClauseController;
use Modules\DemandeAchat\Controller\PieceJointeController;
use Modules\DemandeAchat\Controller\SuiviDemandeAchatController;
use Modules\DemandeAchat\Controller\ImpressionGlobaleDemandeAchatController;
use Modules\DemandeAchat\Controller\ModificationTypeDocDemandeAchatController;
use Modules\DemandeAchat\Controller\SuppressionDemandeAchatController;
use Modules\DemandeAchat\Controller\ValidationDemandeAchatController;
use Modules\DemandeAchat\Controller\DevalidationDemandeAchatController;
use Modules\DemandeAchat\Controller\PopupCommentaireDemandeAchatController;
use Modules\DemandeAchat\Controller\SolderDemandeAchatController;
use Modules\DemandeAchat\Controller\ListeDemandeAchatController;
use Modules\DemandeAchat\Controller\EditionDemandeAchatController;

class DemandeAchatModule extends Module
{

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

    public function __construct(ContainerInterface $container)
    {
        $container->get(RendererInterface::class)->addPath('DemandeAchat', __DIR__ . '/views');

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

        $parametres = new Parametres();
        $global = $parametres->expression_global;
        $expression_underscore = $parametres->expression_underscore;
        $expression_alpha_min = $parametres->expression_alpha_min;
        $demandeAchat = $parametres->id_demandeAchat;
        $commande   = $parametres->id_commande;
        $num = $parametres->expression_decimal;
        $base_url = $container->get('baseUrl') . $container->get('DemandeAchat.prefix');

        /** ****************** **/
        /** Menu intermediaire **/
        /** ****************** **/
        $router->get($base_url . '/menuIntermediaire', IndexController::class, 'DemandeAchat.Index.menuIntermediaireDemandeAchat');
        $router->get($base_url . '/menuIntermediaire/signature', IndexController::class, 'DemandeAchat.Index.menuIntermediaireSignature');
        $router->get($base_url . '/menuIntermediaire/impression', IndexController::class, 'DemandeAchat.Index.menuIntermediaireImpression');
        $router->get($base_url . '/menuIntermediaire/liste', IndexController::class, 'DemandeAchat.Index.menuIntermediaireListe');
        $router->get($base_url . '/menuIntermediaire/edition', IndexController::class, 'DemandeAchat.Index.menuIntermediaireEdition');



        /** ********************* **/
        /** Gestion Demande Achat **/
        /** ********************* **/
        $router->get($base_url . '/index[/{onglet:' . $global . '+}]', GestionDemandeAchatController::class, 'DemandeAchat.GestionDemandeAchat.index');
        $router->get($base_url . '/detailEntet/{idDA:' . $demandeAchat . '+}', GestionDemandeAchatController::class, 'DemandeAchat.GestionDemandeAchat.detailEntet');
        $router->get($base_url . '/detailEntet/detailLigne/{idDA:' . $demandeAchat . '+}/{idLigne:' . $demandeAchat . '+}', GestionDemandeAchatController::class, 'DemandeAchat.GestionDemandeAchat.detailLigne');
       
        
        $router->get($base_url . '/popupPlanning/{da:' . $demandeAchat . '+}/{line:' . $demandeAchat . '+}', GestionDemandeAchatController::class, 'DemandeAchat.GestionDemandeAchat.popupPlanning');

        /** Export **/
        $router->get($base_url . '/popupExport/DemandeAchat[/{origin:' . $global . '+}]', GestionDemandeAchatController::class, 'DemandeAchat.GestionDemandeAchat.popupExport');
        $router->get($base_url . '/export/DemandeAchat[/{origin:' . $global . '+}]', GestionDemandeAchatController::class, 'DemandeAchat.GestionDemandeAchat.exportDemandeAchat');

        /** Commentaire **/
        $router->get($base_url . '/commentaire/{idDA:' . $demandeAchat . '+}', PopupCommentaireDemandeAchatController::class, 'DemandeAchat.PopupCommentaireDemandeAchat.commentaire');

        /** Solder **/
        $router->get($base_url . '/gestionSolde/{idDA:' . $demandeAchat . '+}/{typeSolde:' . $expression_alpha_min . '+}', SolderDemandeAchatController::class, 'DemandeAchat.SolderDemandeAchat.solder');
        $router->get($base_url . '/confirmationSolde/{idDA:' . $demandeAchat . '+}/{typeSolde:' . $expression_alpha_min . '+}', SolderDemandeAchatController::class, 'DemandeAchat.SolderDemandeAchat.confirmationSolder');

        /** Suivi DA **/
        $router->get($base_url . '/demandeAchat/{idDA:' . $demandeAchat . '+}/suivi[/{MODULE:' . $global . '+}]', SuiviDemandeAchatController::class, 'DemandeAchat.SuiviDemandeAchat.suivi');
        $router->get($base_url . '/popup-demandeAchat/{idDA:' . $demandeAchat . '+}/AjoutEvenement', SuiviDemandeAchatController::class, 'DemandeAchat.SuiviDemandeAchat.ajoutEvenementDemandeAchat');
        $router->get($base_url . '/ajax-demandeAchat/{idDA:' . $demandeAchat . '+}/{numOrdre:' . $num . '+}/suppresion', SuiviDemandeAchatController::class, 'DemandeAchat.SuiviDemandeAchat.suppressionEventDemandeAchat');
        $router->get($base_url . '/demandeAchat/{idDA:' . $demandeAchat . '+}/{numOrdre:' . $num . '+}/modification', SuiviDemandeAchatController::class, 'DemandeAchat.SuiviDemandeAchat.modificationtEvenementDemandeAchat');

        /** Impression DA**/
        $router->get($base_url . '/demandeAchat/{idDA:' . $demandeAchat . '+}/impression/{typeImpression:' . $expression_alpha_min . '+}', ImpressionGlobaleDemandeAchatController::class, 'DemandeAchat.ImpressionGlobaleDemandeAchatController.impressionDemandeAchat');

        /** Modification Type Doc **/
        $router->get($base_url . '/demandeAchat/{idDA:' . $demandeAchat . '+}/modificationTypeDoc', ModificationTypeDocDemandeAchatController::class, 'DemandeAchat.ModificationTypeDocDemandeAchat.modificationTypeDoc');
        $router->get($base_url . '/demandeAchat/{idDA:' . $demandeAchat . '+}/confirmationChgtTypeDoc', ModificationTypeDocDemandeAchatController::class, 'DemandeAchat.ModificationTypeDocDemandeAchat.confirmationChgtTypeDoc');
        $router->get($base_url . '/demandeAchat/{idDA:' . $demandeAchat . '+}/validationTypeDoc', ModificationTypeDocDemandeAchatController::class, 'DemandeAchat.ModificationTypeDocDemandeAchat.validationTypeDoc');

        /** Suppression DA**/
        $router->get($base_url . '/demandeAchat/{idDA:' . $demandeAchat . '+}/suppression', SuppressionDemandeAchatController::class, 'DemandeAchat.SuppressionDemandeAchat.supprimer');

        /** Validation DA**/
        $router->get($base_url . '/demandeAchat/{idDA:' . $demandeAchat . '+}/validation', ValidationDemandeAchatController::class, 'DemandeAchat.ValidationDemandeAchat.valider');
        $router->get($base_url . '/demandeAchat/{idDA:' . $demandeAchat . '+}/ajaxConfirmationValidationV2', ValidationDemandeAchatController::class, 'DemandeAchat.ValidationDemandeAchat.ajaxConfirmationValidationV2');
        $router->get($base_url . '/demandeAchat/{idDA:' . $demandeAchat . '+}/ajaxConfirmValidate', ValidationDemandeAchatController::class, 'DemandeAchat.ValidationDemandeAchat.ajaxConfirmValidate');

        /** Dévalidation DA**/
        $router->get($base_url . '/demandeAchat/{idDA:' . $demandeAchat . '+}/devalidation', DevalidationDemandeAchatController::class, 'DemandeAchat.DevalidationDemandeAchat.devalider');

        /** Convertir en DA Chiffrage DA**/
        $router->get($base_url . '/demandeAchat/{idDA:' . $demandeAchat . '+}/conversionType', ConversionTypeDemandeAchatController::class, 'DemandeAchat.ConversionTypeDemandeAchat.conversionType');

        /** Modification groupée de lignes **/
        $router->get($base_url . '/modificationGroupeeLignes/index/{type:' . $expression_underscore . '+}/{mode:' . $global . '+}/{idDA:' . $demandeAchat . '+}/{MODULE:' . $global . '+}[/{SOUSMODULE:' . $global . '+}]', ModificationGroupeeLignesDemandeAchatController::class, 'DemandeAchat.ModifierGroupeeLigneDemandeAchat.modificationGroupeeLignes');
        $router->get($base_url . '/modificationGroupeeLignes/validationGroupee/{type:' . $expression_underscore . '+}/{mode:' . $global . '+}/{idDA:' . $demandeAchat . '+}/{MODULE:' . $global . '+}[/{SOUSMODULE:' . $global . '+}]', ModificationGroupeeLignesDemandeAchatController::class, 'DemandeAchat.ModifierGroupeeLigneDemandeAchat.validationGroupee');
        $router->get($base_url . '/modification/ligne/editMassImputation/{idDa:' . $demandeAchat . '+}', ModificationDemandeAchatController::class, 'DemandeAchat.ModificationDemandeAchat.editMassImputation');
        $router->get($base_url . '/modification/ligne/ajaxEditMassImputation/{idDa:' . $demandeAchat . '+}', ModificationDemandeAchatController::class, 'DemandeAchat.ModificationDemandeAchat.ajaxEditMassImputation');
        $router->get($base_url . '/modification/ligne/editPrixLigne/{idDa:' . $demandeAchat . '+}', ModificationDemandeAchatController::class, 'DemandeAchat.ModificationDemandeAchat.editPrixLigne');
        $router->get($base_url . '/modification/ligne/ajaxEditPrixLigne/{idDa:' . $demandeAchat . '+}', ModificationDemandeAchatController::class, 'DemandeAchat.ModificationDemandeAchat.ajaxEditPrixLigne');
        $router->get($base_url . '/modificationGroupeeLignes/getLibelleImput', ModificationGroupeeLignesDemandeAchatController::class, 'DemandeAchat.ModifierGroupeeLigneDemandeAchat.getLibelleImput');
        $router->get($base_url . '/modificationGroupeeLignes/popupConfirmationDateLivraison', ModificationGroupeeLignesDemandeAchatController::class, 'DemandeAchat.ModifierGroupeeLigneDemandeAchat.popupConfirmationDateLivraison');

        /** Modification Prix lignes **/
        $router->get($base_url . '/modificationPrixLignes/index/{mode:' . $global . '+}/{idDA:' . $demandeAchat . '+}/{MODULE:' . $global . '+}', ModificationPrixLigneDemandeAchatController::class, 'DemandeAchat.ModificationPrixLigneDemandeAchat.modificationPrixLignes');
        $router->get($base_url . '/modificationPrixLignes/validation/{mode:' . $global . '+}/{idDA:' . $demandeAchat . '+}/{MODULE:' . $global . '+}', ModificationPrixLigneDemandeAchatController::class, 'DemandeAchat.ModificationPrixLigneDemandeAchat.validation');
        $router->get($base_url . '/getMontantLigne', ModificationPrixLigneDemandeAchatController::class, 'DemandeAchat.ModificationPrixLigneDemandeAchat.getMontantLigne');

        /** *********************** **/
        /** Création - Modification **/
        /** *********************** **/
        /** Création **/
        $router->get($base_url . '/creation/entete', CreationDemandeAchatController::class, 'DemandeAchat.CreationDemandeAchat.creation');
        $router->get($base_url . '/creation/entete/validation', CreationDemandeAchatController::class, 'DemandeAchat.CreationDemandeAchat.validation');
        $router->get($base_url . '/creation/entete/transport', CreationDemandeAchatController::class, 'DemandeAchat.CreationDemandeAchat.transport');
        $router->get($base_url . '/creation/entete/changeCompany', CreationDemandeAchatController::class, 'DemandeAchat.CreationDemandeAchat.changeCompany');

        /** Modification **/
        $router->get($base_url . '/modification/ligne/index/{idDA:' . $demandeAchat . '+}/{mode:' . $global . '+}/{onglet:' . $global . '+}', ModificationDemandeAchatController::class, 'DemandeAchat.ModificationDemandeAchat.index');
        $router->get($base_url . '/modification/ligne/validation/{idDA:' . $demandeAchat . '+}', ModificationDemandeAchatController::class, 'DemandeAchat.ModificationDemandeAchat.validationDetail');
        $router->get($base_url . '/modification/ligne/validationAsync/{idDA:' . $demandeAchat . '+}', ModificationDemandeAchatController::class, 'DemandeAchat.ModificationDemandeAchat.validationDAAsync');
        $router->get($base_url . '/modification/fournisseur/ajaxEditFrameworkAgreement', ModificationDemandeAchatController::class, 'DemandeAchat.ModificationDemandeAchat.ajaxEditFrameworkAgreement');
        $router->get($base_url . '/modification/fournisseur/ajaxEditSupplier', ModificationDemandeAchatController::class, 'DemandeAchat.ModificationDemandeAchat.ajaxEditSupplier');
        $router->get($base_url . '/modification/livraison/ajaxEditDelivery', ModificationDemandeAchatController::class, 'DemandeAchat.ModificationDemandeAchat.ajaxEditDelivery');
        $router->get($base_url . '/modification/details/ajaxEditRequestor', ModificationDemandeAchatController::class, 'DemandeAchat.ModificationDemandeAchat.ajaxEditRequestor');
        $router->get($base_url . '/modification/details/ajaxValueContactFrs', ModificationDemandeAchatController::class, 'DemandeAchat.ModificationDemandeAchat.ajaxValueContactFrs');
        $router->get($base_url . '/modification/details/ajaxValueAdresseFrs', ModificationDemandeAchatController::class, 'DemandeAchat.ModificationDemandeAchat.ajaxValueAdresseFrs');
        $router->get($base_url . '/modification/details/ajaxValueContactCentre', ModificationDemandeAchatController::class, 'DemandeAchat.ModificationDemandeAchat.ajaxValueContactCentre');
        $router->get($base_url . '/modification/details/ajaxValueAdresseLiv', ModificationDemandeAchatController::class, 'DemandeAchat.ModificationDemandeAchat.ajaxValueAdresseLiv');

        // $router->get($base_url. '/modification/ligne/ajaxLigne',  AjaxModificationDemandeAchatController::class, 'DemandeAchat.AjaxModificationDemandeAchat.ajaxAjoutLigneDA');
        $router->get($base_url . '/modification/ligne/ajaxLangue', AjaxModificationDemandeAchatController::class, 'DemandeAchat.AjaxModificationDemandeAchat.ajaxLangue');
        $router->get($base_url . '/modification/ligne/popupRecalculPUDevise', AjaxModificationDemandeAchatController::class, 'DemandeAchat.AjaxModificationDemandeAchat.popupRecalculPUDevise');
        $router->get($base_url . '/modification/ligne/ajaxRecalculPUDevise', AjaxModificationDemandeAchatController::class, 'DemandeAchat.AjaxModificationDemandeAchat.ajaxRecalculPUDevise');
        $router->get($base_url . '/modification/ligne/ajaxArticlesDetail', AjaxModificationDemandeAchatController::class, 'DemandeAchat.AjaxModificationDemandeAchat.ajaxArticlesDetail');
        $router->get($base_url . '/modification/ligne/ajaxAccordCadre', AjaxModificationDemandeAchatController::class, 'DemandeAchat.AjaxModificationDemandeAchat.ajaxAccordCadre');
        $router->get($base_url . '/modification/ligne/ajaxFournisseur', AjaxModificationDemandeAchatController::class, 'DemandeAchat.AjaxModificationDemandeAchat.ajaxFournisseur');
        $router->get($base_url . '/modification/ligne/ajaxSectionImputation', AjaxModificationDemandeAchatController::class, 'DemandeAchat.AjaxModificationDemandeAchat.ajaxSectionImputation');
        $router->get($base_url . '/modification/ligne/ajaxCentreLivraison', AjaxModificationDemandeAchatController::class, 'DemandeAchat.AjaxModificationDemandeAchat.ajaxCentreLivraison');

        $router->get($base_url . '/modification/ajaxValueAdresseFournisseur', AjaxModificationDemandeAchatController::class, 'DemandeAchat.AjaxModificationDemandeAchat.ajaxValueAdresseFournisseur');
        $router->get($base_url . '/modification/ajaxValueContactFournisseur', AjaxModificationDemandeAchatController::class, 'DemandeAchat.AjaxModificationDemandeAchat.ajaxValueContactFournisseur');
        $router->get($base_url . '/modification/ajaxValueAdresseLivraison', AjaxModificationDemandeAchatController::class, 'DemandeAchat.AjaxModificationDemandeAchat.ajaxValueAdresseLivraison');
        $router->get($base_url . '/modification/ajaxValueContactLivraison', AjaxModificationDemandeAchatController::class, 'DemandeAchat.AjaxModificationDemandeAchat.ajaxValueContactLivraison');

        /* LIGNE : Création - Modification - Suppression */
        $router->get($base_url . '/creation/ajaxLigne/{idDA:' . $demandeAchat . '+}', ModificationLigneDemandeAchatController::class, 'DemandeAchat.ModificationLigneDemandeAchat.ajaxAjoutLigne');
        $router->get($base_url . '/validation/ligne/{idDA:' . $demandeAchat . '+}', ModificationLigneDemandeAchatController::class, 'DemandeAchat.ModificationLigneDemandeAchat.validationLigne');
        $router->get($base_url . '/annulation/ligne/{idDA:' . $demandeAchat . '+}', ModificationLigneDemandeAchatController::class, 'DemandeAchat.ModificationLigneDemandeAchat.annulationLigne');
        $router->get($base_url . '/modification/ligne/editLine/{idDA:' . $demandeAchat . '+}', ModificationLigneDemandeAchatController::class, 'DemandeAchat.ModificationLigneDemandeAchat.ajaxModificationLigne');
        $router->get($base_url . '/modification/ligne/editLine/indexation/{idDA:' . $demandeAchat . '+}', ModificationLigneDemandeAchatController::class, 'DemandeAchat.ModificationLigneDemandeAchat.ajaxModificationOrdre');
        $router->get($base_url . '/modification/ligne/ajaxEditLineItem', ModificationLigneDemandeAchatController::class, 'DemandeAchat.ModificationLigneDemandeAchat.ajaxEditLineItem');
        $router->get($base_url . '/modification/ligne/ajaxEditLineFrameworkAgreement', ModificationLigneDemandeAchatController::class, 'DemandeAchat.ModificationLigneDemandeAchat.ajaxEditLineFrameworkAgreement');
        $router->get($base_url . '/modification/ligne/ajaxEditLineSupplier', ModificationLigneDemandeAchatController::class, 'DemandeAchat.ModificationLigneDemandeAchat.ajaxEditLineSupplier');
        $router->get($base_url . '/modification/ligne/ajaxEditLineQuantity', ModificationLigneDemandeAchatController::class, 'DemandeAchat.ModificationLigneDemandeAchat.ajaxEditLineQuantity');
        $router->get($base_url . '/modification/ligne/ajaxEditLineUnit', ModificationLigneDemandeAchatController::class, 'DemandeAchat.ModificationLigneDemandeAchat.ajaxEditLineUnit');
        $router->get($base_url . '/modification/ligne/ajaxEditLinePrice', ModificationLigneDemandeAchatController::class, 'DemandeAchat.ModificationLigneDemandeAchat.ajaxEditLinePrice');
        $router->get($base_url . '/modification/ligne/ajaxEditLineSupplierItem', ModificationLigneDemandeAchatController::class, 'DemandeAchat.ModificationLigneDemandeAchat.ajaxEditLineSupplierItem');
        $router->get($base_url . '/modification/ligne/ajaxEditLineCodeComp', ModificationLigneDemandeAchatController::class, 'DemandeAchat.ModificationLigneDemandeAchat.ajaxEditLineCodeComp');
        $router->get($base_url . '/modification/ligne/ajaxEditLineSectImp', ModificationLigneDemandeAchatController::class, 'DemandeAchat.ModificationLigneDemandeAchat.ajaxEditLineSectImp');
        $router->get($base_url . '/modification/ligne/ajaxEditLineSsCptAna', ModificationLigneDemandeAchatController::class, 'DemandeAchat.ModificationLigneDemandeAchat.ajaxEditLineSsCptAna');
        $router->get($base_url . '/modification/ligne/ajaxEditLineSsFam', ModificationLigneDemandeAchatController::class, 'DemandeAchat.ModificationLigneDemandeAchat.ajaxEditLineSsFam');
        $router->get($base_url . '/modification/ligne/ajaxGeneratePlanning', ModificationLigneDemandeAchatController::class, 'DemandeAchat.ModificationLigneDemandeAchat.ajaxGeneratePlanning');
        $router->get($base_url . '/modification/ligne/suppressionLigne', ModificationLigneDemandeAchatController::class, 'DemandeAchat.ModificationLigneDemandeAchat.suppressionLigne');
        $router->get($base_url . '/modification/ligne/popupPlanning/{idDa:' . $demandeAchat . '+}/{idLigne:' . $demandeAchat . '+}', ModificationLigneDemandeAchatController::class, 'DemandeAchat.ModificationLigneDemandeAchat.popupPlanning');
        $router->get($base_url . '/modification/ligne/ajaxAddLignePlanning', ModificationLigneDemandeAchatController::class, 'DemandeAchat.ModificationLigneDemandeAchat.ajaxAddLignePlanning');
        /* CLAUSE : Création - Modification - Suppression */
        $router->get($base_url . '/clause/creation/ajaxLigne/{idDA:' . $demandeAchat . '+}', ModificationClauseDemandeAchatController::class, 'DemandeAchat.ModificationClauseDemandeAchat.ajaxAjoutLigne');
        $router->get($base_url . '/clause/validation/ligne/{idDA:' . $demandeAchat . '+}', ModificationClauseDemandeAchatController::class, 'DemandeAchat.ModificationClauseDemandeAchat.validationLigne');
        $router->get($base_url . '/clause/annulation/ligne/{idDA:' . $demandeAchat . '+}', ModificationClauseDemandeAchatController::class, 'DemandeAchat.ModificationClauseDemandeAchat.annulationLigne');
        $router->get($base_url . '/clause/modification/ligne/{idDA:' . $demandeAchat . '+}', ModificationClauseDemandeAchatController::class, 'DemandeAchat.ModificationClauseDemandeAchat.ajaxModificationLigne');
        $router->get($base_url . '/clause/modification/ordre/indexation/{idDA:' . $demandeAchat . '+}', ModificationClauseDemandeAchatController::class, 'DemandeAchat.ModificationClauseDemandeAchat.ajaxModificationOrdre');
        $router->get($base_url . '/clause/suppression/ligne/{idDA:' . $demandeAchat . '+}', ModificationClauseDemandeAchatController::class, 'DemandeAchat.ModificationClauseDemandeAchat.suppressionLigne');

        /** *************** **/!
        /** Demande d'achat **/
        /** *************** **/
        /** Article **/
        $router->get($base_url . '/article/{idDA:' . $demandeAchat . '+}[/{MODULE:' . $global . '+}]', ArticleDemandeAchatController::class, 'DemandeAchat.ArticleDemandeAchat.article');
        $router->get($base_url . '/detailLigneArticle/{idDA:' . $demandeAchat . '+}/{idLigne:' . $demandeAchat . '+}', ArticleDemandeAchatController::class, 'DemandeAchat.ArticleDemandeAchat.detailArticle');

        /** Détail DA **/
        $router->get($base_url . '/detail/{idDA:' . $demandeAchat . '+}[/{MODULE:' . $global . '+}]', DemandeAchatController::class, 'DemandeAchat.DemandeAchat.demandeAchat');

        /** PJ **/
        $router->get($base_url . '/pieceJointe/index/{idDA:' . $demandeAchat . '+}[/{MODULE:' . $global . '+}]', PieceJointeController::class, 'DemandeAchat.PieceJointe.index');
        $router->get($base_url . '/pieceJointe/create/{idDA:' . $demandeAchat . '+}[/{MODULE:' . $global . '+}]', PieceJointeController::class, 'DemandeAchat.PieceJointe.create');
        $router->get($base_url . '/pieceJointe/edit/{idDA:' . $demandeAchat . '+}[/{MODULE:' . $global . '+}]', PieceJointeController::class, 'DemandeAchat.PieceJointe.edit');
        $router->get($base_url . '/pieceJointe/delete/{idDA:' . $demandeAchat . '+}[/{MODULE:' . $global . '+}]', PieceJointeController::class, 'DemandeAchat.PieceJointe.delete');
        $router->get($base_url . '/pieceJointe/download/{idDA:' . $demandeAchat . '+}/{ordre:' . $global . '+}', PieceJointeController::class, 'DemandeAchat.PieceJointe.downloadPJ');

        /** Clause **/
        $router->get($base_url . '/clause/index/{idDA:' . $demandeAchat . '+}[/{MODULE:' . $global . '+}]', ClauseController::class, 'DemandeAchat.Clause.index');

        /**
         * Consommation budgétaire
         */
        $router->get($base_url . '/consoBudget/{idDA:' . $demandeAchat . '+}', DemandeAchatController::class, 'DemandeAchat.DemandeAchat.consommationBudgetaire');

        /** ********** **/
        /** Impression **/
        /** ********** **/
        $router->get($base_url . '/impression/globale/{typeImpression: ' . $expression_alpha_min . '+}', ImpressionGlobaleDemandeAchatController::class, 'DemandeAchat.ImpressionGlobaleDemandeAchatController.impressionGlobale');
        $router->get($base_url . '/impression/pdf', ImpressionGlobaleDemandeAchatController::class, 'DemandeAchat.ImpressionGlobaleDemandeAchatController.pdfImpressionGlobale');

        /** ***** **/
        /** Liste **/
        /** ***** **/
        /** Entete **/
        $router->get($base_url . '/liste/entete/{typeListe:' . $expression_alpha_min . '+}', ListeDemandeAchatController::class, 'DemandeAchat.Liste.listeEntete');
        $router->get($base_url . '/liste/detail/entete/{typeListe:' . $expression_alpha_min . '+}/detailLigne/{idDA:' . $demandeAchat . '+}', ListeDemandeAchatController::class, 'DemandeAchat.Liste.detailListeEntete');

        /** Ligne **/
        $router->get($base_url . '/liste/ligne/{typeListe:' . $expression_alpha_min . '+}', ListeDemandeAchatController::class, 'DemandeAchat.Liste.listeLigne');
        $router->get($base_url . '/liste/detail/ligne/{idDA:' . $demandeAchat . '+}/{noPO:' . $num . '+}', ListeDemandeAchatController::class, 'DemandeAchat.Liste.detailListeLigne');

        /** Commande **/
        $router->get($base_url . '/liste/ligneCommande', ListeDemandeAchatController::class, 'DemandeAchat.Liste.listeLigneCommande');
        $router->get($base_url . '/liste/detail/ligneCommande/{idCde:' . $commande . '+}/{noPO:' . $num . '+}', ListeDemandeAchatController::class, 'DemandeAchat.Liste.detailListeLigneCommande');

        /** Evenement par DA **/
        $router->get($base_url . '/liste/evenementDA', ListeDemandeAchatController::class, 'DemandeAchat.Liste.listeEvenementDA');
        $router->get($base_url . '/liste/evenementDA/detail/{idDA:' . $demandeAchat . '+}', ListeDemandeAchatController::class, 'DemandeAchat.Liste.detailListeEvenementDA');

        /** Evenements **/
        $router->get($base_url . '/liste/evenement', ListeDemandeAchatController::class, 'DemandeAchat.Liste.listeEvenement');

        /** ******* **/
        /** Edition **/
        /** ******* **/
        /** Entete **/
        $router->get($base_url . '/edition/entete', EditionDemandeAchatController::class, 'DemandeAchat.Edition.entete');

        /** Ligne **/
        $router->get($base_url . '/edition/ligne', EditionDemandeAchatController::class, 'DemandeAchat.Edition.ligne');

        /** DA non validées - DA à commander **/
        $router->get($base_url . '/edition/specifique/{typeEdition:' . $global . '+}', EditionDemandeAchatController::class, 'DemandeAchat.Edition.specifique');

        /** Ligne de DA à traiter / acheteur **/
        $router->get($base_url . '/edition/ligneATraiter', EditionDemandeAchatController::class, 'DemandeAchat.Edition.ligneATraiter');

        /** Workflow */
        $router->get($base_url . '/workflow/{demandeId:' . $demandeAchat . '+}', WorkflowController::class, 'DemandeAchat.Workflow.summary');
        $router->get($base_url . '/workflow/detail/{demandeId:' . $demandeAchat . '+}/{workflowId:' . $global . '+}', WorkflowController::class, 'DemandeAchat.Workflow.detail');
    }
}
