<?xml version="1.0" encoding="ISO-8859-1"?>
<persistence-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="../../../../defs/config-metier/Persistence.xsd">
    <layer name="mysql" persistence-model="xemelios-sql">
        <document id="PES_Aller" repository-import-xslt-file="">
            <table type="repository" base-name="PES_ALLER_REPOSITORY" version="2">
                CREATE TABLE IF NOT EXISTS ${base-name} (
                ID VARCHAR(25),
                LIBELLE VARCHAR(100),
                COLLECTIVITE VARCHAR(15) NOT NULL,
                REPOSITORY LONGBLOB,
                ENCODING VARCHAR(20)
                ) TYPE MYISAM
                <patch from-version="1">
                    <sql failonerror="false">ALTER TABLE ${base-name} ADD ID VARCHAR(25)</sql>
                    <sql failonerror="false">ALTER TABLE ${base-name} ADD LIBELLE VARCHAR(100)</sql>
                </patch>
            </table>
            <table type="special-key" base-name="PES_ALLER_SPECIAL_KEYS" version="1">
                CREATE TABLE IF NOT EXISTS ${base-name} (
                COLLECTIVITE VARCHAR(15) NOT NULL,
                BUDGET VARCHAR(24) NOT NULL,
                INITIAL_DOC_NAME VARCHAR(100) NOT NULL,
                KEY1 VARCHAR(100),
                LIB1 VARCHAR(200),
                KEY2 VARCHAR(100),
                LIB2 VARCHAR(200),
                KEY3 VARCHAR(100),
                LIB3 VARCHAR(200),
                KEY4 VARCHAR(100),
                LIB4 VARCHAR(200),
                KEY5 VARCHAR(100),
                LIB5 VARCHAR(200),
                KEY6 VARCHAR(100),
                LIB6 VARCHAR(200),
                KEY7 VARCHAR(100),
                LIB7 VARCHAR(200),
                KEY8 VARCHAR(100),
                LIB8 VARCHAR(200),
                KEY9 VARCHAR(100),
                LIB9 VARCHAR(200),
                KEY10 VARCHAR(100),
                LIB10 VARCHAR(200),
                INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET)
                ) TYPE MYISAM
            </table>
            <table type="list-bc" base-name="PES_ALLER_LIST_BUDG_COLL" version="1">
                CREATE TABLE IF NOT EXISTS ${base-name} (
                COLLECTIVITE VARCHAR(15) NOT NULL,
                BUDGET VARCHAR(24) NOT NULL,
                BUDGET_LIB VARCHAR(200),
                COLLECTIVITE_LIB VARCHAR(200),
                INITIAL_DOC_NAME VARCHAR(100) NOT NULL,
                INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET)
                ) TYPE MYISAM
            </table>

            <etat id="PES_DepenseAller" import-xslt-file="PES_V2/PES-Aller-DA-import-mysql.xsl">
                
                <key1>
                    <path>/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/@added:generated-id</path>
                </key1>
                <key2>
                    <path>/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/@added:generated-id</path>
                </key2>
                <key3>
                    <path>/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:BlocPiece/n:InfoPce/n:PJRef/@added:generated-id</path>
                </key3>
                <key4>
                    <path>/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePce/n:PJRef/@added:generated-id</path>
                </key4>
                <key5>
                    <path>/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/added:AllPJRef/@added:generated-id</path>
                </key5>
                <table type="document" base-name="PES_ALLER_DA_DOCUMENTS" version="1">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    INITIAL_DOC_NAME VARCHAR(100) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    DOC LONGBLOB,
                    ENCODING VARCHAR(20),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID)
                    ) TYPE MYISAM
                </table>
                <table type="index" id="bordereau_depense" base-name="PES_ALLER_DA_BORDEREAU_IX" version="1" main="true">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    PRIMARY_KEY VARCHAR(100) NOT NULL,
                    NODE_ID VARCHAR(100),
                    NB_MANDATS INTEGER,
                    EXERCICE VARCHAR(4),
                    ID_BORDEREAU INTEGER(7),
                    DATE_EMISSION_BORDEREAU DATE,
                    TYPE_BORDEREAU VARCHAR(2),
                    NB_PIECES INTEGER,
                    MT_CUMUL_ANNUEL DECIMAL(14,2),
                    MT_BOREREAU_HT DECIMAL(14,2),
                    MT_BORDEREAU_TVA DECIMAL(14,2),
                    MT_BORDEREAU_TTC DECIMAL(14,2),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID),
                    INDEX IX_${base-name}_DC (DOC_ID)
                    ) TYPE MYISAM
                </table>
                <table type="index" id="piece_depense" base-name="PES_ALLER_DA_PIECE_IX" version="2" based-on="key1">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    NODE_ID VARCHAR(50),
                    NB_LIGNES INTEGER,
                    MONTANT_HT DECIMAL(14,2),
                    MONTANT_TTC DECIMAL(14,2),
                    CODE_SERVICE VARCHAR(10),
                    AFFECT VARCHAR(10),
                    ID_PIECE INTEGER(13),
                    TYPE_PIECE VARCHAR(2),
                    NATURE_PIECE VARCHAR(2),
                    OBJ VARCHAR(100),
                    DATE_ECHEANCE DATE,
                    PJ VARCHAR(250),
                    DGP VARCHAR(10),
                    DGP_DATE_DEB DATE,
                    DGP_DATE_FIN DATE,
                    DGP_DUREE VARCHAR(2),
                    CODE_INTERNE_MOR VARCHAR(2),
                    TAUX_INTERNE_MOR DECIMAL(5,2),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID),
                    INDEX IX_${base-name}_DC (DOC_ID)
                    ) TYPE MYISAM
                    <patch from-version="1">
                        <sql failonerror="false">ALTER TABLE ${base-name} MODIFY ID_PIECE INTEGER(13)</sql>
                    </patch>
                    
                </table>
                <table type="index" id="pjref_piece_depense" base-name="PES_ALLER_DA_PIECE_PJREF" based-on="key3" version="1">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    NODE_ID VARCHAR(50),
                    SUPPORT_PJ VARCHAR(2),
                    ID_UNIQUE_PJ VARCHAR(50),
                    NOM_PJ VARCHAR(100),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID),
                    INDEX IX_${base-name}_DC (DOC_ID)
                    ) TYPE MYISAM
                </table>
                <table type="index" id="lignepiece_depense" base-name="PES_ALLER_DA_LIGNE_PIECE_IX" version="2" based-on="key2">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    NODE_ID VARCHAR(50),
                    ID_LIGNE INTEGER(6),
                    NATURE VARCHAR(12),
                    FONCTION  VARCHAR(10),
                    OPERATION VARCHAR(10),
                    COMPTE_ANA VARCHAR(10),
                    FACTURE VARCHAR(20),
                    LIBELLE_VIREMENT_1 VARCHAR(50),
                    LIBELLE_VIREMENT_2 VARCHAR(50),
                    MODE_REGLEMENT VARCHAR(2),
                    TVA_INTRA_COM BOOLEAN,
                    COMPTE_TVA VARCHAR(12),
                    COMPTE_TIERS VARCHAR(12),
                    MT_HT DECIMAL(14,2),
                    MT_TTC DECIMAL(14,2),
                    MT_TVA DECIMAL(14,2),
                    MT_FACTURE_HT DECIMAL(14,2),
                    REC_TVA BOOLEAN,
                    MT_HT_RES DECIMAL(14,2),
                    CODE_OP_SPEC VARCHAR(2),
                    ID_OP_SPEC VARCHAR(15),
                    NATURE_PIECE_ORIGINE VARCHAR(2),
                    EXERCICE_RAT INTEGER(4),
                    ID_PIECE_ORIGINE INTEGER(12),
                    ID_LIGNE_ORIGINE VARCHAR(6),
                    ID_CONV VARCHAR(25),
                    ID_MARCHE VARCHAR(30),
                    ID_EMPRUNT_ORDO VARCHAR(24),
                    ID_ACTIF VARCHAR(25),
                    ID_REGIE INTEGER(5),
                    ID_TIERS VARCHAR(30),
                    DATE_MALADE DATE,
                    NAT_ID_TIERS VARCHAR(2),
                    DATE_ID_TIERS DATE,
                    REF_TIERS VARCHAR(30),
                    CAT_TIERS VARCHAR(2),
                    NAT_JUR VARCHAR(2),
                    CIVILITE VARCHAR(10),
                    NOM VARCHAR(38),
                    COMPLEMENT_NOM VARCHAR(38),
                    PRENOM VARCHAR(38),
                    TYPE_ADRESSE VARCHAR(1),
                    ADR1 VARCHAR(38),
                    ADR2 VARCHAR(38),
                    ADR3 VARCHAR(38),
                    CODE_POSTAL VARCHAR(5),
                    VILLE VARCHAR(38),
                    CODE_RES VARCHAR(3),
                    CODE_PAYS VARCHAR(3),
                    DATE_ADR DATE,
                    RIB VARCHAR(23),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID),
                    INDEX IX_${base-name}_DC (DOC_ID)
                    ) TYPE MYISAM
                    <patch from-version="1">
                        <sql failonerror="false">alter table ${base-name} MODIFY ID_MARCHE VARCHAR(30)</sql>
                    </patch>
                    
                </table>
                <table type="index" id="pjref_lignepiece_depense" base-name="PES_ALLER_DA_LIGNE_PIECE_PJREF" based-on="key4" version="1">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    NODE_ID VARCHAR(50),
                    SUPPORT_PJ VARCHAR(2),
                    ID_UNIQUE_PJ VARCHAR(50),
                    NOM_PJ VARCHAR(100),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID),
                    INDEX IX_${base-name}_DC (DOC_ID)
                    ) TYPE MYISAM
                </table>
                <table type="index" id="depense_all_pj" base-name="PES_ALLER_DA_ALL_PJ" based-on="key5" version="1">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    NODE_ID VARCHAR(50),
                    SUPPORT_PJ VARCHAR(2),
                    ID_UNIQUE_PJ VARCHAR(50),
                    NOM_PJ VARCHAR(100),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID),
                    INDEX IX_${base-name}_DC (DOC_ID)
                    ) TYPE MYISAM
                </table>
                
                
				<!-- CRITERIA BORDEREAU BLOC BORDEREAU --> 
               <criteria id="bordereau_exercice" type="1" sql-index-id="SQI_DA_1">
                    <where-clause>${table}.${column}=##VALEUR:bordereau_exercice##</where-clause>
                </criteria>
                <criteria id="bordereau_id" type="1" sql-index-id="SQI_DA_2">
                    <where-clause>${table}.${column}##OPERATEUR:bordereau_id####VALEUR:bordereau_id##</where-clause>
                </criteria>
                <criteria id="bordereau_date_emission" type="1" sql-index-id="SQI_DA_3">
                    <where-clause>fn:date-compare(${table}.${column},bordereau_date_emission)</where-clause>
                </criteria>
                <criteria id="bordereau_type" type="1" sql-index-id="SQI_DA_4">
                    <where-clause>${table}.${column}=##VALEUR:bordereau_type##</where-clause>
                </criteria>
                <criteria id="bordereau_nb_pieces" type="1" sql-index-id="SQI_DA_5">
                    <where-clause>${table}.${column}##OPERATEUR:bordereau_nb_pieces####VALEUR:bordereau_nb_pieces##</where-clause>
                </criteria>
                <criteria id="bordereau_mt_cumul_annuel" type="1" sql-index-id="SQI_DA_6">
                    <where-clause>${table}.${column}##OPERATEUR:bordereau_mt_cumul_annuel####VALEUR:bordereau_mt_cumul_annuel##</where-clause>
                </criteria>
                <criteria id="bordereau_mt_bord_ht" type="1" sql-index-id="SQI_DA_7">
                    <where-clause>${table}.${column}##OPERATEUR:bordereau_mt_ht####VALEUR:bordereau_mt_ht##</where-clause>
                </criteria>
                <criteria id="bordereau_mt_bord_tva" type="1" sql-index-id="SQI_DA_8">
                    <where-clause>${table}.${column}##OPERATEUR:bordereau_mt_bord_tva####VALEUR:bordereau_mt_bord_tva##</where-clause>
                </criteria>
                <criteria id="bordereau_montant_TTC" sql-index-id="SQI_DA_8B">
                    <where-clause>${table}.${column}##OPERATEUR:bordereau_montant_TTC####VALEUR:bordereau_montant_TTC##</where-clause>
                </criteria>
                <!-- CRITERIA PIECE -->
                <criteria id="piece_code_service" sql-index-id="SQI_DA_9" type="1">
                    <where-clause>fn:string-compare(${table}.${column},piece_code_service)</where-clause>
                </criteria>
                <criteria id="piece_affect" sql-index-id="SQI_DA_10" type="1">
                    <where-clause>fn:string-compare(${table}.${column},piece_affect)</where-clause>
                </criteria>
                <criteria id="piece_id" sql-index-id="SQI_DA_11" type="1">
                    <where-clause>${table}.${column}##OPERATEUR:piece_id####VALEUR:piece_id##</where-clause>
                </criteria>
                <criteria id="piece_type" sql-index-id="SQI_DA_12" type="1">
                    <where-clause>${table}.${column}=##VALEUR:piece_type##</where-clause>
                </criteria>
                <criteria id="piece_nature" sql-index-id="SQI_DA_13" type="1">
                    <where-clause>${table}.${column}=##VALEUR:piece_nature##</where-clause>
                </criteria>
                <criteria id="piece_obj" sql-index-id="SQI_DA_14" type="1">
                    <where-clause>fn:string-compare(${table}.${column},piece_obj)</where-clause>
                </criteria>
                <criteria id="piece_date_echeance" sql-index-id="SQI_DA_15" type="1">
                    <where-clause>fn:date-compare(${table}.${column},piece_date_echeance)</where-clause>
                </criteria>
                <criteria id="piece_avec_pj" type="1" sql-index-id="SQI_DA_M221">
                    <where-clause>${table}.${column}='##VALEUR:piece_avec_pj##'</where-clause>
                </criteria>
                <criteria id="piece_dgp" sql-index-id="SQI_DA_M222" type="1">
                    <where-clause>${table}.${column}='##VALEUR:piece_dgp##'</where-clause>
                </criteria>
                <criteria id="piece_dgp_date_deb" sql-index-id="SQI_DA_18" type="1">
                    <where-clause>fn:date-compare(${table}.${column},piece_dgp_date_deb)</where-clause>
                </criteria>
                <criteria id="piece_dgp_date_fin" sql-index-id="SQI_DA_19" type="1">
                    <where-clause>fn:date-compare(${table}.${column},piece_dgp_date_fin)</where-clause>
                </criteria>
                <criteria id="piece_dgp_duree" sql-index-id="SQI_DA_20" type="1">
                    <where-clause>fn:string-compare(${table}.${column},piece_dgp_duree)</where-clause>
                </criteria>
                <criteria id="piece_dgp_code_interne_mor" sql-index-id="SQI_DA_21" type="1">
                    <where-clause>fn:string-compare(${table}.${column},piece_dgp_code_interne_mor)</where-clause>
                </criteria>
                <criteria id="piece_dgp_taux_interne_mor" sql-index-id="SQI_DA_22" type="1">
                    <where-clause>fn:string-compare(${table}.${column},piece_dgp_taux_interne_mor)</where-clause>
                </criteria>
                <criteria id="piece_montantHT" sql-index-id="SQI_DA_85" type="1">
                    <where-clause>${table}.${column}##OPERATEUR:piece_montantHT####VALEUR:piece_montantHT##</where-clause>
                </criteria>
                <criteria id="piece_montantTTC" sql-index-id="SQI_DA_86" type="1">
                    <where-clause>${table}.${column}##OPERATEUR:piece_montantTTC####VALEUR:piece_montantTTC##</where-clause>
                </criteria>
                <!-- CRITERIA PJREF PIECE -->
                <criteria id="piece_pjref_support" sql-index-id="SQI_DA_23" type="1">
                    <where-clause>fn:string-compare(${table}.${column},piece_pjref_support)</where-clause>
                </criteria>
                <criteria id="piece_pjref_id_unique" sql-index-id="SQI_DA_24" type="1">
                    <where-clause>fn:string-compare(${table}.${column},piece_pjref_id_unique)</where-clause>
                </criteria>
                <criteria id="piece_pjref_nom_pj" sql-index-id="SQI_DA_25" type="1">
                    <where-clause>fn:string-compare(${table}.${column},piece_pjref_nom_pj)</where-clause>
                </criteria>
                <!-- CRITERIA LIGNE PIECE -->
                <criteria id="ligne_piece_id_ligne" sql-index-id="SQI_DA_26" type="1">
                    <where-clause>${table}.${column}##OPERATEUR:ligne_piece_id_ligne####VALEUR:ligne_piece_id_ligne##</where-clause>
                </criteria>
                <criteria id="ligne_piece_nature" sql-index-id="SQI_DA_27" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_nature)</where-clause>
                </criteria>
                <criteria id="ligne_piece_fonction" sql-index-id="SQI_DA_28" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_fonction)</where-clause>
                </criteria>
                <criteria id="ligne_piece_operation" sql-index-id="SQI_DA_29" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_operation)</where-clause>
                </criteria>
                <criteria id="ligne_piece_compte_ana" sql-index-id="SQI_DA_30" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_compte_ana)</where-clause>
                </criteria>
                <criteria id="ligne_piece_facture" sql-index-id="SQI_DA_31" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_facture)</where-clause>
                </criteria>
                <criteria id="ligne_piece_libelle_virement_1" sql-index-id="SQI_DA_32" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_libelle_virement_1)</where-clause>
                </criteria>
                <criteria id="ligne_piece_libelle_virement_2" sql-index-id="SQI_DA_33" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_libelle_virement_2)</where-clause>
                </criteria>
                <criteria id="ligne_piece_mode_reglement" sql-index-id="SQI_DA_34" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_mode_reglement)</where-clause>
                </criteria>
                <criteria id="ligne_piece_tva_intra_com" sql-index-id="SQI_DA_35" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_tva_intra_com)</where-clause>
                </criteria>
                <criteria id="ligne_piece_compte_tva" sql-index-id="SQI_DA_36" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_compte_tva)</where-clause>
                </criteria>
                <criteria id="ligne_piece_compte_tiers" sql-index-id="SQI_DA_37" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_compte_tiers)</where-clause>
                </criteria>
                <criteria id="ligne_piece_montant_ht" sql-index-id="SQI_DA_38" type="1">
                    <where-clause>${table}.${column}##OPERATEUR:ligne_piece_montant_ht####VALEUR:ligne_piece_montant_ht##</where-clause>
                </criteria>
                <criteria id="ligne_piece_montant_ttc" sql-index-id="SQI_DA_87" type="1">
                    <where-clause>${table}.${column}##OPERATEUR:ligne_piece_montant_ttc####VALEUR:ligne_piece_montant_ttc##</where-clause>
                </criteria>
                <criteria id="ligne_piece_montant_tva" sql-index-id="SQI_DA_39" type="1">
                    <where-clause>${table}.${column}##OPERATEUR:ligne_piece_montant_tva####VALEUR:ligne_piece_montant_tva##</where-clause>
                </criteria>
                <criteria id="ligne_piece_montant_facture_ht" sql-index-id="SQI_DA_40" type="1">
                    <where-clause>${table}.${column}##OPERATEUR:ligne_piece_montant_facture_ht####VALEUR:ligne_piece_montant_facture_ht##</where-clause>
                </criteria>
                <criteria id="ligne_piece_rec_tva" sql-index-id="SQI_DA_41" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_rec_tva)</where-clause>
                </criteria>
                <criteria id="ligne_piece_mt_ht_res" sql-index-id="SQI_DA_42" type="1">
                    <where-clause>${table}.${column}##OPERATEUR:ligne_piece_mt_ht_res####VALEUR:ligne_piece_mt_ht_res##</where-clause>
                </criteria>
                <criteria id="ligne_piece_code_op_spec" sql-index-id="SQI_DA_43" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_code_op_spec)</where-clause>
                </criteria>
                <criteria id="ligne_piece_id_op_spec" sql-index-id="SQI_DA_44" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_id_op_spec)</where-clause>
                </criteria>
                <criteria id="ligne_piece_nature_piece" sql-index-id="SQI_DA_45" type="1">
                    <where-clause>${table}.${column}=##VALEUR:ligne_piece_nature_piece##</where-clause>
                </criteria>
                <criteria id="ligne_piece_exercice_rat" sql-index-id="SQI_DA_46" type="1">
                    <where-clause>${table}.${column}##OPERATEUR:ligne_piece_exercice_rat####VALEUR:ligne_piece_exercice_rat##</where-clause>
                </criteria>
                <criteria id="ligne_piece_id_piece_origine" sql-index-id="SQI_DA_47" type="1">
                    <where-clause>${table}.${column}##OPERATEUR:ligne_piece_id_piece_origine####VALEUR:ligne_piece_id_piece_origine##</where-clause>
                </criteria>
                <criteria id="ligne_piece_id_ligne_origine" sql-index-id="SQI_DA_48" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_id_ligne_origine)</where-clause>
                </criteria>
                <criteria id="ligne_piece_id_conv" sql-index-id="SQI_DA_49" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_id_conv)</where-clause>
                </criteria>
                <criteria id="ligne_piece_id_marche" sql-index-id="SQI_DA_50" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_id_marche)</where-clause>
                </criteria>
                <criteria id="ligne_piece_id_emprunt_ordo" sql-index-id="SQI_DA_51" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_id_emprunt_ordo)</where-clause>
                </criteria>
                <criteria id="ligne_piece_id_actif" sql-index-id="SQI_DA_52" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_id_actif)</where-clause>
                </criteria>
                <criteria id="ligne_piece_id_regie" sql-index-id="SQI_DA_53" type="1">
                    <where-clause>${table}.${column}##OPERATEUR:ligne_piece_id_regie####VALEUR:ligne_piece_id_regie##</where-clause>
                </criteria>
                <criteria id="ligne_piece_id_tiers" sql-index-id="SQI_DA_54" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_id_tiers)</where-clause>
                </criteria>
                <criteria id="ligne_piece_date_malade" sql-index-id="SQI_DA_55" type="1">
                    <where-clause>fn:date-compare(${table}.${column},ligne_piece_date_malade)</where-clause>
                </criteria>
                <criteria id="ligne_piece_nature_id_tiers" sql-index-id="SQI_DA_56" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_nature_id_tiers)</where-clause>
                </criteria>
                <criteria id="ligne_piece_nature_id_tiers_lib" sql-index-id="SQI_DA_56" type="1">
                    <where-clause>${table}.${column}=##VALEUR:ligne_piece_nature_id_tiers##</where-clause>
                </criteria>
                <criteria id="ligne_piece_date_id_tiers" sql-index-id="SQI_DA_57" type="1">
                    <where-clause>fn:date-compare(${table}.${column},ligne_piece_date_id_tiers)</where-clause>
                </criteria>
                <criteria id="ligne_piece_reference_tiers" sql-index-id="SQI_DA_58" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_reference_tiers)</where-clause>
                </criteria>
                <criteria id="ligne_piece_categorie_tiers" sql-index-id="SQI_DA_59" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_categorie_tiers)</where-clause>
                </criteria>
                <criteria id="ligne_piece_nature_juridique" sql-index-id="SQI_DA_60" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_nature_juridique)</where-clause>
                </criteria>
                <criteria id="ligne_piece_civilite" sql-index-id="SQI_DA_61" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_civilite)</where-clause>
                </criteria>
                <criteria id="ligne_piece_nom" sql-index-id="SQI_DA_62" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_nom)</where-clause>
                </criteria>
                <criteria id="ligne_piece_complement_nom" sql-index-id="SQI_DA_63" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_complement_nom)</where-clause>
                </criteria>
                <criteria id="ligne_piece_prenom" sql-index-id="SQI_DA_64" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_prenom)</where-clause>
                </criteria>
                <criteria id="ligne_piece_type_adresse" sql-index-id="SQI_DA_65" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_type_adresse)</where-clause>
                </criteria>
                <criteria id="ligne_piece_adresse1" sql-index-id="SQI_DA_66" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_adresse1)</where-clause>
                </criteria>
                <criteria id="ligne_piece_adresse2" sql-index-id="SQI_DA_67" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_adresse2)</where-clause>
                </criteria>
                <criteria id="ligne_piece_adresse3" sql-index-id="SQI_DA_68" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_adresse3)</where-clause>
                </criteria>
                <criteria id="ligne_piece_cp" sql-index-id="SQI_DA_69" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_cp)</where-clause>
                </criteria>
                <criteria id="ligne_piece_ville" sql-index-id="SQI_DA_70" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_ville)</where-clause>
                </criteria>
                <criteria id="ligne_piece_code_res" sql-index-id="SQI_DA_71" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_code_res)</where-clause>
                </criteria>
                <criteria id="ligne_piece_code_pays" sql-index-id="SQI_DA_72" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_code_pays)</where-clause>
                </criteria>
                <criteria id="ligne_piece_date_adresse" sql-index-id="SQI_DA_73" type="1">
                    <where-clause>fn:date-compare(${table}.${column},ligne_piece_date_adresse)</where-clause>
                </criteria>
                <criteria id="ligne_piece_rib" sql-index-id="SQI_DA_74" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_rib)</where-clause>
                </criteria>
                <!-- CRITERIA PJREF LIGNE PIECE -->
                <criteria id="ligne_piece_pjref_support" sql-index-id="SQI_DA_75" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_pjref_support)</where-clause>
                </criteria>
                <criteria id="ligne_piece_pjref_id_unique" sql-index-id="SQI_DA_76" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_pjref_id_unique)</where-clause>
                </criteria>
                <criteria id="ligne_piece_pjref_nom_pj" sql-index-id="SQI_DA_77" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_pjref_nom_pj)</where-clause>
                </criteria>
                <criteria id="nb_Piece" sql-index-id="SQI_DA_83">
                    <where-clause>${table}.${column}##OPERATEUR:nb_Piece####VALEUR:nb_Piece##</where-clause>
                </criteria>
                <criteria id="nb_Ligne" sql-index-id="SQI_DA_84">
                    <where-clause>${table}.${column}##OPERATEUR:nb_Ligne####VALEUR:nb_Ligne##</where-clause>
                </criteria>
                <criteria id="justifie_par" sql-index-id="DEP_ALLPJ_ID_UNIQUE">
                    <where-clause>fn:string-compare(${table}.${column},IdUnique)</where-clause>
                </criteria>
                
                
                <!-- INDEX BORDEREAU BLOC BORDEREAU -->
                <sql-index id="SQI_DA_M0" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/@added:primary-key" datatype="string" column="PRIMARY_KEY" table="bordereau_depense"/>
                <!--sql-index id="SQI_DA_M1" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/@added:primary-key" datatype="string" column="PRIMARY_KEY" table="bordereau_depense"/-->
                <sql-index id="SQI_DA_M4" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/@ano:node-id" datatype="string" table="bordereau_depense" column="NODE_ID"/>
                <!--sql-index id="SQI_DA_M5" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/@ano:node-id" datatype="string" table="bordereau_depense" column="NODE_ID"/-->
                <sql-index id="SQI_DA_1" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:BlocBordereau/n:Exer/@V" datatype="integer" table="bordereau_depense" column="EXERCICE"/>
                <!--sql-index id="SQI_DA_1B" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:BlocBordereau/n:Exer/@V" datatype="integer" table="bordereau_depense" column="EXERCICE"/-->
                <sql-index id="SQI_DA_2" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:BlocBordereau/n:IdBord/@V" datatype="integer" table="bordereau_depense" column="ID_BORDEREAU"/>
                <sql-index id="SQI_DA_3" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:BlocBordereau/n:DteBordEm/@V" datatype="date" format="yyyy-MM-dd" table="bordereau_depense" column="DATE_EMISSION_BORDEREAU"/>
                <sql-index id="SQI_DA_4" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:BlocBordereau/n:TypBord/@V" datatype="string" table="bordereau_depense" column="TYPE_BORDEREAU"/>
                <!--sql-index id="SQI_DA_4B" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:BlocBordereau/n:TypBord/@V" datatype="string" table="bordereau_depense" column="TYPE_BORDEREAU"/-->
                <sql-index id="SQI_DA_5" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:BlocBordereau/n:NbrPce/@V" datatype="integer" table="bordereau_depense" column="NB_PIECES"/>
                <sql-index id="SQI_DA_6" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:BlocBordereau/n:MtCumulAnnuel/@V" datatype="decimal" table="bordereau_depense" column="MT_CUMUL_ANNUEL"/>
                <sql-index id="SQI_DA_7" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:BlocBordereau/n:MtBordHT/@V" datatype="decimal" table="bordereau_depense" column="MT_BOREREAU_HT"/>
                <sql-index id="SQI_DA_8" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:BlocBordereau/n:MtBordTVA/@V" datatype="decimal" table="bordereau_depense" column="MT_BORDEREAU_TVA"/>
                <sql-index id="SQI_DA_8B" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/@added:montantTTC" datatype="decimal" table="bordereau_depense" column="MT_BORDEREAU_TTC"/>
                <!-- INDEX PIECE -->
                <sql-index id="SQI_DA_9" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:BlocPiece/n:InfoPce/n:CodServ/@V" column="CODE_SERVICE" datatype="string" table="piece_depense"/>
                <sql-index id="SQI_DA_10" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:BlocPiece/n:InfoPce/n:Affect/@V" column="AFFECT"  datatype="string" table="piece_depense"/>
                <sql-index id="SQI_DA_11" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:BlocPiece/n:InfoPce/n:IdPce/@V" column="ID_PIECE" datatype="integer" table="piece_depense"/>
                <sql-index id="SQI_DA_12" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:BlocPiece/n:InfoPce/n:TypPce/@V" column="TYPE_PIECE" datatype="string" table="piece_depense"/>
                <sql-index id="SQI_DA_13" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:BlocPiece/n:InfoPce/n:NatPce/@V" column="NATURE_PIECE" datatype="string" table="piece_depense"/>
                <sql-index id="SQI_DA_14" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:BlocPiece/n:InfoPce/n:Obj/@V" column="OBJ" datatype="string" table="piece_depense"/>
                <sql-index id="SQI_DA_15" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:BlocPiece/n:InfoPce/n:DteEch/@V" column="DATE_ECHEANCE" format="yyyy-MM-dd" datatype="date" table="piece_depense"/>
                <!--sql-index id="SQI_DA_16" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:BlocPiece/n:InfoPce/n:PJ/@V" column="PJ" datatype="string" table="piece_depense"/n:-->
                <!--sql-index id="SQI_DA_17" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:BlocPiece/n:DGP/n:Dgp/@V" column="DGP" datatype="boolean" table="piece_depense"/n:-->
                <sql-index id="SQI_DA_18" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:BlocPiece/n:DGP/n:DteDebDgp/@V" column="DGP_DATE_DEB" format="yyyy-MM-dd" datatype="date" table="piece_depense"/>
                <sql-index id="SQI_DA_19" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:BlocPiece/n:DGP/n:DteFinDgp/@V" column="DGP_DATE_FIN" format="yyyy-MM-dd" datatype="date" table="piece_depense"/>
                <sql-index id="SQI_DA_20" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:BlocPiece/n:DGP/n:DureeDgp/@V" column="DGP_DUREE" datatype="string" table="piece_depense"/>
                <sql-index id="SQI_DA_21" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:BlocPiece/n:DGP/n:CodeIntMor/@V" column="CODE_INTERNE_MOR" datatype="string" table="piece_depense"/>
                <sql-index id="SQI_DA_22" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:BlocPiece/n:DGP/n:TxIntMor/@V" column="TAUX_INTERNE_MOR" datatype="string" table="piece_depense"/>
                <sql-index id="SQI_DA_M221" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/@added:avecPJ" datatype="string" column="PJ" table="piece_depense"/>
                <sql-index id="SQI_DA_M222" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/@added:DGP" column="DGP" datatype="string" table="piece_depense"/>
                <!-- INDEX PJREF PIECE -->
                <sql-index id="SQI_DA_23" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:BlocPiece/n:InfoPce/n:PJRef/n:Support/@V" column="SUPPORT_PJ" datatype="string" table="pjref_piece_depense"/>
                <sql-index id="SQI_DA_24" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:BlocPiece/n:InfoPce/n:PJRef/n:IdUnique/@V" column="ID_UNIQUE_PJ" datatype="string" table="pjref_piece_depense"/>
                <sql-index id="SQI_DA_25" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:BlocPiece/n:InfoPce/n:PJRef/n:NomPJ/@V" column="NOM_PJ" datatype="string" table="pjref_piece_depense"/>
                <!--sql-index id="SQI_DA_M101" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:BlocPiece/n:InfoPce/n:PJRef/@generated-id" datatype="string" column="NODE_ID" table="pjref_piece_depense"/-->
                <!-- INDEX LIGNE PIECE -->
                <sql-index id="SQI_DA_26" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePce/n:IdLigne/@V" column="ID_LIGNE" datatype="integer" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_27" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePce/n:Nature/@V" column="NATURE" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_28" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePce/n:Fonction/@V" column="FONCTION" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_29" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePce/n:Operation/@V" column="OPERATION" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_30" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePce/n:CptAna/@V" column="COMPTE_ANA" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_31" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePce/n:Facture/@V" column="FACTURE" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_32" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePce/n:LibVir1/@V" column="LIBELLE_VIREMENT_1" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_33" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePce/n:LibVir2/@V" column="LIBELLE_VIREMENT_2" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_34" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePce/n:ModRegl/@V" column="MODE_REGLEMENT" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_35" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePce/n:TVAIntraCom/@V" column="TVA_INTRA_COM" datatype="boolean" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_36" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePce/n:CpteTVA/@V" column="COMPTE_TVA" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_37" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePce/n:CpteTiers/@V" column="COMPTE_TIERS" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_38" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePce/n:MtHT/@V" column="MT_HT" datatype="decimal" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_39" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePce/n:MtTVA/@V" column="MT_TVA" datatype="decimal" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_40" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePce/n:MtFactHT/@V" column="MT_FACTURE_HT" datatype="decimal" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_41" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoTVAHLM/n:RecTVA/@V" column="REC_TVA" datatype="boolean" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_42" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoTVAHLM/n:MtHTRes/@V" column="MT_HT_RES" datatype="decimal" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_43" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:OpSpec/n:CodOpSpec/@V" column="CODE_OP_SPEC" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_44" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:OpSpec/n:IdOpSpec/@V" column="ID_OP_SPEC" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_45" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:RattachPiece/n:NatPceOrig/@V" column="NATURE_PIECE_ORIGINE" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_46" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:RattachPiece/n:ExerRat/@V" column="EXERCICE_RAT" datatype="integer" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_47" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:RattachPiece/n:IdPceOrig/@V" column="ID_PIECE_ORIGINE" datatype="integer" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_48" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:RattachPiece/n:IdLigneOrig/@V" column="ID_LIGNE_ORIGINE" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_49" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:LiensIdent/n:IdConv/@V" column="ID_CONV" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_50" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:LiensIdent/n:IdMarche/@V" column="ID_MARCHE" datatype="integer" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_51" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:LiensIdent/n:IdEmpruntOrdo/@V" column="ID_EMPRUNT_ORDO" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_52" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:LiensIdent/n:IdActif/@V" column="ID_ACTIF" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_53" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:LiensIdent/n:Id_Regie/@V" column="ID_REGIE" datatype="integer" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_54" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:InfoTiers/n:IdTiers/@V" column="ID_TIERS" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_55" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:InfoTiers/n:DteMalade/@V" column="DATE_MALADE" format="yyyy-MM-dd" datatype="date" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_56" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:InfoTiers/n:NatIdTiers/@V" column="NAT_ID_TIERS" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_57" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:InfoTiers/n:DteIdTiers/@V" column="DATE_ID_TIERS" format="yyyy-MM-dd" datatype="date" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_58" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:InfoTiers/n:RefTiers/@V" column="REF_TIERS" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_59" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:InfoTiers/n:CatTiers/@V" column="CAT_TIERS" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_60" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:InfoTiers/n:NatJur/@V" column="NAT_JUR" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_61" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:InfoTiers/n:Civilite/@V" column="CIVILITE" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_62" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:InfoTiers/n:Nom/@V" column="NOM" datatype="string" format="uppercase" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_63" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:InfoTiers/n:ComplNom/@V" column="COMPLEMENT_NOM" datatype="string" format="uppercase" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_64" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:InfoTiers/n:Prenom/@V" column="PRENOM" datatype="string" format="uppercase" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_65" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:Adresse/n:TypAdr/@V" column="TYPE_ADRESSE" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_66" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:Adresse/n:Adr1/@V" column="ADR1" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_67" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:Adresse/n:Adr2/@V" column="ADR2" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_68" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:Adresse/n:Adr3/@V" column="ADR3" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_69" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:Adresse/n:CP/@V" column="CODE_POSTAL" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_70" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:Adresse/n:Ville/@V" column="VILLE" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_71" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:Adresse/n:CodRes/@V" column="CODE_RES" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_72" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:Adresse/n:CodPays/@V" column="CODE_PAYS" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_73" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:Adresse/n:DteAdr/@V" column="DATE_ADR" format="yyyy-MM-dd" datatype="date" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_74" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:CpteBancaire/@rib" column="RIB" datatype="string" table="lignepiece_depense"/>
                <!-- INDEX PJREF LIGNE PIECE -->
                <sql-index id="SQI_DA_75" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePce/n:PJRef/n:Support/@V" column="SUPPORT_PJ" datatype="string" table="pjref_lignepiece_depense"/>
                <sql-index id="SQI_DA_76" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePce/n:PJRef/n:IdUnique" column="ID_UNIQUE_PJ" datatype="string" table="pjref_lignepiece_depense"/>
                <sql-index id="SQI_DA_77" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePce/n:PJRef/n:NomPJ" column="NOM_PJ" datatype="string" table="pjref_lignepiece_depense"/>
                <!-- INDEX GENERATED ID-->
                <!--sql-index id="SQI_DA_78" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/@added:generated-id" column="NODE_ID" datatype="string" table="bordereau_depense"/n:-->
                <sql-index id="SQI_DA_79" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/@added:generated-id" column="NODE_ID" datatype="string" table="piece_depense"/>
                <sql-index id="SQI_DA_80" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/@added:generated-id" column="NODE_ID" datatype="string" table="lignepiece_depense"/>
                <sql-index id="SQI_DA_81" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:BlocPiece/n:InfoPce/n:PJRef/@added:generated-id" column="NODE_ID" datatype="string" table="pjref_piece_depense"/>
                <sql-index id="SQI_DA_82" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePce/n:PJRef/@added:generated-id" column="NODE_ID" datatype="string" table="pjref_lignepiece_depense"/>
                <!-- INDEX ADDED -->
                <sql-index id="SQI_DA_83" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/@added:nbPiece" column="NB_MANDATS" datatype="integer" table="bordereau_depense"/>
                <sql-index id="SQI_DA_84" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/@added:nbLigne" column="NB_LIGNES" datatype="integer" table="piece_depense"/>
                <sql-index id="SQI_DA_85" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/@added:montantTTC" column="MONTANT_TTC" datatype="integer" table="piece_depense"/>
                <sql-index id="SQI_DA_86" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/@added:montantHT" column="MONTANT_HT" datatype="integer" table="piece_depense"/>
                <sql-index id="SQI_DA_87" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:LigneDePiece/@added:montantTTC" column="MT_TTC" datatype="integer" table="lignepiece_depense"/>
                <!--sql-index id="SQI_DA_M2" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:BlocBordereau/n:IdBord/@V" datatype="integer" table="bordereau_depense" column="ID_BORDEREAU"/-->
                <!--sql-index id="SQI_DA_M3" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:BlocPiece/n:InfoPce/n:IdPce/@V" column="ID_PIECE" datatype="string" table="piece_depense"/-->
                <!-- ALL PJREF -->
                <sql-index id="DEP_ALLPJ_NODE" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:added:AllPJRef/@added:generated-id" datatype="string" column="NODE_ID" table="depense_all_pj"/>
                <sql-index id="DEP_ALLPJ_SUPPORT" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:added:AllPJRef/n:Support/@V" datatype="string" column="SUPPORT_PJ" table="depense_all_pj"/>
                <sql-index id="DEP_ALLPJ_ID_UNIQUE" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:added:AllPJRef/n:IdUnique/@V" datatype="string" column="ID_UNIQUE_PJ" table="depense_all_pj"/>
                <sql-index id="DEP_ALLPJ_NOM_PJ" path="/n:PES_Aller/n:PES_DepenseAller/n:Bordereau/n:Piece/n:added:AllPJRef/n:NomPJ/@V" datatype="string" column="NOM_PJ" table="depense_all_pj"/>
                
                <element id="Piece">
                    <sql-count>COUNT(DISTINCT(CONCAT(PES_ALLER_DA_PIECE_IX.DOC_ID , PES_ALLER_DA_PIECE_IX.NODE_ID , PES_ALLER_DA_PIECE_IX.ID_PIECE)))</sql-count>
                    <special-cond>PES_ALLER_DA_PIECE_IX.DOC_ID IS NOT NULL</special-cond>
                </element>
                <element id="LigneDePiece">
                    <sql-count>COUNT(DISTINCT(CONCAT(PES_ALLER_DA_LIGNE_PIECE_IX.DOC_ID , PES_ALLER_DA_LIGNE_PIECE_IX.NODE_ID , PES_ALLER_DA_LIGNE_PIECE_IX.ID_LIGNE)))</sql-count>
                    <special-cond>PES_ALLER_DA_LIGNE_PIECE_IX.DOC_ID IS NOT NULL</special-cond>
                </element>
            </etat>
            <!--etat id="PES_RoleAller" import-xslt-file="">
                <table type="document" base-name="PES_ALLER_ROA_DOCUMENTS" version="1" main="yes">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    INITIAL_DOC_NAME VARCHAR(100) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    DOC LONGBLOB,
                    ENCODING VARCHAR(20),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID)
                    ) TYPE MYISAM
                </table>
                <table type="index" id="1" base-name="PES_ALLER_ROA_BORDEREAU_IX" version="1" main="yes">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    NODE_ID VARCHAR(50) NOT NULL,
                    EXERCICE DATE,
                    ID_BORDEREAU VARCHAR(7),
                    DATE_EMISSION_BORDEREAU DATE,
                    TYPE_BORDEREAU VARCHAR(2),
                    NB_PIECES INTEGER,
                    MT_CUMUL_ANNUEL DECIMAL(14,2),
                    MT_BOREREAU_HT DECIMAL(14,2),
                    MT_BORDEREAU_TVA DECIMAL(14,2),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID),
                    INDEX IX_${base-name}_DC (DOC_ID)
                    ) TYPE MYISAM
                </table>
            </etat>
            <etat id="PES_BudgetAller" import-xslt-file="">
                <table type="document" base-name="PES_ALLER_BA_DOCUMENTS" version="1" main="yes">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    INITIAL_DOC_NAME VARCHAR(100) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    DOC LONGBLOB,
                    ENCODING VARCHAR(20),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID)
                    ) TYPE MYISAM
                </table>
                <table type="index" id="1" base-name="PES_ALLER_BA_BORDEREAU_IX" version="1" main="yes">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    NODE_ID VARCHAR(50) NOT NULL,
                    EXERCICE DATE,
                    ID_BORDEREAU VARCHAR(7),
                    DATE_EMISSION_BORDEREAU DATE,
                    TYPE_BORDEREAU VARCHAR(2),
                    NB_PIECES INTEGER,
                    MT_CUMUL_ANNUEL DECIMAL(14,2),
                    MT_BOREREAU_HT DECIMAL(14,2),
                    MT_BORDEREAU_TVA DECIMAL(14,2),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID),
                    INDEX IX_${base-name}_DC (DOC_ID)
                    ) TYPE MYISAM
                </table>
            </etat>
            <etat id="PES_EtatActif" import-xslt-file="">
                <table type="document" base-name="PES_ALLER_EA_DOCUMENTS" version="1" main="yes">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    INITIAL_DOC_NAME VARCHAR(100) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    DOC LONGBLOB,
                    ENCODING VARCHAR(20),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID)
                    ) TYPE MYISAM
                </table>
                <table type="index" id="1" base-name="PES_ALLER_EA_BORDEREAU_IX" version="1" main="yes">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    NODE_ID VARCHAR(50) NOT NULL,
                    EXERCICE DATE,
                    ID_BORDEREAU VARCHAR(7),
                    DATE_EMISSION_BORDEREAU DATE,
                    TYPE_BORDEREAU VARCHAR(2),
                    NB_PIECES INTEGER,
                    MT_CUMUL_ANNUEL DECIMAL(14,2),
                    MT_BOREREAU_HT DECIMAL(14,2),
                    MT_BORDEREAU_TVA DECIMAL(14,2),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID),
                    INDEX IX_${base-name}_DC (DOC_ID)
                    ) TYPE MYISAM
                </table>
            </etat>
            <etat id="PES_Marche" import-xslt-file="">
                <table type="document" base-name="PES_ALLER_MARCHE_DOCUMENTS" version="1" main="yes">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    INITIAL_DOC_NAME VARCHAR(100) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    DOC LONGBLOB,
                    ENCODING VARCHAR(20),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID)
                    ) TYPE MYISAM
                </table>
                <table type="index" id="1" base-name="PES_ALLER_MARCHE_BORDEREAU_IX" version="1" main="yes">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    NODE_ID VARCHAR(50) NOT NULL,
                    EXERCICE DATE,
                    ID_BORDEREAU VARCHAR(7),
                    DATE_EMISSION_BORDEREAU DATE,
                    TYPE_BORDEREAU VARCHAR(2),
                    NB_PIECES INTEGER,
                    MT_CUMUL_ANNUEL DECIMAL(14,2),
                    MT_BOREREAU_HT DECIMAL(14,2),
                    MT_BORDEREAU_TVA DECIMAL(14,2),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID),
                    INDEX IX_${base-name}_DC (DOC_ID)
                    ) TYPE MYISAM
                </table>
            </etat>
            <etat id="PESEtatPassif" import-xslt-file="">
                <table type="document" base-name="PES_ALLER_EP_DOCUMENTS" version="1" main="yes">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    INITIAL_DOC_NAME VARCHAR(100) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    DOC LONGBLOB,
                    ENCODING VARCHAR(20),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID)
                    ) TYPE MYISAM
                </table>
                <table type="index" id="1" base-name="PES_ALLER_EP_BORDEREAU_IX" version="1" main="yes">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    NODE_ID VARCHAR(50) NOT NULL,
                    EXERCICE DATE,
                    ID_BORDEREAU VARCHAR(7),
                    DATE_EMISSION_BORDEREAU DATE,
                    TYPE_BORDEREAU VARCHAR(2),
                    NB_PIECES INTEGER,
                    MT_CUMUL_ANNUEL DECIMAL(14,2),
                    MT_BOREREAU_HT DECIMAL(14,2),
                    MT_BORDEREAU_TVA DECIMAL(14,2),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID),
                    INDEX IX_${base-name}_DC (DOC_ID)
                    ) TYPE MYISAM
                </table>
            </etat>
            <etat id="PES_PJ" import-xslt-file="">
                <table type="document" base-name="PES_ALLER_PJ_DOCUMENTS" version="1" main="yes">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    INITIAL_DOC_NAME VARCHAR(100) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    DOC LONGBLOB,
                    ENCODING VARCHAR(20),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID)
                    ) TYPE MYISAM
                </table>
                <table type="index" id="1" base-name="PES_ALLER_PJ_BORDEREAU_IX" version="1" main="yes">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    NODE_ID VARCHAR(50) NOT NULL,
                    EXERCICE DATE,
                    ID_BORDEREAU VARCHAR(7),
                    DATE_EMISSION_BORDEREAU DATE,
                    TYPE_BORDEREAU VARCHAR(2),
                    NB_PIECES INTEGER,
                    MT_CUMUL_ANNUEL DECIMAL(14,2),
                    MT_BOREREAU_HT DECIMAL(14,2),
                    MT_BORDEREAU_TVA DECIMAL(14,2),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID),
                    INDEX IX_${base-name}_DC (DOC_ID)
                    ) TYPE MYISAM
                </table>
            </etat-->            
              
            <etat id="PES_RecetteAller" import-xslt-file="PES_V2/PES-Aller-RA-import-mysql.xsl">
                <key1>
                    <path>/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/@added:generated-id</path>
                </key1>
                <key2>
                    <path>/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:BlocPiece/n:PJRef/@added:generated-id</path>
                </key2>
                <key3>
                    <path>/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/@added:generated-id</path>
                </key3>
                <key4>
                    <path>/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePiece/n:PJRef/@added:generated-id</path>
                </key4>
                <key5>
                    <path>/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/@added:generated-id</path>
                </key5>
                <key6>
                    <path>/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Recouvrement/@added:generated-id</path>
                </key6>
                <key7>
                    <path>/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:added:AllPJRef/@added:generated-id</path>
                </key7>
                
                <table type="document" base-name="PES_ALLER_RA_DOCUMENTS" version="1">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    INITIAL_DOC_NAME VARCHAR(100) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    DOC LONGBLOB,
                    ENCODING VARCHAR(20),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID)
                    ) TYPE MYISAM
                </table>
                <table type="index" id="T_RA_1" base-name="PES_ALLER_RA_BORDEREAU_IX" version="1" main="true">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    PRIMARY_KEY VARCHAR(100) NOT NULL,
                    EXERCICE INTEGER,
                    ID_BORDEREAU INTEGER,
                    DATE_EMISSION_BORDEREAU DATE,
                    TYPE_BORDEREAU VARCHAR(2),
                    NB_PIECES INTEGER,
                    MT_CUMUL_ANNUEL DECIMAL(14,2),
                    MT_BOREREAU_HT DECIMAL(14,2),
                    MT_BORDEREAU_TVA DECIMAL(14,2),
                    MONTANT_TTC DECIMAL(14,2),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID),
                    INDEX IX_${base-name}_DC (DOC_ID)
                    ) TYPE MYISAM
                </table>
                <!--  
                    NODE_ID VARCHAR(50) NOT NULL,
                -->
                <table type="index" id="T_RA_2" base-name="PES_ALLER_RA_PIECE_IX" version="2" based-on="key1">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    NODE_ID VARCHAR(50) NOT NULL,
                    CODE_SERVICE VARCHAR(10),
                    AFFECT VARCHAR(10),
                    CODE_PROD VARCHAR(2),
                    ID_PIECE INTEGER(13),
                    TYPE_PIECE VARCHAR(2),
                    NATURE_PIECE VARCHAR(2),
                    ID_ROL INTEGER,
                    DATE_ASP DATE,
                    OBJ VARCHAR(160),
                    DEB_FACT DATE,
                    FIN_FACT DATE,
                    NB_LIGNE INTEGER,
                    MONTANT_TTC DECIMAL(14,2),
                    MONTANT_HT DECIMAL(14,2),
                    AVEC_PJ VARCHAR(5),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID),
                    INDEX IX_${base-name}_DC (DOC_ID)
                    ) TYPE MYISAM
                    <patch from-version="1">
                        <sql failonerror="false">ALTER TABLE ${base-name} MODIFY ID_PIECE INTEGER(13)</sql>
                    </patch>
                    
                </table>
                <table type="index" id="T_RA_3" base-name="PES_ALLER_RA_PIECE_PJREF_IX" version="1" based-on="key2">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    NODE_ID VARCHAR(50) NOT NULL,
                    SUPPORT_PJ VARCHAR(2),
                    ID_UNIQUE_PJ VARCHAR(50),
                    NOM_PJ VARCHAR(100),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID),
                    INDEX IX_${base-name}_DC (DOC_ID)
                    ) TYPE MYISAM
                </table>
                <table type="index" id="T_RA_4" base-name="PES_ALLER_RA_LIGNE_PIECE_IX" version="1" based-on="key3">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    NODE_ID VARCHAR(50) NOT NULL,
                    ID_LIGNE VARCHAR(6),
                    OBJET VARCHAR(160),
                    CODE_PROD VARCHAR(4),
                    FIN_GEO INTEGER,
                    COD_ET_GEO VARCHAR(3),
                    NATURE VARCHAR(12),
                    FONCTION  VARCHAR(10),
                    OPERATION VARCHAR(10),
                    COMPTE_ANA VARCHAR(10),
                    FACTURE VARCHAR(20),
                    TAUX_TVA DECIMAL(5,2),
                    MAJO VARCHAR(5),
                    DATE_MAJO DATE,
                    TAUX_MAJO DECIMAL(5,2),
                    COMPTE_TIERS VARCHAR(12),
                    TVA_INTRA_COM VARCHAR(5),
                    COMPTE_TVA VARCHAR(12),
                    MT_HT DECIMAL(14,2),
                    MT_TVA DECIMAL(14,2),
                    MT_NON_MAJO DECIMAL(14,2),
                    NAT_PREL VARCHAR(2),
                    PER_PREL VARCHAR(2),
                    DATE_PREL DATE,
                    MNT_PREL DECIMAL(14,2),
                    COD_ASS_DEB VARCHAR(1),
                    COD_AYANT_DROIT VARCHAR(2),
                    NATURE_PIECE_ORIGINE VARCHAR(2),
                    EXERCICE_RAT VARCHAR(4),
                    ID_PIECE_ORIGINE INTEGER(12),
                    ID_LIGNE_ORIGINE VARCHAR(6),
                    ID_ENCAISSEMENT INTEGER,
                    ID_CONV VARCHAR(25),
                    ID_MARCHE VARCHAR(30),
                    ID_CAUTION VARCHAR(25),
                    ID_EMPRUNT_ORDO VARCHAR(24),
                    ID_ACTIF VARCHAR(25),
                    ID_REGIE VARCHAR(5),
                    MONTANT_TTC DECIMAL(14,2),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID),
                    INDEX IX_${base-name}_DC (DOC_ID)
                    ) TYPE MYISAM
                </table>
                <table type="index" id="T_RA_5" base-name="PES_ALLER_RA_LIGNE_PIECE_PJREF" based-on="key4" version="1">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    NODE_ID VARCHAR(50) NOT NULL,
                    SUPPORT_PJ VARCHAR(2),
                    ID_UNIQUE_PJ VARCHAR(50),
                    NOM_PJ VARCHAR(100),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID),
                    INDEX IX_${base-name}_DC (DOC_ID)
                    ) TYPE MYISAM
                </table>
                <table type="index" id="T_RA_6" base-name="PES_ALLER_RA_LIGNE_PIECE_TIERS" based-on="key5" version="1">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    NODE_ID VARCHAR(50) NOT NULL,
                    ID_TIERS VARCHAR(30),
                    DATE_MALADE DATE,
                    NAT_ID_TIERS VARCHAR(2),
                    DATE_ID_TIERS DATE,
                    REF_TIERS VARCHAR(30),
                    CAT_TIERS VARCHAR(2),
                    NAT_JUR VARCHAR(2),
                    TYP_TIERS VARCHAR(2),
                    CIVILITE VARCHAR(10),
                    NOM VARCHAR(38),
                    COMPLEMENT_NOM VARCHAR(38),
                    PRENOM VARCHAR(38),
                    TYP_ADR VARCHAR(1),
                    ADR1 VARCHAR(38),
                    ADR2 VARCHAR(38),
                    ADR3 VARCHAR(38),
                    CP VARCHAR(5),
                    VILLE VARCHAR(38),
                    COD_RES VARCHAR(5),
                    COD_PAYS INTEGER,
                    DATE_ADR DATE,
                    RIB VARCHAR(23),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID),
                    INDEX IX_${base-name}_DC (DOC_ID)
                    ) TYPE MYISAM
                </table>
                <table type="index" id="T_RA_7" base-name="PES_ALLER_RA_LIGNE_PIECE_RECOUVREMENT" based-on="key6" version="1">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    NODE_ID VARCHAR(50) NOT NULL,
                    TYP_FLUX VARCHAR(2),
                    MODE_REGLEMENT VARCHAR(2),
                    DATE_RECOUVREMENT DATE,
                    ID_ENCAISSEMENT INTEGER,
                    MNT_RECOUVREMENT DECIMAL(14,2),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID),
                    INDEX IX_${base-name}_DC (DOC_ID)
                    ) TYPE MYISAM
                </table>
                <table type="index" id="recette_all_pj" base-name="PES_ALLER_RA_ALL_PJ" based-on="key7" version="1">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL,
                    BUDGET VARCHAR(24) NOT NULL,
                    DOC_ID VARCHAR(100) NOT NULL,
                    NODE_ID VARCHAR(50),
                    SUPPORT_PJ VARCHAR(2),
                    ID_UNIQUE_PJ VARCHAR(50),
                    NOM_PJ VARCHAR(100),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID),
                    INDEX IX_${base-name}_DC (DOC_ID)
                    ) TYPE MYISAM
                </table>
                

                <!-- CRITERIA BORDEREAU BLOC BORDEREAU -->
                <criteria id="bordereau_exercice" type="1" sql-index-id="SQI_RA_1">
                    <where-clause>${table}.${column}=##VALEUR:bordereau_exercice##</where-clause>
                </criteria>
                <criteria id="bordereau_id" type="1" sql-index-id="SQI_RA_2">
                    <where-clause>${table}.${column}##OPERATEUR:bordereau_id####VALEUR:bordereau_id##</where-clause>
                </criteria>
                <criteria id="bordereau_date_emission" type="1" sql-index-id="SQI_RA_3">
                    <where-clause>fn:date-compare(${table}.${column},bordereau_date_emission)</where-clause>
                </criteria>
                <criteria id="bordereau_type" type="1" sql-index-id="SQI_RA_4">
                    <where-clause>${table}.${column}='##VALEUR:bordereau_type##'</where-clause>
                </criteria>                
                <criteria id="bordereau_nb_pieces" type="1" sql-index-id="SQI_RA_5">
                    <where-clause>${table}.${column}##OPERATEUR:bordereau_nb_pieces####VALEUR:bordereau_nb_pieces##</where-clause>
                </criteria>
                <criteria id="bordereau_mt_cumul_annuel" type="1" sql-index-id="SQI_RA_6">
                    <where-clause>${table}.${column}##OPERATEUR:bordereau_mt_cumul_annuel####VALEUR:bordereau_mt_cumul_annuel##</where-clause>
                </criteria>
                <criteria id="bordereau_mt_bord_ht" type="1" sql-index-id="SQI_RA_7">
                    <where-clause>${table}.${column}##OPERATEUR:bordereau_mt_bord_ht####VALEUR:bordereau_mt_bord_ht##</where-clause>
                </criteria>
                <criteria id="bordereau_mt_bord_tva" type="1" sql-index-id="SQI_RA_8">
                    <where-clause>${table}.${column}##OPERATEUR:bordereau_mt_bord_tva####VALEUR:bordereau_mt_bord_tva##</where-clause>
                </criteria>
                <criteria id="bordereau_mt_bord_ttc" type="1" sql-index-id="SQI_RA_M4">
                    <where-clause>${table}.${column}##OPERATEUR:bordereau_mt_bord_ttc####VALEUR:bordereau_mt_bord_ttc##</where-clause>
                </criteria>
                <!-- CRITERIA PIECE -->
                <criteria id="piece_code_service" sql-index-id="SQI_RA_9" type="1">
                    <where-clause>fn:string-compare(${table}.${column},piece_code_service)</where-clause>
                </criteria>
                <criteria id="piece_affect" sql-index-id="SQI_RA_10" type="1">
                    <where-clause>fn:string-compare(${table}.${column},piece_affect)</where-clause>
                </criteria>
                <criteria id="piece_code_prod" type="1" sql-index-id="SQI_RA_11">
                    <where-clause>fn:string-compare(${table}.${column},piece_code_prod)</where-clause>
                </criteria>
                <criteria id="piece_id_pce" type="1" sql-index-id="SQI_RA_12">
                    <where-clause>${table}.${column}=##VALEUR:piece_id_pce##</where-clause>
                </criteria>
                <criteria id="piece_type_pce" type="1" sql-index-id="SQI_RA_13">
                    <where-clause>${table}.${column}='##VALEUR:piece_type_pce##'</where-clause>
                </criteria>
                <criteria id="piece_nat_pce" type="1" sql-index-id="SQI_RA_14">
                    <where-clause>${table}.${column}=&apos;##VALEUR:piece_nat_pce##&apos;</where-clause>
                </criteria>
                <criteria id="piece_id_rol" type="1" sql-index-id="SQI_RA_15">
                    <where-clause>${table}.${column}##OPERATEUR:piece_id_rol####VALEUR:piece_id_rol##</where-clause>
                </criteria>
                <criteria id="piece_dte_asp" type="1" sql-index-id="SQI_RA_16">
                    <where-clause>fn:date-compare(${table}.${column},piece_dte_asp)</where-clause>
                </criteria>
                <criteria id="piece_obj_pce" type="1" sql-index-id="SQI_RA_17">
                    <where-clause>fn:string-compare(${table}.${column},piece_obj_pce)</where-clause>
                </criteria>
                <criteria id="piece_deb_fact" type="1" sql-index-id="SQI_RA_18">
                    <where-clause>fn:date-compare(${table}.${column},piece_deb_fact)</where-clause>
                </criteria>
                <criteria id="piece_fin_fact" type="1" sql-index-id="SQI_RA_19">
                    <where-clause>fn:date-compare(${table}.${column},piece_fin_fact)</where-clause>
                </criteria>
                <criteria id="piece_montant_ttc" type="1" sql-index-id="SQI_RA_98">
                    <where-clause>${table}.${column}##OPERATEUR:piece_montant_ttc####VALEUR:piece_montant_ttc##</where-clause>
                </criteria>
                <criteria id="piece_montant_ht" type="1" sql-index-id="SQI_RA_M5">
                    <where-clause>${table}.${column}##OPERATEUR:piece_montant_ht####VALEUR:piece_montant_ht##</where-clause>
                </criteria>
                <criteria id="piece_avec_pj" type="1" sql-index-id="SQI_RA_M7">
                    <where-clause>${table}.${column}='##VALEUR:piece_avec_pj##'</where-clause>
                </criteria>
                <!-- CRITERIA PJREF PIECE -->
                <criteria id="piece_pjref_support" sql-index-id="SQI_RA_20" type="1">
                    <where-clause>fn:string-compare(${table}.${column},piece_pjref_support)</where-clause>
                </criteria>
                <criteria id="piece_pjref_id_unique" sql-index-id="SQI_RA_21" type="1">
                    <where-clause>fn:string-compare(${table}.${column},piece_pjref_id_unique)</where-clause>
                </criteria>
                <criteria id="piece_pjref_nom_pj" sql-index-id="SQI_RA_22" type="1">
                    <where-clause>fn:string-compare(${table}.${column},piece_pjref_nom_pj)</where-clause>
                </criteria>
                <!-- CRITERIA LIGNE PIECE -->
                <criteria id="ligne_piece_id" sql-index-id="SQI_RA_23" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_id)</where-clause>
                </criteria>
                <criteria id="ligne_piece_obj" sql-index-id="SQI_RA_24" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_obj)</where-clause>
                </criteria>
                <criteria id="ligne_piece_code_prod_loc" sql-index-id="SQI_RA_25" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_code_prod_loc)</where-clause>
                </criteria>
                <criteria id="ligne_piece_fin_geo" sql-index-id="SQI_RA_26" type="1">
                    <where-clause>${table}.${column}##OPERATEUR:ligne_piece_fin_geo####VALEUR:ligne_piece_fin_geo##</where-clause>
                </criteria>
                <criteria id="ligne_piece_code_et_geo" sql-index-id="SQI_RA_27" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_code_et_geo)</where-clause>
                </criteria>
                <criteria id="ligne_piece_nature" sql-index-id="SQI_RA_28" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_nature)</where-clause>
                </criteria>
                <criteria id="ligne_piece_fonction" sql-index-id="SQI_RA_29" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_fonction)</where-clause>
                </criteria>
                <criteria id="ligne_piece_operation" sql-index-id="SQI_RA_30" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_operation)</where-clause>
                </criteria>
                <criteria id="ligne_piece_cpt_ana" sql-index-id="SQI_RA_31" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_cpt_ana)</where-clause>
                </criteria>
                <criteria id="ligne_piece_facture" sql-index-id="SQI_RA_32" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_facture)</where-clause>
                </criteria>
                <criteria id="ligne_piece_tx_tva" sql-index-id="SQI_RA_33" type="1">
                    <where-clause>${table}.${column}##OPERATEUR:ligne_piece_tx_tva####VALEUR:ligne_piece_tx_tva##</where-clause>
                </criteria>
                <criteria id="ligne_piece_majo" sql-index-id="SQI_RA_34" type="1">
                    <where-clause>${table}.${column}='##VALEUR:ligne_piece_majo##'</where-clause>
                </criteria>
                <criteria id="ligne_piece_dte_majo" sql-index-id="SQI_RA_35" type="1">
                    <where-clause>fn:date-compare(${table}.${column},ligne_piece_dte_majo)</where-clause>
                </criteria>
                <criteria id="ligne_piece_tx_majo" sql-index-id="SQI_RA_36" type="1">
                    <where-clause>${table}.${column}##OPERATEUR:ligne_piece_tx_majo####VALEUR:ligne_piece_tx_majo##</where-clause>
                </criteria>
                <criteria id="ligne_piece_cpte_tiers" sql-index-id="SQI_RA_37" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_cpte_tiers)</where-clause>
                </criteria>
                <criteria id="ligne_piece_tva_intracom" sql-index-id="SQI_RA_38" type="1">
                    <where-clause>${table}.${column}='##VALEUR:ligne_piece_tva_intracom'</where-clause>
                </criteria>
                <criteria id="ligne_piece_cpte_tva" sql-index-id="SQI_RA_39" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_cpte_tva)</where-clause>
                </criteria>
                <criteria id="ligne_piece_mt_ht" sql-index-id="SQI_RA_40" type="1">
                    <where-clause>${table}.${column}##OPERATEUR:ligne_piece_mt_ht####VALEUR:ligne_piece_mt_ht##</where-clause>
                </criteria>
                <criteria id="ligne_piece_mt_tva" sql-index-id="SQI_RA_41" type="1">
                    <where-clause>${table}.${column}##OPERATEUR:ligne_piece_mt_tva####VALEUR:ligne_piece_mt_tva##</where-clause>
                </criteria>
                <criteria id="ligne_piece_mt_non_majo" sql-index-id="SQI_RA_42" type="1">
                    <where-clause>${table}.${column}##OPERATEUR:ligne_piece_mt_non_majo####VALEUR:ligne_piece_mt_non_majo##</where-clause>
                </criteria>
                <criteria id="ligne_piece_nat_prel" sql-index-id="SQI_RA_43" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_nat_prel)</where-clause>
                </criteria>
                <criteria id="ligne_piece_per_prel" sql-index-id="SQI_RA_44" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_per_prel)</where-clause>
                </criteria>
                <criteria id="ligne_piece_dte_prel" sql-index-id="SQI_RA_45" type="1">
                    <where-clause>fn:date-compare(${table}.${column},ligne_piece_dte_prel)</where-clause>
                </criteria>
                <criteria id="ligne_piece_mnt_prel" sql-index-id="SQI_RA_46" type="1">
                    <where-clause>${table}.${column}##OPERATEUR:ligne_piece_mt_prel####VALEUR:ligne_piece_mt_prel##</where-clause>
                </criteria>
                <criteria id="ligne_piece_cod_ass_deb" sql-index-id="SQI_RA_47" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_cod_ass_deb)</where-clause>
                </criteria>
                <criteria id="ligne_piece_cod_ayant_droit" sql-index-id="SQI_RA_48" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_cod_ayant_droit)</where-clause>
                </criteria>
                <criteria id="ligne_piece_nat_pce_orig" sql-index-id="SQI_RA_49" type="1">
                    <where-clause>${table}.${column}=##VALEUR:ligne_piece_nat_pce_orig##</where-clause>
                </criteria>
                <criteria id="ligne_piece_exer_rat" sql-index-id="SQI_RA_50" type="1">
                    <where-clause>${table}.${column}=##VALEUR:ligne_piece_exer_rat##</where-clause>
                </criteria>
                <criteria id="ligne_piece_id_pce_orig" sql-index-id="SQI_RA_51" type="1">
                    <where-clause>${table}.${column}##OPERATEUR:ligne_piece_id_pce_orig####VALEUR:ligne_piece_id_pce_orig##</where-clause>
                </criteria>
                <criteria id="ligne_piece_id_ligne_orig" sql-index-id="SQI_RA_52" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_id_ligne_orig)</where-clause>
                </criteria>
                <criteria id="ligne_piece_id_encaissement" sql-index-id="SQI_RA_53" type="1">
                    <where-clause>${table}.${column}##OPERATEUR:ligne_piece_id_encaissement####VALEUR:ligne_piece_id_encaissement##</where-clause>
                </criteria>
                <criteria id="ligne_piece_id_conv" sql-index-id="SQI_RA_54" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_id_conv)</where-clause>
                </criteria>
                <criteria id="ligne_piece_id_marche" sql-index-id="SQI_RA_55" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_id_marche)</where-clause>
                </criteria>
                <criteria id="ligne_piece_id_caution" sql-index-id="SQI_RA_56" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_id_caution)</where-clause>
                </criteria>
                <criteria id="ligne_piece_id_emprunt_ordo" sql-index-id="SQI_RA_57" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_id_emprunt_ordo)</where-clause>
                </criteria>
                <criteria id="ligne_piece_id_actif" sql-index-id="SQI_RA_58" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_id_actif)</where-clause>
                </criteria>
                <criteria id="ligne_piece_id_regie" sql-index-id="SQI_RA_59" type="1">
                    <where-clause>${table}.${column}=##VALEUR:ligne_piece_id_regie##</where-clause>
                </criteria>
                <criteria id="ligne_piece_mt_ttc" sql-index-id="SQI_RA_M6" type="1">
                    <where-clause>${table}.${column}##OPERATEUR:ligne_piece_mt_ttc####VALEUR:ligne_piece_mt_ttc##</where-clause>
                </criteria>
                <criteria id="justifie_par" sql-index-id="REC_ALLPJ_ID_UNIQUE">
                    <where-clause>fn:string-compare(${table}.${column},IdUnique)</where-clause>
                </criteria>
                
                
                <!-- CRITERIA PJREF LIGNE PIECE -->
                <criteria id="ligne_piece_pjref_support" sql-index-id="SQI_RA_60" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_pjref_support)</where-clause>
                </criteria>
                <criteria id="ligne_piece_pjref_id_unique" sql-index-id="SQI_RA_61" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_pjref_id_unique)</where-clause>
                </criteria>
                <criteria id="ligne_piece_pjref_nom_pj" sql-index-id="SQI_RA_62" type="1">
                    <where-clause>fn:string-compare(${table}.${column},ligne_piece_pjref_nom_pj)</where-clause>
                </criteria>
                <!-- CRITERIA TIERS -->
                <criteria id="tiers_id_tiers" sql-index-id="SQI_RA_63" type="1">
                    <where-clause>fn:string-compare(${table}.${column},tiers_id_tiers)</where-clause>
                </criteria>
                <criteria id="tiers_dte_malade" sql-index-id="SQI_RA_64" type="1">
                    <where-clause>fn:date-compare(${table}.${column},tiers_dte_malade)</where-clause>
                </criteria>
                <criteria id="tiers_nat_id_tiers" sql-index-id="SQI_RA_65" type="1">
                    <where-clause>fn:string-compare(${table}.${column},tiers_nat_id_tiers)</where-clause>
                </criteria>
                <criteria id="tiers_dte_id_tiers" sql-index-id="SQI_RA_66" type="1">
                    <where-clause>fn:date-compare(${table}.${column},tiers_dte_id_tiers)</where-clause>
                </criteria>
                <criteria id="tiers_ref_tiers" sql-index-id="SQI_RA_67" type="1">
                    <where-clause>fn:string-compare(${table}.${column},tiers_ref_tiers)</where-clause>
                </criteria>
                <criteria id="tiers_nat_jur" sql-index-id="SQI_RA_69" type="1">
                    <where-clause>fn:string-compare(${table}.${column},tiers_nat_jur)</where-clause>
                </criteria>
                <criteria id="tiers_typ_tiers" sql-index-id="SQI_RA_70" type="1">
                    <where-clause>fn:string-compare(${table}.${column},tiers_typ_tiers)</where-clause>
                </criteria>
                <criteria id="tiers_civilite" sql-index-id="SQI_RA_71" type="1">
                    <where-clause>fn:string-compare(${table}.${column},tiers_civilite)</where-clause>
                </criteria>
                <criteria id="tiers_nom" sql-index-id="SQI_RA_72" type="1">
                    <where-clause>fn:string-compare(${table}.${column},tiers_nom)</where-clause>
                </criteria>
                <criteria id="tiers_compl_nom" sql-index-id="SQI_RA_73" type="1">
                    <where-clause>fn:string-compare(${table}.${column},tiers_compl_nom)</where-clause>
                </criteria>
                <criteria id="tiers_prenom" sql-index-id="SQI_RA_74" type="1">
                    <where-clause>fn:string-compare(${table}.${column},tiers_prenom)</where-clause>
                </criteria>
                <criteria id="tiers_typ_adr" sql-index-id="SQI_RA_75" type="1">
                    <where-clause>fn:string-compare(${table}.${column},tiers_typ_adr)</where-clause>
                </criteria>
                <criteria id="tiers_adr1" sql-index-id="SQI_RA_76" type="1">
                    <where-clause>fn:string-compare(${table}.${column},tiers_adr1)</where-clause>
                </criteria>
                <criteria id="tiers_adr2" sql-index-id="SQI_RA_77" type="1">
                    <where-clause>fn:string-compare(${table}.${column},tiers_adr2)</where-clause>
                </criteria>
                <criteria id="tiers_adr3" sql-index-id="SQI_RA_78" type="1">
                    <where-clause>fn:string-compare(${table}.${column},tiers_adr3)</where-clause>
                </criteria>
                <criteria id="tiers_cp" sql-index-id="SQI_RA_79" type="1">
                    <where-clause>fn:string-compare(${table}.${column},tiers_cp)</where-clause>
                </criteria>
                <criteria id="tiers_ville" sql-index-id="SQI_RA_80" type="1">
                    <where-clause>fn:string-compare(${table}.${column},tiers_ville)</where-clause>
                </criteria>
                <criteria id="tiers_cod_res" sql-index-id="SQI_RA_81" type="1">
                    <where-clause>${table}.${column}='##VALEUR:tiers_cod_res'</where-clause>
                </criteria>
                <criteria id="tiers_cod_pays" sql-index-id="SQI_RA_82" type="1">
                    <where-clause>fn:string-compare(${table}.${column},tiers_cod_pays)</where-clause>
                </criteria>
                <criteria id="tiers_dte_adr" sql-index-id="SQI_RA_83" type="1">
                    <where-clause>fn:date-compare(${table}.${column},tiers_dte_adr)</where-clause>
                </criteria>
                <criteria id="tiers_rib" sql-index-id="SQI_RA_84" type="1">
                    <where-clause>fn:string-compare(${table}.${column},tiers_rib)</where-clause>
                </criteria>
                <!-- CRITERIA RECOUVREMENT -->
                <criteria id="recouvrement_typ_flux" sql-index-id="SQI_RA_85" type="1">
                    <where-clause>fn:string-compare(${table}.${column},recouvrement_typ_flux)</where-clause>
                </criteria>
                <criteria id="recouvrement_mod_regl" sql-index-id="SQI_RA_86" type="1">
                    <where-clause>fn:string-compare(${table}.${column},recouvrement_mod_regl)</where-clause>
                </criteria>
                <criteria id="recouvrement_dte_reco" sql-index-id="SQI_RA_87" type="1">
                    <where-clause>fn:date-compare(${table}.${column},recouvrement_dte_reco)</where-clause>
                </criteria>
                <criteria id="recouvrement_id_encaissement" sql-index-id="SQI_RA_88" type="1">
                    <where-clause>${table}.${column}##OPERATEUR:recouvrement_id_encaissement####VALEUR:recouvrement_id_encaissement##</where-clause>
                </criteria>
                <criteria id="recouvrement_mt_reco" sql-index-id="SQI_RA_89" type="1">
                    <where-clause>${table}.${column}##OPERATEUR:recouvrement_mt_reco####VALEUR:recouvrement_mt_reco##</where-clause>
                </criteria>         
                
                <!-- INDEX BORDEREAU BLOC BORDEREAU -->
                <sql-index id="SQI_RA_M0" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/@added:primary-key" datatype="string" column="PRIMARY_KEY" table="T_RA_1"/>
                <!--sql-index id="SQI_RA_M1" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/@added:primary-key" datatype="string" column="PRIMARY_KEY" table="T_RA_1"/-->
                <sql-index id="SQI_RA_1" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:BlocBordereau/n:Exer/@V" datatype="integer" table="T_RA_1" column="EXERCICE"/>
                <!--sql-index id="SQI_RA_1B" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:BlocBordereau/n:Exer/@V" datatype="integer" table="T_RA_1" column="EXERCICE"/-->
                <sql-index id="SQI_RA_2" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:BlocBordereau/n:IdBord/@V" datatype="integer" table="T_RA_1" column="ID_BORDEREAU"/>
                <sql-index id="SQI_RA_3" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:BlocBordereau/n:DteBordEm/@V" datatype="date" table="T_RA_1" column="DATE_EMISSION_BORDEREAU" format="yyyy-MM-dd"/>
                <sql-index id="SQI_RA_4" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:BlocBordereau/n:TypBord/@V" datatype="string" table="T_RA_1" column="TYPE_BORDEREAU"/>
                <!--sql-index id="SQI_RA_4B" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:BlocBordereau/n:TypBord/@V" datatype="string" table="T_RA_1" column="TYPE_BORDEREAU"/-->
                <sql-index id="SQI_RA_5" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:BlocBordereau/n:NbrPce/@V" datatype="integer" table="T_RA_1" column="NB_PIECES"/>
                <sql-index id="SQI_RA_6" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:BlocBordereau/n:MtCumulAnnuel/@V" datatype="decimal" table="T_RA_1" column="MT_CUMUL_ANNUEL"/>
                <sql-index id="SQI_RA_7" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:BlocBordereau/n:MtBordHt/@V" datatype="decimal" table="T_RA_1" column="MT_BOREREAU_HT"/>
                <sql-index id="SQI_RA_8" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:BlocBordereau/n:MtBordTVA/@V" datatype="decimal" table="T_RA_1" column="MT_BORDEREAU_TVA"/>
                <sql-index id="SQI_RA_M4" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/@added:montantTTC" datatype="decimal" table="T_RA_1" column="MONTANT_TTC"/>
                
                <!-- INDEX PIECE -->
                <sql-index id="SQI_RA_9" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:BlocPiece/n:CodServ/@V" datatype="string" table="T_RA_2" column="CODE_SERVICE" />
                <sql-index id="SQI_RA_10" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:BlocPiece/n:Affect/@V" datatype="string" table="T_RA_2" column="AFFECT" />
                <sql-index id="SQI_RA_11" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:BlocPiece/n:CodProd/@V" datatype="string" table="T_RA_2" column="CODE_PROD" />
                <sql-index id="SQI_RA_12" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:BlocPiece/n:IdPce/@V" datatype="integer" table="T_RA_2" column="ID_PIECE" />
                <sql-index id="SQI_RA_13" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:BlocPiece/n:TypPce/@V" datatype="string" table="T_RA_2" column="TYPE_PIECE" />
                <sql-index id="SQI_RA_14" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:BlocPiece/n:NatPce/@V" datatype="string" table="T_RA_2" column="NATURE_PIECE" />
                <sql-index id="SQI_RA_15" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:BlocPiece/n:IdRol/@V" datatype="integer" table="T_RA_2" column="ID_ROL" />
                <sql-index id="SQI_RA_16" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:BlocPiece/n:DteAsp/@V" datatype="date" table="T_RA_2" column="DATE_ASP" format="yyyy-MM-dd"/>
                <sql-index id="SQI_RA_17" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:BlocPiece/n:ObjPce/@V" datatype="string" table="T_RA_2" column="OBJ" />
                <sql-index id="SQI_RA_18" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:BlocPiece/n:DebFact/@V" datatype="date" table="T_RA_2" column="DEB_FACT" format="yyyy-MM-dd" />
                <sql-index id="SQI_RA_19" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:BlocPiece/n:FinFact/@V" datatype="date" table="T_RA_2" column="FIN_FACT" format="yyyy-MM-dd" />
                <sql-index id="SQI_RA_97" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/@added:nbLigne" datatype="integer" table="T_RA_2" column="NB_LIGNE"/>
                <sql-index id="SQI_RA_98" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/@added:montantTTC" datatype="decimal" table="T_RA_2" column="MONTANT_TTC"/>
                <sql-index id="SQI_RA_M5" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/@added:montantHT" datatype="decimal" table="T_RA_2" column="MONTANT_HT"/>
                <sql-index id="SQI_RA_M7" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/@added:avecPJ" datatype="string" table="T_RA_2" column="AVEC_PJ"/>
                <!-- INDEX PJREF PIECE -->
                <sql-index id="SQI_RA_20" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:BlocPiece/n:PJRef/n:Support/@V" column="SUPPORT_PJ" datatype="string" table="T_RA_3"/>
                <sql-index id="SQI_RA_21" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:BlocPiece/n:PJRef/n:IdUnique/@V" column="ID_UNIQUE_PJ" datatype="string" table="T_RA_3"/>
                <sql-index id="SQI_RA_22" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:BlocPiece/n:PJRef/n:NomPJ/@V" column="NOM_PJ" datatype="string" table="T_RA_3"/>
                <!-- INDEX LIGNE PIECE -->
                <sql-index id="SQI_RA_23" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePiece/n:IdLigne/@V" datatype="string" column="ID_LIGNE" table="T_RA_4"/>
                <sql-index id="SQI_RA_24" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePiece/n:ObjLignePce/@V" datatype="string" column="OBJET" table="T_RA_4"/>
                <sql-index id="SQI_RA_25" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePiece/n:CodProdLoc/@V" datatype="string" column="CODE_PROD" table="T_RA_4"/>
                <sql-index id="SQI_RA_26" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePiece/n:FinGeo/@V" datatype="integer" column="FIN_GEO" table="T_RA_4"/>
                <sql-index id="SQI_RA_27" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePiece/n:CodEtGeo/@V" datatype="string" column="COD_ET_GEO" table="T_RA_4"/>
                <sql-index id="SQI_RA_28" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePiece/n:Nature/@V" datatype="string" column="NATURE" table="T_RA_4"/>
                <sql-index id="SQI_RA_29" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePiece/n:Fonction/@V" datatype="string" column="FONCTION" table="T_RA_4"/>
                <sql-index id="SQI_RA_30" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePiece/n:Operation/@V" datatype="string" column="OPERATION" table="T_RA_4"/>
                <sql-index id="SQI_RA_31" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePiece/n:CptAna/@V" datatype="string" column="COMPTE_ANA" table="T_RA_4"/>
                <sql-index id="SQI_RA_32" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePiece/n:Facture/@V" datatype="string" column="FACTURE" table="T_RA_4"/>
                <sql-index id="SQI_RA_33" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePiece/n:TxTva/@V" datatype="decimal" column="TAUX_TVA" table="T_RA_4"/>
                <sql-index id="SQI_RA_34" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePiece/n:Majo/@V" datatype="string" column="MAJO" table="T_RA_4"/>
                <sql-index id="SQI_RA_35" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePiece/n:DteMajo/@V" datatype="date" column="DATE_MAJO" table="T_RA_4" format="yyyy-MM-dd"/>
                <sql-index id="SQI_RA_36" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePiece/n:TxMajo/@V" datatype="decimal" column="TAUX_MAJO" table="T_RA_4"/>
                <sql-index id="SQI_RA_37" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePiece/n:CpteTiers/@V" datatype="string" column="COMPTE_TIERS" table="T_RA_4"/>
                <sql-index id="SQI_RA_38" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePiece/n:TvaIntraCom/@V" datatype="string" column="TVA_INTRA_COM" table="T_RA_4"/>
                <sql-index id="SQI_RA_39" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePiece/n:CpteTVA/@V" datatype="string" column="COMPTE_TVA" table="T_RA_4"/>
                <sql-index id="SQI_RA_40" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePiece/n:MtHT/@V" datatype="decimal" column="MT_HT" table="T_RA_4"/>
                <sql-index id="SQI_RA_41" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePiece/n:MtTVA/@V" datatype="decimal" column="MT_TVA" table="T_RA_4"/>
                <sql-index id="SQI_RA_42" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePiece/n:MtNonMajo/@V" datatype="decimal" column="MT_NON_MAJO" table="T_RA_4"/>
                <sql-index id="SQI_RA_43" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoPrelevement/n:NatPrel/@V" datatype="string" column="NAT_PREL" table="T_RA_4"/>
                <sql-index id="SQI_RA_44" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoPrelevement/n:PerPrel/@V" datatype="string" column="PER_PREL" table="T_RA_4"/>
                <sql-index id="SQI_RA_45" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoPrelevement/n:DtePrel/@V" datatype="date" column="DATE_PREL" table="T_RA_4" format="yyyy-MM-dd"/>
                <sql-index id="SQI_RA_46" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoPrelevement/n:MtPrel/@V" datatype="decimal" column="MNT_PREL" table="T_RA_4"/>
                <sql-index id="SQI_RA_47" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoAssure/n:CodAssDeb/@V" datatype="string" column="COD_ASS_DEB" table="T_RA_4"/>
                <sql-index id="SQI_RA_48" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoAssure/n:CodAyantDroit/@V" datatype="string" column="COD_AYANT_DROIT" table="T_RA_4"/>
                <sql-index id="SQI_RA_49" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:RattachPiece/n:NatPceOrig/@V" datatype="string" column="NATURE_PIECE_ORIGINE" table="T_RA_4"/>
                <sql-index id="SQI_RA_50" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:RattachPiece/n:ExerRat/@V" datatype="string" column="EXERCICE_RAT" table="T_RA_4"/>
                <sql-index id="SQI_RA_51" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:RattachPiece/n:IdPceOrig/@V" datatype="integer" column="ID_PIECE_ORIGINE" table="T_RA_4"/>
                <sql-index id="SQI_RA_52" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:RattachPiece/n:IdLigneOrig/@V" datatype="string" column="ID_LIGNE_ORIGINE" table="T_RA_4"/>
                <sql-index id="SQI_RA_53" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:LiensIdent/n:IdEncaissement/@V" datatype="string" column="ID_ENCAISSEMENT" table="T_RA_4"/>
                <sql-index id="SQI_RA_54" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:LiensIdent/n:IdConv/@V" datatype="string" column="ID_CONV" table="T_RA_4"/>
                <sql-index id="SQI_RA_55" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:LiensIdent/n:IdMarche/@V" datatype="string" column="ID_MARCHE" table="T_RA_4"/>
                <sql-index id="SQI_RA_56" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:LiensIdent/n:IdCaution/@V" datatype="string" column="ID_CAUTION" table="T_RA_4"/>
                <sql-index id="SQI_RA_57" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:LiensIdent/n:IdEmpruntOrdo/@V" datatype="string" column="ID_EMPRUNT_ORDO" table="T_RA_4"/>
                <sql-index id="SQI_RA_58" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:LiensIdent/n:IdActif/@V" datatype="string" column="ID_ACTIF" table="T_RA_4"/>
                <sql-index id="SQI_RA_59" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:LiensIdent/n:IdRegie/@V" datatype="string" column="ID_REGIE" table="T_RA_4"/>
                <sql-index id="SQI_RA_M6" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/@added:montantTTC" datatype="decimal" column="MONTANT_TTC" table="T_RA_4"/>
                <!-- INDEX PJREF LIGNE PIECE -->
                <sql-index id="SQI_RA_60" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePiece/n:PJRef/n:Support/@V" column="SUPPORT_PJ" datatype="string" table="T_RA_5"/>
                <sql-index id="SQI_RA_61" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePiece/n:PJRef/n:IdUnique" column="ID_UNIQUE_PJ" datatype="string" table="T_RA_5"/>
                <sql-index id="SQI_RA_62" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePiece/n:PJRef/n:NomPJ" column="NOM_PJ" datatype="string" table="T_RA_5"/>
                <!--  INDEX TIERS -->
                <sql-index id="SQI_RA_63" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:InfoTiers/n:IdTiers/@V" datatype="string" column="ID_TIERS" table="T_RA_6"/>
                <sql-index id="SQI_RA_64" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:InfoTiers/n:DteMalade/@V" datatype="date" column="DATE_MALADE" table="T_RA_6" format="yyyy-MM-dd"/>
                <sql-index id="SQI_RA_65" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:InfoTiers/n:NatIdTiers/@V" datatype="string" column="NAT_ID_TIERS" table="T_RA_6"/>
                <sql-index id="SQI_RA_66" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:InfoTiers/n:DteIdTiers/@V" datatype="date" column="DATE_ID_TIERS" table="T_RA_6" format="yyyy-MM-dd"/>
                <sql-index id="SQI_RA_67" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:InfoTiers/n:RefTiers/@V" datatype="string" column="REF_TIERS" table="T_RA_6"/>
                <sql-index id="SQI_RA_68" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:InfoTiers/n:CatTiers/@V" datatype="string" column="CAT_TIERS" table="T_RA_6"/>
                <sql-index id="SQI_RA_69" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:InfoTiers/n:NatJur/@V" datatype="string" column="NAT_JUR" table="T_RA_6"/>
                <sql-index id="SQI_RA_70" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:InfoTiers/n:TypTiers/@V" datatype="string" column="TYP_TIERS" table="T_RA_6"/>
                <sql-index id="SQI_RA_71" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:InfoTiers/n:Civilite/@V" datatype="string" column="CIVILITE" table="T_RA_6"/>
                <sql-index id="SQI_RA_72" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:InfoTiers/n:Nom/@V" datatype="string" column="NOM" table="T_RA_6"/>
                <sql-index id="SQI_RA_73" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:InfoTiers/n:ComplNom/@V" datatype="string" column="COMPLEMENT_NOM" table="T_RA_6"/>
                <sql-index id="SQI_RA_74" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:InfoTiers/n:Prenom/@V" datatype="string" column="PRENOM" table="T_RA_6"/>
                <sql-index id="SQI_RA_75" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:Adresse/n:TypAdr/@V" datatype="string" column="TYP_ADR" table="T_RA_6"/>
                <sql-index id="SQI_RA_76" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:Adresse/n:Adr1/@V" datatype="string" column="ADR1" table="T_RA_6"/>
                <sql-index id="SQI_RA_77" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:Adresse/n:Adr2/@V" datatype="string" column="ADR2" table="T_RA_6"/>
                <sql-index id="SQI_RA_78" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:Adresse/n:Adr3/@V" datatype="string" column="ADR3" table="T_RA_6"/>
                <sql-index id="SQI_RA_79" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:Adresse/n:CP/@V" datatype="string" column="CP" table="T_RA_6"/>
                <sql-index id="SQI_RA_80" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:Adresse/n:Ville/@V" datatype="string" column="VILLE" table="T_RA_6"/>
                <sql-index id="SQI_RA_81" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:Adresse/n:CodRes/@V" datatype="string" column="COD_RES" table="T_RA_6"/>
                <sql-index id="SQI_RA_82" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:Adresse/n:CodPays/@V" datatype="string" column="COD_PAYS" table="T_RA_6"/>
                <sql-index id="SQI_RA_83" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:Adresse/n:DteAdr/@V" datatype="date" column="DATE_ADR" table="T_RA_6" format="yyyy-MM-dd"/>
                <sql-index id="SQI_RA_84" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/n:CpteBancaire/@added:rib" datatype="string" column="RIB" table="T_RA_6"/>
                <!-- INDEX RECOUVREMENT  -->
                <sql-index id="SQI_RA_85" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Recouvrement/n:TypFlux/@V" datatype="string" column="TYP_FLUX" table="T_RA_7"/>
                <sql-index id="SQI_RA_86" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Recouvrement/n:ModRegl/@V" datatype="string" column="MODE_REGLEMENT" table="T_RA_7"/>
                <sql-index id="SQI_RA_87" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Recouvrement/n:DteReco/@V" datatype="date" column="DATE_RECOUVREMENT" table="T_RA_7" format="yyyy-MM-dd"/>
                <sql-index id="SQI_RA_88" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Recouvrement/n:IdEncaissement/@V" datatype="integer" column="ID_ENCAISSEMENT" table="T_RA_7"/>
                <sql-index id="SQI_RA_89" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Recouvrement/n:MtReco/@V" datatype="decimal" column="MNT_RECOUVREMENT" table="T_RA_7"/>
                
                <!--sql-index id="SQI_RA_90" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/@added:generated-id" column="NODE_ID" datatype="string" table="T_RA_1"/n:-->
                <sql-index id="SQI_RA_91" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/@added:generated-id" column="NODE_ID" datatype="string" table="T_RA_2"/>
                <sql-index id="SQI_RA_92" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:BlocPiece/n:PJRef/@added:generated-id" column="NODE_ID" datatype="string" table="T_RA_3"/>
                <sql-index id="SQI_RA_93" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/@added:generated-id" column="NODE_ID" datatype="string" table="T_RA_4"/>
                <sql-index id="SQI_RA_94" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:BlocLignePiece/n:InfoLignePiece/n:PJRef/@added:generated-id" column="NODE_ID" datatype="string" table="T_RA_5"/>
                <sql-index id="SQI_RA_95" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Tiers/@added:generated-id" column="NODE_ID" datatype="string" table="T_RA_6"/>
                <sql-index id="SQI_RA_96" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:LigneDePiece/n:Recouvrement/@added:generated-id" column="NODE_ID" datatype="string" table="T_RA_7"/>
                <!--sql-index id="SQI_RA_M2" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:BlocBordereau/n:IdBord/@V" datatype="integer" table="T_RA_1" column="ID_BORDEREAU"/-->
                <!--sql-index id="SQI_RA_M3" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:BlocPiece/n:IdPce/@V" column="ID_PIECE" datatype="string" table="T_RA_2"/-->
                <!-- ALL PJ -->
                <sql-index id="REC_ALLPJ_NODE" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:added:AllPJRef/@added:generated-id" datatype="string" column="NODE_ID" table="recette_all_pj"/>
                <sql-index id="REC_ALLPJ_SUPPORT" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:added:AllPJRef/n:Support/@V" datatype="string" column="SUPPORT_PJ" table="recette_all_pj"/>
                <sql-index id="REC_ALLPJ_ID_UNIQUE" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:added:AllPJRef/n:IdUnique/@V" datatype="string" column="ID_UNIQUE_PJ" table="recette_all_pj"/>
                <sql-index id="REC_ALLPJ_NOM_PJ" path="/n:PES_Aller/n:PES_RecetteAller/n:Bordereau/n:Piece/n:added:AllPJRef/n:NomPJ/@V" datatype="string" column="NOM_PJ" table="recette_all_pj"/>
                
                <element id="PieceRecette">
                    <sql-count>COUNT(DISTINCT(CONCAT(PES_ALLER_RA_PIECE_IX.DOC_ID , PES_ALLER_RA_PIECE_IX.NODE_ID , PES_ALLER_RA_PIECE_IX.ID_PIECE)))</sql-count>
                    <special-cond>PES_ALLER_RA_PIECE_IX.NODE_ID IS NOT NULL</special-cond>
                </element>
                <element id="LigneDePieceRecette">
                    <sql-count>COUNT(DISTINCT(CONCAT(PES_ALLER_RA_BORDEREAU_IX.DOC_ID,PES_ALLER_RA_LIGNE_PIECE_IX.NODE_ID)))</sql-count>
                    <special-cond>PES_ALLER_RA_LIGNE_PIECE_IX.NODE_ID IS NOT NULL</special-cond>
                </element>
                <element id="tiers">
                    <sql-count>COUNT(DISTINCT(CONCAT(PES_ALLER_RA_BORDEREAU_IX.DOC_ID,PES_ALLER_RA_LIGNE_PIECE_TIERS.NODE_ID)))</sql-count>
                    <special-cond>PES_ALLER_RA_LIGNE_PIECE_TIERS.NODE_ID IS NOT NULL</special-cond>
                </element>
                <element id="recouvrement">
                    <sql-count>COUNT(DISTINCT(CONCAT(PES_ALLER_RA_BORDEREAU_IX.DOC_ID,PES_ALLER_RA_LIGNE_PIECE_RECOUVREMENT.NODE_ID)))</sql-count>
                    <special-cond>PES_ALLER_RA_LIGNE_PIECE_RECOUVREMENT.NODE_ID IS NOT NULL</special-cond>
                </element>
            </etat>

            <etat id="PES_PJ" import-xslt-file="PES_V2/PES-PJ-import-mysql.xsl" >
                <key1>
                    <path>/n:PES_Aller/n:PES_PJ/@added:generated-id</path>
                </key1>
                <key2>
                    <path>/n:PES_Aller/n:PES_PJ/n:PJ/@added:generated-id</path>
                </key2>
                <key3>
                    <path>/n:PES_Aller/n:PES_PJ/n:PJ/n:RefCompta/@added:generated-id</path>
                </key3>
                
                <table type="document" base-name="PES_PJ_DOCUMENTS" version="1">
                    CREATE TABLE IF NOT EXISTS ${base-name} ( 
                    COLLECTIVITE VARCHAR(15) NOT NULL, 
                    BUDGET VARCHAR(24) NOT NULL, 
                    INITIAL_DOC_NAME VARCHAR(100) NOT NULL, 
                    DOC_ID VARCHAR(100) NOT NULL, 
                    DOC LONGBLOB, 
                    ENCODING VARCHAR(20), 
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID) 
                    ) TYPE MYISAM
                </table>
                <table type="index" id="PES_PJ_PES_ALLER_PES_PJ_IX" base-name="PES_PJ_PES_ALLER_PES_PJ_IX" version="1" main="true" based-on="key1">
                    CREATE TABLE IF NOT EXISTS ${base-name} ( 
                    COLLECTIVITE VARCHAR(15) NOT NULL, 
                    BUDGET VARCHAR(24) NOT NULL, 
                    DOC_ID VARCHAR(100) NOT NULL, 
                    NODE_ID VARCHAR(50) NOT NULL, 
                    IDVER INTEGER ,
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID), 
                    INDEX IX_${base-name}_DC (DOC_ID) 
                    ) TYPE MYISAM
                </table>
                <table type="index" id="PES_PJ_PJ_IX" base-name="PES_PJ_PJ_IX" version="1" main="false" based-on="key2">
                    CREATE TABLE IF NOT EXISTS ${base-name} ( 
                    COLLECTIVITE VARCHAR(15) NOT NULL, 
                    BUDGET VARCHAR(24) NOT NULL, 
                    DOC_ID VARCHAR(100) NOT NULL, 
                    NODE_ID VARCHAR(50) NOT NULL, 
                    TYPEPJ VARCHAR(3) ,
                    NOMPJ VARCHAR(100) ,
                    DESCRIPTION VARCHAR(250) ,
                    IDUNIQUE VARCHAR(50) ,
                    SERVEURID VARCHAR(20) ,
                    LIBTYPEPJ VARCHAR(100),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID), 
                    INDEX IX_${base-name}_DC (DOC_ID) 
                    ) TYPE MYISAM
                </table>
                <table type="index" id="PES_PJ_PJ_REFCOMPTA_IX" base-name="PES_PJ_PJ_REFCOMPTA_IX" version="1" main="false" based-on="key3">
                    CREATE TABLE IF NOT EXISTS ${base-name} ( 
                    COLLECTIVITE VARCHAR(15) NOT NULL, 
                    BUDGET VARCHAR(24) NOT NULL, 
                    DOC_ID VARCHAR(100) NOT NULL, 
                    NODE_ID VARCHAR(50) NOT NULL, 
                    IDENTIFIANT VARCHAR(20) ,
                    TYPEOBJET INTEGER ,
                    EXERCICE VARCHAR(255) ,
                    DOMAINE VARCHAR(255) ,
                    IDTIERS VARCHAR(30) ,
                    CODPROD VARCHAR(2) ,
                    COMPLEMENTIDENTIFIANT VARCHAR(20) ,
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID), 
                    INDEX IX_${base-name}_DC (DOC_ID) 
                    ) TYPE MYISAM
                </table>
                
                
                <!-- CRITERIA /n:PES_Aller/n:PES_PJ -->
                <criteria id="CRI_PES_PJ_PES_PJ_IDVER" type="1" sql-index-id="SQI_PES_PJ_PES_PJ_IDVER">
                    <where-clause>${table}.${column}##OPERATEUR:IdVer####VALEUR:IdVer##</where-clause>
                </criteria>
                
                <!-- CRITERIA /n:PES_Aller/n:PES_PJ/n:PJ -->
                <criteria id="CRI_PES_PJ_PJ_TYPEPJ" type="1" sql-index-id="SQI_PES_PJ_PJ_TYPEPJ">
                    <where-clause>${table}.${column}=##VALEUR:TypePJ##</where-clause>
                </criteria>
                <criteria id="_CRI_PES_PJ_PJ_LIBTYPEPJ" type="1" sql-index-id="SQI_PES_PJ_PJ_LIBTYPEPJ">
                	<where-clause>${table}.$#column}=##VALEUR:LibTypePJ##</where-clause>
                </criteria>
                <criteria id="CRI_PES_PJ_PJ_NOMPJ" type="1" sql-index-id="SQI_PES_PJ_PJ_NOMPJ">
                    <where-clause>fn:string-compare(${table}.${column},NomPJ)</where-clause>
                </criteria>
                <criteria id="CRI_PES_PJ_PJ_DESCRIPTION" type="1" sql-index-id="SQI_PES_PJ_PJ_DESCRIPTION">
                    <where-clause>fn:string-compare(${table}.${column},Description)</where-clause>
                </criteria>
                <criteria id="CRI_PES_PJ_PJ_IDUNIQUE" type="1" sql-index-id="SQI_PES_PJ_PJ_IDUNIQUE">
                    <where-clause>fn:string-compare(${table}.${column},IdUnique)</where-clause>
                </criteria>
                <criteria id="CRI_PES_PJ_PJ_SERVEURID" type="1" sql-index-id="SQI_PES_PJ_PJ_SERVEURID">
                    <where-clause>fn:string-compare(${table}.${column},ServeurId)</where-clause>
                </criteria>
                
                <!-- CRITERIA /n:PES_Aller/n:PES_PJ/n:PJ/n:RefCompta -->
                <criteria id="CRI_PES_PJ_PJ_REFCOMPTA_IDENTIFIANT" type="1" sql-index-id="SQI_PES_PJ_PJ_REFCOMPTA_IDENTIFIANT">
                    <where-clause>fn:string-compare(${table}.${column},Identifiant)</where-clause>
                </criteria>
                <criteria id="CRI_PES_PJ_PJ_REFCOMPTA_TYPEOBJET" type="1" sql-index-id="SQI_PES_PJ_PJ_REFCOMPTA_TYPEOBJET">
                    <where-clause>${table}.${column}##OPERATEUR:TypeObjet####VALEUR:TypeObjet##</where-clause>
                </criteria>
                <criteria id="CRI_PES_PJ_PJ_REFCOMPTA_EXERCICE" type="1" sql-index-id="SQI_PES_PJ_PJ_REFCOMPTA_EXERCICE">
                    <where-clause>fn:string-compare(${table}.${column},Exercice)</where-clause>
                </criteria>
                <criteria id="CRI_PES_PJ_PJ_REFCOMPTA_DOMAINE" type="1" sql-index-id="SQI_PES_PJ_PJ_REFCOMPTA_DOMAINE">
                    <where-clause>fn:string-compare(${table}.${column},Domaine)</where-clause>
                </criteria>
                <criteria id="CRI_PES_PJ_PJ_REFCOMPTA_IDTIERS" type="1" sql-index-id="SQI_PES_PJ_PJ_REFCOMPTA_IDTIERS">
                    <where-clause>fn:string-compare(${table}.${column},IdTiers)</where-clause>
                </criteria>
                <criteria id="CRI_PES_PJ_PJ_REFCOMPTA_CODPROD" type="1" sql-index-id="SQI_PES_PJ_PJ_REFCOMPTA_CODPROD">
                    <where-clause>fn:string-compare(${table}.${column},CodProd)</where-clause>
                </criteria>
                <criteria id="CRI_PES_PJ_PJ_REFCOMPTA_COMPLEMENTIDENTIFIANT" type="1" sql-index-id="SQI_PES_PJ_PJ_REFCOMPTA_COMPLEMENTIDENTIFIANT">
                    <where-clause>fn:string-compare(${table}.${column},ComplementIdentifiant)</where-clause>
                </criteria>
                
                
                <!-- SQL-INDEX /n:PES_Aller/n:PES_PJ -->
                <sql-index id="SQI_PES_PJ_PES_PJ__NODE_ID" path="/n:PES_Aller/n:PES_PJ/@added:generated-id" column="NODE_ID" datatype="string" table="PES_PJ_PES_ALLER_PES_PJ_IX"/>
                <sql-index id="SQI_PES_PJ_PES_PJ_IDVER" path="/n:PES_Aller/n:PES_PJ/n:EnTetePES_PJ/n:IdVer/@V" datatype="integer" column="IDVER" table="PES_PJ_PES_ALLER_PES_PJ_IX" />
                
                <!-- SQL-INDEX /n:PES_Aller/n:PES_PJ/n:PJ -->
                <sql-index id="SQI_PES_PJ_PJ__NODE_ID" path="/n:PES_Aller/n:PES_PJ/n:PJ/@added:generated-id" column="NODE_ID" datatype="string" table="PES_PJ_PJ_IX"/>
                <sql-index id="SQI_PES_PJ_PJ_TYPEPJ" path="/n:PES_Aller/n:PES_PJ/n:PJ/n:TypePJ/@V" datatype="string" column="TYPEPJ" table="PES_PJ_PJ_IX" />
                <sql-index id="SQI_PES_PJ_PJ_LIBTYPEPJ" path="/n:PES_Aller/n:PES_PJ/n:PJ/@LibTypePJ" datatype="string" column="LIBTYPEPJ" table="PES_PJ_PJ_IX" />
                <sql-index id="SQI_PES_PJ_PJ_NOMPJ" path="/n:PES_Aller/n:PES_PJ/n:PJ/n:NomPJ/@V" datatype="string" column="NOMPJ" table="PES_PJ_PJ_IX" />
                <sql-index id="SQI_PES_PJ_PJ_DESCRIPTION" path="/n:PES_Aller/n:PES_PJ/n:PJ/n:Description/@V" datatype="string" column="DESCRIPTION" table="PES_PJ_PJ_IX" />
                <sql-index id="SQI_PES_PJ_PJ_IDUNIQUE" path="/n:PES_Aller/n:PES_PJ/n:PJ/n:IdUnique/@V" datatype="string" column="IDUNIQUE" table="PES_PJ_PJ_IX" />
                <sql-index id="SQI_PES_PJ_PJ_SERVEURID" path="/n:PES_Aller/n:PES_PJ/n:PJ/n:ServeurId/@V" datatype="string" column="SERVEURID" table="PES_PJ_PJ_IX" />
                
                <!-- SQL-INDEX /n:PES_Aller/n:PES_PJ/n:PJ/n:RefCompta -->
                <sql-index id="SQI_PES_PJ_PJ_REFCOMPTA__NODE_ID" path="/n:PES_Aller/n:PES_PJ/n:PJ/n:RefCompta/@added:generated-id" column="NODE_ID" datatype="string" table="PES_PJ_PJ_REFCOMPTA_IX"/>
                <sql-index id="SQI_PES_PJ_PJ_REFCOMPTA_IDENTIFIANT" path="/n:PES_Aller/n:PES_PJ/n:PJ/n:RefCompta/n:Identifiant/@V" datatype="string" column="IDENTIFIANT" table="PES_PJ_PJ_REFCOMPTA_IX" />
                <sql-index id="SQI_PES_PJ_PJ_REFCOMPTA_TYPEOBJET" path="/n:PES_Aller/n:PES_PJ/n:PJ/n:RefCompta/n:TypeObjet/@V" datatype="integer" column="TYPEOBJET" table="PES_PJ_PJ_REFCOMPTA_IX" />
                <sql-index id="SQI_PES_PJ_PJ_REFCOMPTA_EXERCICE" path="/n:PES_Aller/n:PES_PJ/n:PJ/n:RefCompta/n:Exercice/@V" datatype="string" column="EXERCICE" table="PES_PJ_PJ_REFCOMPTA_IX" />
                <sql-index id="SQI_PES_PJ_PJ_REFCOMPTA_DOMAINE" path="/n:PES_Aller/n:PES_PJ/n:PJ/n:RefCompta/n:Domaine/@V" datatype="string" column="DOMAINE" table="PES_PJ_PJ_REFCOMPTA_IX" />
                <sql-index id="SQI_PES_PJ_PJ_REFCOMPTA_IDTIERS" path="/n:PES_Aller/n:PES_PJ/n:PJ/n:RefCompta/n:IdTiers/@V" datatype="string" column="IDTIERS" table="PES_PJ_PJ_REFCOMPTA_IX" />
                <sql-index id="SQI_PES_PJ_PJ_REFCOMPTA_CODPROD" path="/n:PES_Aller/n:PES_PJ/n:PJ/n:RefCompta/n:CodProd/@V" datatype="string" column="CODPROD" table="PES_PJ_PJ_REFCOMPTA_IX" />
                <sql-index id="SQI_PES_PJ_PJ_REFCOMPTA_COMPLEMENTIDENTIFIANT" path="/n:PES_Aller/n:PES_PJ/n:PJ/n:RefCompta/n:ComplementIdentifiant/@V" datatype="string" column="COMPLEMENTIDENTIFIANT" table="PES_PJ_PJ_REFCOMPTA_IX" />
                
                <element id="PES_ALLER_PES_PJ_PJ_IX"> 
                    <sql-count>COUNT(DISTINCT(CONCAT(PES_ALLER_PES_PJ_IX.DOC_ID,PES_ALLER_PES_PJ_PJ_IX.NODE_ID)))</sql-count>
                    <special-cond>PES_ALLER_PES_PJ_PJ_IX.NODE_ID IS NOT NULL</special-cond>
                </element>
                <element id="PES_ALLER_PES_PJ_PJ_REFCOMPTA_IX"> 
                    <sql-count>COUNT(DISTINCT(CONCAT(PES_ALLER_PES_PJ_IX.DOC_ID,PES_ALLER_PES_PJ_PJ_REFCOMPTA_IX.NODE_ID)))</sql-count>
                    <special-cond>PES_ALLER_PES_PJ_PJ_REFCOMPTA_IX.NODE_ID IS NOT NULL</special-cond>
                </element>
                
            </etat>
                                    
        </document>
    </layer>
</persistence-config>
