<?xml version="1.0" encoding="ISO-8859-1"?>
<VUE name="COMPTA000059" label="Analyse par critère" title="= 'Comptabilité Générale ' + SELECT.CH_LABEL + '. Analyse par ' + SELECT.GROUPBY_LABEL  + ' (' + SELECT.MOIS_LABEL + ' - ' + SELECT.TOMOIS_LABEL + ')'" database="iCTI" swf="*CTI_view1" globals="COMPTA_globals.XML" dboptimizer="COMPTA_dboptimizer.XML" componentsFile="COMPTA_components.XML" softCode="iCTI_compta" helpFile="iCTI_COMPTA_COMPTA000059.HTML">
	<VIEWPROPERTIES componentName="MULTICRITERES_PROPERTIES"/>
	<VIEWPROPERTIES>
		<PROPERTY name="ARBRE2_PADDING" value="[EVAL 
			$padding = 0;
			if ('[ARBRE1]' != '-1') {
				$padding = $padding + 1;
			}
			return $padding;
		EVAL]"/>
		<PROPERTY name="ARBRE3_PADDING" value="[EVAL 
			$padding = 0;
			if ('[ARBRE1]' != '-1') {
				$padding = $padding + 1;
			}
			if ('[ARBRE2]' != '-1') {
				$padding = $padding + 1;
			}
			return $padding;
		EVAL]"/>
		<PROPERTY name="ARBRE4_PADDING" value="[EVAL 
			$padding = 0;
			if ('[ARBRE1]' != '-1') {
				$padding = $padding + 1;
			}
			if ('[ARBRE2]' != '-1') {
				$padding = $padding + 1;
			}
			if ('[ARBRE3]' != '-1') {
				$padding = $padding + 1;
			}
			return $padding;
		EVAL]"/>
		<PROPERTY name="ARBRE5_PADDING" value="[EVAL 
			$padding = 0;
			if ('[ARBRE1]' != '-1') {
				$padding = $padding + 1;
			}
			if ('[ARBRE2]' != '-1') {
				$padding = $padding + 1;
			}
			if ('[ARBRE3]' != '-1') {
				$padding = $padding + 1;
			}
			if ('[ARBRE4]' != '-1') {
				$padding = $padding + 1;
			}
			return $padding;
		EVAL]"/>
		<PROPERTY name="GROUPBY_PADDING" value="[EVAL 
			$padding = 0;
			if ('[ARBRE1]' != '-1') {
				$padding = $padding + 1;
			}
			if ('[ARBRE2]' != '-1') {
				$padding = $padding + 1;
			}
			if ('[ARBRE3]' != '-1') {
				$padding = $padding + 1;
			}
			if ('[ARBRE4]' != '-1') {
				$padding = $padding + 1;
			}
			if ('[ARBRE5]' != '-1') {
				$padding = $padding + 1;
			}
			return $padding;
		EVAL]"/>
		<PROPERTY dataLink="VIEWPROPERTIES" nameField="name" valueField="value"/>
	</VIEWPROPERTIES>
	<SELECTIONS label="Paramètres de l'analyse" displayText="">
		<GROUP label="Comptabilité">
			<FIELD name="CH" label="" UI="combo" width="250" default="C">
				<OPTION data="C" label="Clinique"/>
				<OPTION data="H" label="Honoraires"/>
			</FIELD>
		</GROUP>
		<GROUP label="Période">
			<FIELD name="MOIS" label="" UI="combo" width="250" default="*FIRST" globalListProvider="MOIS">
			</FIELD>
			<FIELD name="TOMOIS" label="" UI="combo" width="250" default="*FIRST" globalListProvider="MOIS">
			</FIELD>
		</GROUP>
		<GROUP label="Arborescence">
			<FIELD name="ARBRE1" label="" UI="combo" width="250" default="-1" tree="true">
				<OPTION data="-1" label="Pas de 1er niveau"/>
                <OPTION label="Options" data="" globalListProvider="COMPTA_GROUPBY_OPTION" />
				<OPTION data="CPT" label="Compte général" globalListProvider="CPT_GROUPBY_OPTION"/>
			</FIELD>
			<FIELD name="GROUPBY_TAB" width="100" label="Présentation" UI="combo" default="AUTO" visible="= SELECT.ARBRE1 != '-1' ">
				<OPTION label="Automatique" data="AUTO"/>
				<OPTION label="Arbre" data="TREE"/>
				<OPTION label="Onglet" data="TAB"/>
			</FIELD>
		</GROUP>
		<GROUP label="">
			<FIELD name="ARBRE2" label="" UI="combo" width="250" default="-1" tree="true">
				<OPTION data="-1" label="Pas de 2nd niveau"/>
				<OPTION label="Options" data="" globalListProvider="COMPTA_GROUPBY_OPTION" />
				<OPTION data="CPT" label="Compte général" globalListProvider="CPT_GROUPBY_OPTION"/>
			</FIELD>
			<FIELD name="ARBRE3" label="" UI="combo" width="250" default="-1" tree="true">
				<OPTION data="-1" label="Pas de 3ème niveau"/>
				<OPTION label="Options" data="" globalListProvider="COMPTA_GROUPBY_OPTION" />
				<OPTION data="CPT" label="Compte général" globalListProvider="CPT_GROUPBY_OPTION"/>
			</FIELD>
		</GROUP>
		<GROUP label="">
			<FIELD name="ARBRE4" label="" UI="combo" width="250" default="-1" tree="true">
				<OPTION data="-1" label="Pas de 4ème niveau"/>
				<OPTION label="Options" data="" globalListProvider="COMPTA_GROUPBY_OPTION" />
				<OPTION data="CPT" label="Compte général" globalListProvider="CPT_GROUPBY_OPTION"/>
			</FIELD>
			<FIELD name="ARBRE5" label="" UI="combo" width="250" default="-1" tree="true">
				<OPTION data="-1" label="Pas de 5ème niveau"/>
				<OPTION label="Options" data="" globalListProvider="COMPTA_GROUPBY_OPTION" />
				<OPTION data="CPT" label="Compte général" globalListProvider="CPT_GROUPBY_OPTION"/>
			</FIELD>
		</GROUP>
		<GROUP label="">
			<FIELD name="GROUPBY" label="Regroupement" UI="combo" width="250" default="JRN" tree="true">
				<OPTION label="Options" data="" globalListProvider="COMPTA_GROUPBY_OPTION" />
				<OPTION data="CPT" label="Compte général" globalListProvider="CPT_GROUPBY_OPTION"/>
			</FIELD>
		</GROUP>
		<GROUP label="">
			<FIELD name="OPTION_SOLDE" label="Présentation" UI="combo" width="340" default="DC" tree="true">
				<OPTION data="DC" label="Afficher solde débiteur et créditeur"/>
				<OPTION data="D" label="Afficher solde débiteur"/>
				<OPTION data="C" label="Afficher solde créditeur"/>
			</FIELD>
		</GROUP>
		<GROUP label="">
			<FIELD name="OPTION_DEBUT_FIN" label="" UI="combo" width="340" default="-1" tree="true">
				<OPTION data="-1" label="Ne pas afficher soldes début et fin"/>
				<OPTION data="D" label="Afficher soldes début de période"/>
				<OPTION data="F" label="Afficher soldes fin de période"/>
				<OPTION data="DF" label="Afficher soldes début et fin de période"/>
			</FIELD>
		</GROUP>
		<GROUP label="">
			<FIELD name="OPTION_NBECRITURES" label="" UI="combo" width="340" default="0" tree="true">
				<OPTION data="1" label="Afficher le nombre d'écritures"/>
				<OPTION data="0" label="Masquer le nombre d'écritures"/>
			</FIELD>
		</GROUP>
	</SELECTIONS>
	<SELECTIONS componentName="ECRITURES_SELECTIONS_GENERALE"/>
	<SELECTIONS componentName="ECRITURES_SELECTIONS_COMPLEMENTAIRES"/>
	<QUERIES>
		<QUERY>
			<SQL optimizer="V_HISTORIQUE_ECRITURES_X" cacheEnabled="true" select="

					[EVAL 
					if ('[ARBRE1]' != '-1') {
						$groupby = '';
						$qtab = false;
						if ('[GROUPBY_TAB]' == 'TAB') {
							$qtab = true;
						}
						if ('[GROUPBY_TAB]' == 'AUTO' &amp;&amp; '[ARBRE2]' != '-1') {
							$qtab = true;
						}

						if ($qtab == false) {
							return &quot;
							(SELECT 
								[VIEW.TAB1_RESUME_FIELDS],
								[VIEW.ARBRE1_FIELDS], [VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], 
								[VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], 
								[VIEW.ARBRE1_FIELDS], [VIEW.ARBRE1TEXT_FIELDS],
								1, 0,
								sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.EXEDEB] AND [MOIS] - 1 THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END), 
								sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_debit ELSE 0 END), 
								sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_credit ELSE 0 END), 
								sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END),
								sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.TOEXEDEB] AND [TOMOIS] THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END), 
								sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.nombre_ecritures ELSE 0 END),
								MAX(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN fin_exercice ELSE '0' END), 
								MAX(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN ajustement ELSE '0' END)
							FROM compta.#V_HISTORIQUE_ECRITURES_X# 
							WHERE v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.EXEDEB] AND [TOMOIS]
									[VIEW.ECRITURES_SELECT_GEN]
									[VIEW.ECRITURES_SELECT_COMP]
							GROUP BY 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18
							)
							UNION ALL &quot;;
						}
						else {
							return &quot;
							(SELECT 
								[VIEW.TAB1_RESUME_FIELDS],
								[VIEW.ARBRE1_FIELDS], [VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], 
								[VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], 
								[VIEW.ARBRE1_FIELDS], [VIEW.ARBRE1TEXT_FIELDS],
								1, 0,
								sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.EXEDEB] AND [MOIS] - 1 THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END), 
								sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_debit ELSE 0 END), 
								sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_credit ELSE 0 END), 
								sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END),
								sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.TOEXEDEB] AND [TOMOIS] THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END), 
								sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.nombre_ecritures ELSE 0 END),
								MAX(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN fin_exercice ELSE '0' END), 
								MAX(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN ajustement ELSE '0' END)
							FROM compta.#V_HISTORIQUE_ECRITURES_X# 
							WHERE v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.EXEDEB] AND [TOMOIS]
									[VIEW.ECRITURES_SELECT_GEN]
									[VIEW.ECRITURES_SELECT_COMP]
							GROUP BY 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18
							)
							UNION ALL
							(SELECT 
								[VIEW.TAB1_FIELDS],
								[VIEW.ARBRE1_FIELDS], [VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], 
								[VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], 
								-9999999, 'Total', 'Total',
								9, 0,
								sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.EXEDEB] AND [MOIS] - 1 THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END), 
								sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_debit ELSE 0 END), 
								sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_credit ELSE 0 END), 
								sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END),
								sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.TOEXEDEB] AND [TOMOIS] THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END), 
								sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.nombre_ecritures ELSE 0 END),
								MAX(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN fin_exercice ELSE '0' END), 
								MAX(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN ajustement ELSE '0' END)
							FROM compta.#V_HISTORIQUE_ECRITURES_X# 
							WHERE v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.EXEDEB] AND [TOMOIS]
									[VIEW.ECRITURES_SELECT_GEN]
									[VIEW.ECRITURES_SELECT_COMP]
							GROUP BY 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18
							)
							UNION ALL&quot; ;
						}
					}
					EVAL]
					
					
					
					[EVAL 
					if ([ARBRE2] != '-1') {
						return &quot;
						(SELECT 
							[VIEW.TAB1_FIELDS],
							[VIEW.ARBRE1_FIELDS], [VIEW.ARBRE2_FIELDS], [VIEW.GROUP0BY_FIELDS], 
							[VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], 
							[VIEW.ARBRE2_FIELDS], [VIEW.ARBRE2TEXT_FIELDS],
							2, [VIEW.ARBRE2_PADDING],
							sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.EXEDEB] AND [MOIS] - 1 THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END), 
							sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_debit ELSE 0 END), 
							sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_credit ELSE 0 END), 
							sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END),
							sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.TOEXEDEB] AND [TOMOIS] THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END), 
							sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.nombre_ecritures ELSE 0 END),
							MAX(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN fin_exercice ELSE '0' END), 
							MAX(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN ajustement ELSE '0' END)
						FROM compta.#V_HISTORIQUE_ECRITURES_X# 
						WHERE v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.EXEDEB] AND [TOMOIS]
								[VIEW.ECRITURES_SELECT_GEN]
								[VIEW.ECRITURES_SELECT_COMP]
						GROUP BY 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18
						)
						UNION ALL&quot;;
					}
					EVAL]
					
					[EVAL 
					if ([ARBRE3] != '-1') {
						return &quot;
						(SELECT 
							[VIEW.TAB1_FIELDS],
							[VIEW.ARBRE1_FIELDS], [VIEW.ARBRE2_FIELDS], [VIEW.ARBRE3_FIELDS], 
							[VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], 
							[VIEW.ARBRE3_FIELDS], [VIEW.ARBRE3TEXT_FIELDS],
							3, [VIEW.ARBRE3_PADDING],
							sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.EXEDEB] AND [MOIS] - 1 THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END), 
							sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_debit ELSE 0 END), 
							sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_credit ELSE 0 END), 
							sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END),
							sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.TOEXEDEB] AND [TOMOIS] THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END), 
							sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.nombre_ecritures ELSE 0 END),
							MAX(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN fin_exercice ELSE '0' END), 
							MAX(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN ajustement ELSE '0' END)
						FROM compta.#V_HISTORIQUE_ECRITURES_X# 
						WHERE v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.EXEDEB] AND [TOMOIS]
								[VIEW.ECRITURES_SELECT_GEN]
								[VIEW.ECRITURES_SELECT_COMP]
						GROUP BY 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18
						)
						UNION ALL&quot;;
					}
					EVAL]
					
					[EVAL 
					if ([ARBRE4] != '-1') {
						return &quot;
						(SELECT 
							[VIEW.TAB1_FIELDS],
							[VIEW.ARBRE1_FIELDS], [VIEW.ARBRE2_FIELDS], [VIEW.ARBRE3_FIELDS], 
							[VIEW.ARBRE4_FIELDS], [VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], 
							[VIEW.ARBRE4_FIELDS], [VIEW.ARBRE4TEXT_FIELDS],
							4, [VIEW.ARBRE4_PADDING],
							sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.EXEDEB] AND [MOIS] - 1 THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END), 
							sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_debit ELSE 0 END), 
							sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_credit ELSE 0 END), 
							sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END),
							sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.TOEXEDEB] AND [TOMOIS] THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END), 
							sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.nombre_ecritures ELSE 0 END),
							MAX(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN fin_exercice ELSE '0' END), 
							MAX(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN ajustement ELSE '0' END)
						FROM compta.#V_HISTORIQUE_ECRITURES_X# 
						WHERE v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.EXEDEB] AND [TOMOIS]
								[VIEW.ECRITURES_SELECT_GEN]
								[VIEW.ECRITURES_SELECT_COMP]
						GROUP BY 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18
						)
						UNION ALL&quot;;
					}
					EVAL]
					
					[EVAL 
					if ([ARBRE5] != '-1') {
						return &quot;
						(SELECT 
							[VIEW.TAB1_FIELDS],
							[VIEW.ARBRE1_FIELDS], [VIEW.ARBRE2_FIELDS], [VIEW.ARBRE3_FIELDS], 
							[VIEW.ARBRE4_FIELDS], [VIEW.ARBRE5_FIELDS], [VIEW.GROUP0BY_FIELDS], 
							[VIEW.ARBRE5_FIELDS], [VIEW.ARBRE5TEXT_FIELDS],
							5, [VIEW.ARBRE5_PADDING],
							sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.EXEDEB] AND [MOIS] - 1 THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END), 
							sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_debit ELSE 0 END), 
							sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_credit ELSE 0 END), 
							sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END),
							sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.TOEXEDEB] AND [TOMOIS] THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END), 
							sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.nombre_ecritures ELSE 0 END),
							MAX(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN fin_exercice ELSE '0' END), 
							MAX(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN ajustement ELSE '0' END)
						FROM compta.#V_HISTORIQUE_ECRITURES_X# 
						WHERE v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.EXEDEB] AND [TOMOIS]
								[VIEW.ECRITURES_SELECT_GEN]
								[VIEW.ECRITURES_SELECT_COMP]
						GROUP BY 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18
						)
						UNION ALL&quot;;
					}
					EVAL]
					
					(SELECT 
						[VIEW.TAB1_FIELDS],
						[VIEW.ARBRE1_FIELDS], [VIEW.ARBRE2_FIELDS], [VIEW.ARBRE3_FIELDS], 
						[VIEW.ARBRE4_FIELDS], [VIEW.ARBRE5_FIELDS], [VIEW.GROUPBY_FIELDS], 
						[VIEW.GROUPBY_FIELDS], [VIEW.TEXT_FIELDS],
						6, [VIEW.GROUPBY_PADDING],
						sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.EXEDEB] AND [MOIS] - 1 THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END), 
						sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_debit ELSE 0 END), 
						sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_credit ELSE 0 END), 
						sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END),
						sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.TOEXEDEB] AND [TOMOIS] THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END), 
						sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.nombre_ecritures ELSE 0 END),
						MAX(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN fin_exercice ELSE '0' END), 
						MAX(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN ajustement ELSE '0' END)
					FROM compta.#V_HISTORIQUE_ECRITURES_X# 
					WHERE v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.EXEDEB] AND [TOMOIS]
						[VIEW.ECRITURES_SELECT_GEN]
						[VIEW.ECRITURES_SELECT_COMP]
					GROUP BY 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18
					)
					
					UNION ALL
					
					(SELECT 
						[VIEW.TAB1_RESUME_FIELDS],
						0, '',  0, '',  0, '',  0, '',  0, '',  0, '',  
						-9999999, 'Total', 'Total',
						9, 0,
						
						sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.EXEDEB] AND [MOIS] - 1 THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END), 
						sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_debit ELSE 0 END), 
						sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_credit ELSE 0 END), 
						sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END),
						sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.TOEXEDEB] AND [TOMOIS] THEN v_historique_ecritures_1.montant_solde_debit ELSE 0 END), 
						sum(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN v_historique_ecritures_1.nombre_ecritures ELSE 0 END),
						MAX(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN fin_exercice ELSE '0' END), 
						MAX(CASE WHEN v_historique_ecritures_1.mois_comptable BETWEEN [MOIS] AND [TOMOIS] THEN ajustement ELSE '0' END)
						
					FROM compta.#V_HISTORIQUE_ECRITURES_X# 
					WHERE v_historique_ecritures_1.mois_comptable BETWEEN [VIEW.EXEDEB] AND [TOMOIS]
							
							[VIEW.ECRITURES_SELECT_GEN]
							[VIEW.ECRITURES_SELECT_COMP]


					)


					ORDER BY 2, 5, 7, 9, 11, 13, 15 ">
				<FIELDS>
					<FIELD name="TABD"/>
					<FIELD name="TABDL"/>
					<FIELD name="TABDLL"/>
					<FIELD name="OID1"/>
					<FIELD name="COD1"/>
					<FIELD name="OID2"/>
					<FIELD name="COD2"/>
					<FIELD name="OID3"/>
					<FIELD name="COD3"/>
					<FIELD name="OID4"/>
					<FIELD name="COD4"/>
					<FIELD name="OID5"/>
					<FIELD name="COD5"/>
					<FIELD name="OID6"/>
					<FIELD name="COD6"/>
					<FIELD name="OID"/>
					<FIELD name="COD"/>
					<FIELD name="TXT"/>
					<FIELD name="LVL"/>
					<FIELD name="PAD"/>
					<FIELD name="SOD"/>
					<FIELD name="DEB"/>
					<FIELD name="CRE"/>
					<FIELD name="SOL"/>
					<FIELD name="SOF"/>
					<FIELD name="NBE"/>
					<FIELD name="Q13"/>
					<FIELD name="QAJ"/>
				</FIELDS>
			</SQL>
		</QUERY>
		<QUERY type="propertiesLink" name="VIEWPROPERTIES" forSelections="false">
			<SQL select="SELECT 'EXEDEB', MIN(CASE WHEN '[OPTION_DEBUT_FIN]' IN ('D', 'F', 'DF') THEN p_calendrier_mois.mois ELSE [MOIS] END) 
						FROM base.p_calendrier_mois 
							JOIN base.p_calendrier_mois p_calendrier_exercice 
								ON p_calendrier_exercice.mois = [MOIS] AND p_calendrier_mois.exercice_comptable = p_calendrier_exercice.exercice_comptable	
						UNION
						SELECT 'TOEXEDEB', MIN(CASE WHEN '[OPTION_DEBUT_FIN]' IN ('D', 'F', 'DF') THEN p_calendrier_mois.mois ELSE [TOMOIS] END) 
						FROM base.p_calendrier_mois 
							JOIN base.p_calendrier_mois p_calendrier_exercice 
								ON p_calendrier_exercice.mois = [TOMOIS] AND p_calendrier_mois.exercice_comptable = p_calendrier_exercice.exercice_comptable
						">
				<FIELDS>
					<FIELD name="name"/>
					<FIELD name="value"/>
				</FIELDS>
			</SQL>
		</QUERY>
	</QUERIES>
	<PRESENTATION>
		<VIEWLINKS>
            <VIEWLINK label="Comparatif" shortLabel="Comparatif" view="COMPTA000057.XML" enabled="true" rowContext="false" buttonType="COMPARATIF" componentName="COMPTA_VIEWLINK">
				<ARG name="MOIS" value="return SELECT.TOMOIS;" />
				<ARG name="DATA" value="if (COLUMN.NAME == 'DEB') {return 'D'}
                                        if (COLUMN.NAME == 'CRE') {return 'C'}
                                        if (COLUMN.NAME == 'SOLD') {return 'SD'} 
                                        if (COLUMN.NAME == 'SOLC') {return 'SC'}
                                        if (COLUMN.NAME == 'NBE') {return 'NB'}
                                        else {return 'C'}" />
			</VIEWLINK>
			<VIEWLINK label="Evolution Temporelle" shortLabel="Evolution" view="COMPTA000058.XML" enabled="true" rowContext="false"  buttonType="EVOLUTION">
				<ARG name="MOIS" value="return SELECT.TOMOIS;" />
                <ARG name="DATA" value="if (COLUMN.NAME == 'DEB') {return 'D'}
                                        if (COLUMN.NAME == 'CRE') {return 'C'}
                                        if (COLUMN.NAME == 'SOLD') {return 'SD'} 
                                        if (COLUMN.NAME == 'SOLC') {return 'SC'}
                                        if (COLUMN.NAME == 'NBE') {return 'NB'}
                                        else {return 'C'}" />
			</VIEWLINK>
			<VIEWLINK label="Liste des écritures" shortLabel="Ecritures" view="COMPTA000025.XML" componentName="ECRITURES_VIEWLINK" component2Name="COMPTA_VIEWLINK">
				<ARG name="MOIS" value="if (SELECT.GROUPBY == 'MOI' &amp;&amp; ROW.LVL == '6') {return ROW.COD}
										if (SELECT.ARBRE1 == 'MOI' &amp;&amp; ROW.COD1 != '') {return ROW.COD1}
										if (SELECT.ARBRE2 == 'MOI' &amp;&amp; ROW.COD2 != '') {return ROW.COD2}
										if (SELECT.ARBRE3 == 'MOI' &amp;&amp; ROW.COD3 != '') {return ROW.COD3}
										if (SELECT.ARBRE4 == 'MOI' &amp;&amp; ROW.COD4 != '') {return ROW.COD4}
										if (SELECT.ARBRE5 == 'MOI' &amp;&amp; ROW.COD5 != '') {return ROW.COD5}
				"/>
				<ARG name="TOMOIS" value="if (SELECT.GROUPBY == 'MOI' &amp;&amp; ROW.LVL == '6') {return ROW.COD}
											if (SELECT.ARBRE1 == 'MOI' &amp;&amp; ROW.COD1 != '') {return ROW.COD1}
										if (SELECT.ARBRE2 == 'MOI' &amp;&amp; ROW.COD2 != '') {return ROW.COD2}
										if (SELECT.ARBRE3 == 'MOI' &amp;&amp; ROW.COD3 != '') {return ROW.COD3}
										if (SELECT.ARBRE4 == 'MOI' &amp;&amp; ROW.COD4 != '') {return ROW.COD4}
										if (SELECT.ARBRE5 == 'MOI' &amp;&amp; ROW.COD5 != '') {return ROW.COD5}
								"/>
			</VIEWLINK>
		</VIEWLINKS>
		<ONGLET excelLabel="Analyse écritures" label="Analyse écritures" multiTab="true" multiTabBreakField="TABD" multiTabBreakLabelField="TABDL" multiTabBreakLonglabelField="TABDLL">
			<CHARTx title="Evolution mensuelle" type="lineChart" sortField="TXT" sortSeq="A" condition="Number(ROW.COD) &gt;= 100" maxItems="5" maxItemsSortOn="SOLX" maxItemsSortSeq="D" serieIsCategory="true">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="SOLM01" displayName="VIEW.M1" displayNameCalc="true"/>
				<SERIE field="SOLM02" displayName="VIEW.M2" displayNameCalc="true"/>
				<SERIE field="SOLM04" displayName="VIEW.M3" displayNameCalc="true"/>
				<SERIE field="SOLM04" displayName="VIEW.M4" displayNameCalc="true"/>
				<SERIE field="SOLM05" displayName="VIEW.M5" displayNameCalc="true"/>
				<SERIE field="SOLM06" displayName="VIEW.M6" displayNameCalc="true"/>
				<SERIE field="SOLM07" displayName="VIEW.M7" displayNameCalc="true"/>
				<SERIE field="SOLM08" displayName="VIEW.M8" displayNameCalc="true"/>
				<SERIE field="SOLM09" displayName="VIEW.M9" displayNameCalc="true"/>
				<SERIE field="SOLM10" displayName="VIEW.M10" displayNameCalc="true"/>
				<SERIE field="SOLM11" displayName="VIEW.M11" displayNameCalc="true"/>
				<SERIE field="SOLM12" displayName="VIEW.M12" displayNameCalc="true"/>
			</CHARTx>
			<DATAGRID title="" total="true" headerHeight="36" variableRowHeight="true" sortable="= SELECT.ARBRE1 == '-1' &amp;&amp; SELECT.ARBRE2 == '-1' &amp;&amp; SELECT.ARBRE3 == '-1' &amp;&amp; SELECT.ARBRE4 == '-1' &amp;&amp; SELECT.ARBRE5 == '-1'" totalRowInRows="= ROW.OID == '-9999999'">
				<ROWSTYLE name="fontSize" value="10"/>
				<ROWSTYLE name="backgroundColor" value="0xFFD393" condition="ROW.LVL == '1' &amp;&amp; VIEW.QTAB != '1'"/>
				<ROWSTYLE name="fontWeight" value="bold" condition="ROW.LVL == '1' &amp;&amp; VIEW.QTAB != '1'"/>
				<ROWSTYLE name="borderStyle" value="solid" condition="ROW.LVL == '1' &amp;&amp; VIEW.QTAB != '1'"/>
				<ROWSTYLE name="borderThickness" value="2" condition="ROW.LVL == '1' &amp;&amp; VIEW.QTAB != '1'"/>
				<ROWSTYLE name="rowHeight" value="36" condition="ROW.LVL == '1' &amp;&amp; VIEW.QTAB != '1'"/>
				<ROWSTYLE name="borderSides" value="top bottom" condition="ROW.LVL == '1' &amp;&amp; VIEW.QTAB != '1'"/>
				<ROWSTYLE name="backgroundColor" value="0xFFD393" condition="ROW.LVL == '2' &amp;&amp; VIEW.QTAB == '1'"/>
				<ROWSTYLE name="fontWeight" value="bold" condition="ROW.LVL == '2' &amp;&amp; VIEW.QTAB == '1'"/>
				<ROWSTYLE name="borderStyle" value="solid" condition="ROW.LVL == '2' &amp;&amp; VIEW.QTAB == '1'"/>
				<ROWSTYLE name="borderThickness" value="2" condition="ROW.LVL == '2' &amp;&amp; VIEW.QTAB == '1'"/>
				<ROWSTYLE name="rowHeight" value="36" condition="ROW.LVL == '2' &amp;&amp; VIEW.QTAB == '1'"/>
				<ROWSTYLE name="borderSides" value="top bottom" condition="ROW.LVL == '2' &amp;&amp; VIEW.QTAB == '1'"/>
				<ROWSTYLE name="fontWeight" value="bold" condition="ROW.LVL == '2'"/>
				<ROWSTYLE name="fontWeight" value="bold" condition="ROW.LVL == '3'"/>
				<ROWSTYLE name="fontWeight" value="bold" condition="ROW.LVL == '4'"/>
				<ROWSTYLE name="rowHeight" value="24" condition="ROW.LVL == '2' &amp;&amp; VIEW.QTAB != '1'"/>
				<ROWSTYLE name="rowHeight" value="24" condition="ROW.LVL == '3'"/>
				<ROWSTYLE name="fontSize" value="11" condition="ROW.LVL == '1' &amp;&amp; VIEW.QTAB != '1'"/>
				<ROWSTYLE name="fontSize" value="11" condition="ROW.LVL == '2'"/>
				<COLUMN dataField="LVL" type="Number" headerText="lvl" width="40" visible="false"/>
				<COLUMN dataField="PAD" type="Number" headerText="pad" width="40" visible="false"/>
				<COLUMN dataField="OID1" type="Char" visible="false"/>
				<COLUMN dataField="OID2" type="Char" visible="false"/>
				<COLUMN dataField="OID3" type="Char" visible="false"/>
				<COLUMN dataField="OID4" type="Char" visible="false"/>
				<COLUMN dataField="OID5" type="Char" visible="false"/>
				<COLUMN dataField="OID6" type="Char" visible="false"/>
				<COLUMN dataField="COD1" type="Char" visible="false"/>
				<COLUMN dataField="COD2" type="Char" visible="false"/>
				<COLUMN dataField="COD3" type="Char" visible="false"/>
				<COLUMN dataField="COD4" type="Char" visible="false"/>
				<COLUMN dataField="COD5" type="Char" visible="false"/>
				<COLUMN dataField="COD6" type="Char" visible="false"/>
				<COLUMN dataField="OID" type="Char" visible="false"/>
				<COLUMN dataField="COD" type="Char" outputFormat="#" width="120" visible="true" visibleCondition="SELECT.GROUPBY != 'MOI' &amp;&amp; SELECT.GROUPBY != 'DTE' &amp;&amp; SELECT.GROUPBY != 'FAC'" headerText="Code" totalFunction="text" totalComplement="">
					<CELLSTYLE name="paddingLeft" value="10" condition="ROW.PAD == '1'"/>
					<CELLSTYLE name="paddingLeft" value="20" condition="ROW.PAD == '2'"/>
					<CELLSTYLE name="paddingLeft" value="30" condition="ROW.PAD == '3'"/>
					<CELLSTYLE name="paddingLeft" value="40" condition="ROW.PAD == '4'"/>
					<CELLSTYLE name="paddingLeft" value="50" condition="ROW.PAD == '5'"/>
				</COLUMN>
				<COLUMN dataField="TXT" type="Char" outputFormat="#" minWidth="60" visible="true" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" totalFunction="text" totalComplement="TOTAL">
					<CELLSTYLE name="cellIndicator" value="circle, 5, right top, 0xFF6600" condition="ROW.QAJ == '1' || ROW.QAJ == '2'"/>
					<CELLSTYLE name="paddingLeft" value="10" condition="ROW.PAD == '1'"/>
					<CELLSTYLE name="paddingLeft" value="20" condition="ROW.PAD == '2'"/>
					<CELLSTYLE name="paddingLeft" value="30" condition="ROW.PAD == '3'"/>
					<CELLSTYLE name="paddingLeft" value="40" condition="ROW.PAD == '4'"/>
					<CELLSTYLE name="paddingLeft" value="50" condition="ROW.PAD == '5'"/>
				</COLUMN>
				<COLUMN dataField="SOD" type="Number" visible="false" totalFunction="sum" totalComplement=""/>
				<COLUMN dataField="SODD" type="Number" outputFormat="#,00E" width="110" fixed="false" visibleCondition="(SELECT.OPTION_DEBUT_FIN == 'DF' || SELECT.OPTION_DEBUT_FIN == 'D') &amp;&amp; (SELECT.OPTION_SOLDE == 'DC' || SELECT.OPTION_SOLDE == 'D')" headerText="Solde Débit @LF@(début periode)" align="right" totalFunction="calc" totalComplement="" calc="true">
					<CALC formula="ROW.SOD" condition="ROW.SOD &gt; 0 &amp;&amp; SELECT.OPTION_SOLDE == 'DC' "/>
					<CALC formula="ROW.SOD" condition="SELECT.OPTION_SOLDE == 'D' "/>
				</COLUMN>
				<COLUMN dataField="SODC" type="Number" outputFormat="#,00E" width="110" fixed="false" visibleCondition="(SELECT.OPTION_DEBUT_FIN == 'DF' || SELECT.OPTION_DEBUT_FIN == 'D') &amp;&amp; (SELECT.OPTION_SOLDE == 'DC' || SELECT.OPTION_SOLDE == 'C')" headerText="Solde Crédit @LF@(début periode)" align="right" totalFunction="calc" totalComplement="" calc="true">
					<CALC formula="0 - ROW.SOD" condition="ROW.SOD &lt; 0 &amp;&amp; SELECT.OPTION_SOLDE == 'DC'"/>
					<CALC formula="0 - ROW.SOD" condition="SELECT.OPTION_SOLDE == 'C'"/>
				</COLUMN>
				<COLUMN dataField="DEB" type="Number" outputFormat="#,00E" width="110" fixed="false" headerText="Débit @LF@(periode)" align="right" selectable="true" totalFunction="sum" totalComplement=""/>
				<COLUMN dataField="CRE" type="Number" outputFormat="#,00E" width="110" fixed="false" headerText="Crédit @LF@(periode)" align="right" selectable="true" totalFunction="sum" totalComplement=""/>
				<COLUMN dataField="SOL" type="Number" visible="false" totalFunction="sum" totalComplement=""/>
				<COLUMN dataField="SOLD" type="Number" outputFormat="#,00E" width="110" fixed="false" selectable="true" visibleCondition="SELECT.OPTION_SOLDE == 'DC' || SELECT.OPTION_SOLDE == 'D'" headerText="Solde Débit @LF@(periode)" align="right" totalFunction="calc" totalComplement="" calc="true">
					<CALC formula="ROW.SOL" condition="ROW.SOL &gt; 0 &amp;&amp; SELECT.OPTION_SOLDE == 'DC' "/>
					<CALC formula="ROW.SOL" condition="SELECT.OPTION_SOLDE == 'D' "/>
				</COLUMN>
				<COLUMN dataField="SOLC" type="Number" outputFormat="#,00E" width="110" fixed="false" selectable="true" visibleCondition="SELECT.OPTION_SOLDE == 'DC' || SELECT.OPTION_SOLDE == 'C'" headerText="Solde Crédit @LF@(periode)" align="right" totalFunction="calc" totalComplement="" calc="true">
					<CALC formula="0 - ROW.SOL" condition="ROW.SOL &lt; 0 &amp;&amp; SELECT.OPTION_SOLDE == 'DC'"/>
					<CALC formula="0 - ROW.SOL" condition="SELECT.OPTION_SOLDE == 'C'"/>
				</COLUMN>
				<COLUMN dataField="SOF" type="Number" visible="false" totalFunction="sum" totalComplement=""/>
				<COLUMN dataField="SOFD" type="Number" outputFormat="#,00E" width="110" fixed="false" visibleCondition="(SELECT.OPTION_DEBUT_FIN == 'DF' || SELECT.OPTION_DEBUT_FIN == 'F') &amp;&amp; (SELECT.OPTION_SOLDE == 'DC' || SELECT.OPTION_SOLDE == 'D')" headerText="Solde Débit @LF@(fin periode)" align="right" totalFunction="calc" totalComplement="" calc="true">
					<CALC formula="ROW.SOF" condition="ROW.SOF &gt; 0 &amp;&amp; SELECT.OPTION_SOLDE == 'DC' "/>
					<CALC formula="ROW.SOF" condition="SELECT.OPTION_SOLDE == 'D' "/>
				</COLUMN>
				<COLUMN dataField="SOFC" type="Number" outputFormat="#,00E" width="110" fixed="false" visibleCondition="(SELECT.OPTION_DEBUT_FIN == 'DF' || SELECT.OPTION_DEBUT_FIN == 'F') &amp;&amp; (SELECT.OPTION_SOLDE == 'DC' || SELECT.OPTION_SOLDE == 'C')" headerText="Solde Crédit @LF@(fin periode)" align="right" totalFunction="calc" totalComplement="" calc="true">
					<CALC formula="0 - ROW.SOF" condition="ROW.SOF &lt; 0 &amp;&amp; SELECT.OPTION_SOLDE == 'DC'"/>
					<CALC formula="0 - ROW.SOF" condition="SELECT.OPTION_SOLDE == 'C'"/>
				</COLUMN>
				<COLUMN dataField="NBE" type="Number" outputFormat="#" width="110" fixed="false" selectable="true" visibleCondition="SELECT.OPTION_NBECRITURES == '1'" headerText="Nb écritures" align="right" totalFunction="sum" totalComplement=""/>
				<COLUMN dataField="QAJ" type="Char" visible="false"/>
				<COLUMN dataField="Q13" type="Char" visible="false"/>
			</DATAGRID>
		</ONGLET>
	</PRESENTATION>
</VUE>

