<?xml version="1.0" encoding="ISO-8859-1"?>
<VUE name="RH000108" label="RH. Effets Prix - Volume" 
title="= 'Effets Prix - Volume par ' +  SELECT.GROUPBY_LABEL + ' (' + SELECT.PERIODE_LABEL + ' à ' + SELECT.TOPERIODE_LABEL + ' vs ' + SELECT.PERIODE_D_LABEL + ' à ' + SELECT.TOPERIODE_D_LABEL + ')' + ' sur les ' + SELECT.DATA01_LABEL+ ' et la ' + SELECT.DATA02_LABEL " 
database="iCTI" 
swf="*CTI_view1" 
softCode="iCTI_rh" 
typeEts="" 
globals="RH_globals.XML" 
componentsFile="RH_components.XML" 
dboptimizer="RH_dboptimizer.XML"
helpDokuWIkiDir="" helpDokuWIkiFile="RH000108"  helpFile="iCTI_RH_RH000108.HTML">
	<VIEWPROPERTIES componentName="PROPERTIES_PAIE"/>
	<VIEWPROPERTIES componentName="PROPERTIES_GROUPBY"/>
	<VIEWPROPERTIES>
        <PROPERTY dataLink="VIEWPROPERTIES" nameField="name" valueField="value"/>
		<PROPERTY name="DATAFUNC">
			<value><![CDATA[[EVAL 
				// <?php
				
				function RH000108_calcSQL($data) {
					$ctiDivision = "base.cti_division(%s, %s)";
					$countDistinctCaseWhen = "count(DISTINCT CASE WHEN v_rh_view_1.date_paie BETWEEN @date_debut@ AND @date_fin@ THEN %s ELSE null END)";
					$sumDistinctCaseWhen = "sum(CASE WHEN v_rh_view_1.date_paie BETWEEN @date_debut@ AND @date_fin@ THEN %s ELSE 0 END)";
					$periodeDebut = '\'[PERIODE]\'::date';
					$periodeFin = '\'[TOPERIODE]\'::date';
					$periodePrecDebut = '\'[PERIODE_D]\'::date';
					$periodePrecFin = '\'[TOPERIODE_D]\'::date';
					
					switch ($data) {
                        case 'NBETP':
							$tmp1 = 'base.cti_division('.sprintf($sumDistinctCaseWhen, 'v_rh_view_1.etp_paye').', base.cti_months_between(@date_debut@, @date_fin@))';
							break;   
						case 'NBETPT':
							$tmp1 = 'base.cti_division('.sprintf($sumDistinctCaseWhen, 'v_rh_view_1.etp_travaille').', base.cti_months_between(@date_debut@, @date_fin@))';
							break;
                        case 'MSAL':
							$tmp1 = sprintf($sumDistinctCaseWhen, 'v_rh_view_1.montant_masse_salariale');
							break;
						case 'MTBRUT':
							$tmp1 = sprintf($sumDistinctCaseWhen, 'v_rh_view_1.montant_brut');
							break;
						case 'MTFRAISIMPOS':
							$tmp1 = sprintf($sumDistinctCaseWhen, 'v_rh_view_1.montant_frais_imposables');
							break;
						case 'MTCOTSALARIE':
							$tmp1 = sprintf($sumDistinctCaseWhen, 'v_rh_view_1.montant_cotisation_salarie');
							break;
						case 'MTCOTPATRONALE':
							$tmp1 = sprintf($sumDistinctCaseWhen, 'v_rh_view_1.montant_cotisation_patronale');
							break;
						case 'MTNETIMPOSABLE':
							$tmp1 = sprintf($sumDistinctCaseWhen, 'v_rh_view_1.montant_net_imposable_salarie');
							break;
						case 'MTNETAPAYER':
							$tmp1 = sprintf($sumDistinctCaseWhen, 'v_rh_view_1.montant_net_a_payer_salarie');
							break;
						default :
							$tmp1 = sprintf($countDistinctCaseWhen, 'v_rh_view_1.montant_masse_salariale');
					}
					
					return str_replace(array('@date_debut@', '@date_fin@'), array($periodeDebut, $periodeFin), $tmp1) . ',' . str_replace(array('@date_debut@', '@date_fin@'), array($periodePrecDebut, $periodePrecFin), $tmp1);
				}
				
				// ?>
			EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="DATASQL">
			<value><![CDATA[[EVAL 
				// <?php
				
				return RH000108_calcSQL('[DATA01]') . ',0,0,'. PHP_EOL . RH000108_calcSQL('[DATA02]') . ',0,0';
				// ?>
			EVAL]]]></value>
		</PROPERTY>
	</VIEWPROPERTIES>
	<SELECTIONS label="Paramètres de l'analyse">
		
		<GROUP label="Période">
			<FIELD name="ALIAS_PERIODE" label="" UI="combo" width="220" default="CUM_LAST_MONTH" tree="true" globalListProvider="ALIAS_PERIODE" />
			<FIELD name="PERIODE" label="" UI="combo" tree="true" width="200" default="2010-01-01" globalListProvider="PERIODE_DEBUT" />
			<FIELD name="TOPERIODE" label="au" UI="combo" tree="true" width="200" default="2010-01-31" globalListProvider="PERIODE_FIN" />
		</GROUP>
		<GROUP label="Période précédente">
			<FIELD name="PERIODE_D" label="" UI="combo" tree="true" width="200" default="2010-01-01" globalListProvider="PERIODE_DEBUT" />
			<FIELD name="TOPERIODE_D" label="au" UI="combo" tree="true" width="200" default="2010-01-31" globalListProvider="PERIODE_FIN" />
		</GROUP>
		<GROUP>
			<FIELD name="DATA01" label="Données" UI="combo" tree="true" width="200" default="NBETP" default2="NBETP" default3="Séjours" default4="P" printable="false">
                <OPTION label="ETP Payés" data="NBETP" data2="#,00" data3="ETP Payés" data4="P" treeLevel="1"/>
				<OPTION label="ETP Travaillés" data="NBETPT" data2="#,00" data3="ETP travaillé" data4="P" treeLevel="1"/>
			</FIELD>
            <FIELD name="DATA02" label="Données" UI="combo" tree="true" width="200" default="MSAL" default2="1" default3="" default4="P" printable="false" >
                <OPTION label="Masse salariale" data="MSAL" data2="#E" data3="&lt;i&gt;Brut&lt;/i&gt; + &lt;i&gt;Cotisations patronales&lt;/i&gt; + &lt;i&gt;OD/Net patronales&lt;/i&gt; + &lt;i&gt;Avantages en nature&lt;/i&gt; + &lt;i&gt;Frais imposables&lt;/i&gt;" data4="P" treeLevel="1" />			
                <OPTION label="Montant Brut" data="MTBRUT" data2="#E" data3="Montant Brut" data4="P" treeLevel="1" />			
				<OPTION label="Montant Cotisations Salariales" data="MTCOTSALARIE" data2="#E" data3="Cot Salariale" data4="P" treeLevel="1"/>
				<OPTION label="Montant Cotisations Patronales" data="MTCOTPATRONALE" data2="#E" data3="Cot patronale" data4="P" treeLevel="1"/>
				<OPTION label="Montant Net Imposable" data="MTNETIMPOSABLE" data2="#E" data3="Net imposable" data4="P" treeLevel="1"/>
				<OPTION label="Montant Net à payer" data="MTNETAPAYER" data2="#E" data3="Net à payer" data4="P" treeLevel="1"/>
			</FIELD>
		</GROUP>
        
		<GROUP label="Regroupement">
			<FIELD name="GROUPBY" label="" UI="combo" width="250" default="RUP" tree="true" >
				<OPTION label="Entreprise" data="ENT" treeLevel="1" globalListProvider="ENTREPRISE_GROUPBY"/>
				<OPTION label="Paie" data="RUP" treeLevel="1" globalListProvider="PAIE_GROUPBY"/>
				<OPTION label="[DICT.RH.SALARIE#1]" data="SAL" treeLevel="1" globalListProvider="SALARIE_GROUPBY"/>
				<OPTION label="[DICT.RH.CONTRAT#1]" data="CNT" treeLevel="1" globalListProvider="CONTRAT_GROUPBY"/>
				<OPTION label="Temporel" data="MOIACT" treeLevel="1" globalListProvider="TEMPOREL_PAIE_GROUPBY"/>
				<OPTION label="Référentiel SAE" data="REFERENTIEL_SAE" treeLevel="1" globalListProvider="REFERENTIEL_SAE_GROUPBY"/>
			</FIELD>
			<FIELD name="GROUPBY_TAB" width="100" label="Présentation" UI="combo" default="AUTO" visible="= SELECT.GROUPBY_2 != '-1' ">
				<OPTION label="Automatique" data="AUTO"/>
				<OPTION label="Arbre" data="TREE"/>
				<OPTION label="Onglet" data="TAB"/>
			</FIELD>
		</GROUP>
		<GROUP label="">
			<FIELD name="GROUPBY_2" label="" width="250" UI="combo" default="-1" tree="true" >
				<OPTION label="Pas de second niveau" data="-1"/>
				<OPTION label="Entreprise" data="ENT" treeLevel="1" globalListProvider="ENTREPRISE_GROUPBY"/>
				<OPTION label="Paie" data="RUP" treeLevel="1" globalListProvider="PAIE_GROUPBY"/>
				<OPTION label="[DICT.RH.SALARIE#1]" data="SAL" treeLevel="1" globalListProvider="SALARIE_GROUPBY"/>
				<OPTION label="[DICT.RH.CONTRAT#1]" data="CNT" treeLevel="1" globalListProvider="CONTRAT_GROUPBY"/>
				<OPTION label="Temporel" data="MOIACT" treeLevel="1" globalListProvider="TEMPOREL_PAIE_GROUPBY"/>
				<OPTION label="Référentiel SAE" data="REFERENTIEL_SAE" treeLevel="1" globalListProvider="REFERENTIEL_SAE_GROUPBY"/>
			</FIELD>
		</GROUP>
		<GROUP label="">
			<FIELD name="GROUPBY_3" label="" width="250" UI="combo" default="-1" tree="true" >
				<OPTION label="Pas de troisième niveau" data="-1"/>
				<OPTION label="Entreprise" data="ENT" treeLevel="1" globalListProvider="ENTREPRISE_GROUPBY"/>
				<OPTION label="Paie" data="RUP" treeLevel="1" globalListProvider="PAIE_GROUPBY"/>
				<OPTION label="[DICT.RH.SALARIE#1]" data="SAL" treeLevel="1" globalListProvider="SALARIE_GROUPBY"/>
				<OPTION label="[DICT.RH.CONTRAT#1]" data="CNT" treeLevel="1" globalListProvider="CONTRAT_GROUPBY"/>
				<OPTION label="Temporel" data="MOIACT" treeLevel="1" globalListProvider="TEMPOREL_PAIE_GROUPBY"/>
				<OPTION label="Référentiel SAE" data="REFERENTIEL_SAE" treeLevel="1" globalListProvider="REFERENTIEL_SAE_GROUPBY"/>
			</FIELD>
		</GROUP>
	</SELECTIONS>
	<SELECTIONS componentName="FILTRES_SALCNT_SOUSSELECTIONS"/>
	<SELECTIONS componentName="FILTRES_PAIE_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_SALARIES_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_CONTRATS_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_REFERENTIEL_SAE_SELECTIONS"/>
	<QUERIES>
		<QUERY label="">
			<SQL optimizer="V_HP_X" optimizer2="V_ALL_X" >
				<select><![CDATA[ 
				
					CTISELECT_TREE
						GROUPBY1{[VIEW.GROUPBY_OID_FIELD],, [VIEW.GROUPBY_COD_FIELD],, [VIEW.GROUPBY_TXT_FIELD]}
						GROUPBY1MODE{[GROUPBY_TAB]}
						GROUPBY2{[VIEW.GROUPBY_2_OID_FIELD],, [VIEW.GROUPBY_2_COD_FIELD],, [VIEW.GROUPBY_2_TXT_FIELD]}
						GROUPBY3{[VIEW.GROUPBY_3_OID_FIELD],, [VIEW.GROUPBY_3_COD_FIELD],, [VIEW.GROUPBY_3_TXT_FIELD]}
						SIGNIFDATA{[VIEW.ACTIVITE_SIGNIFICATIVE_DATA],, [ACTIVITE_SIGNIFICATIVE_MODE],, [ACTIVITE_SIGNIFICATIVE_NUMBER]}
						OPTIONS{NOTZERO=1}
						ORDERBY{[VIEW.DATA01],, DESC}
						INDICATORS{
							[VIEW.DATASQL]
						}
					FROM #V_HP_X##V_ALL_X#
					WHERE (v_rh_view_1.date_paie BETWEEN '[PERIODE]' AND '[TOPERIODE]' OR
						v_rh_view_1.date_paie BETWEEN '[PERIODE_D]' AND '[TOPERIODE_D]')
						[VIEW.SALARIES_SELECT]
						[VIEW.CONTRATS_SELECT]
						[VIEW.REFERENTIEL_SAE_SELECT]
						[VIEW.PAIE_SELECT]
						
					AFTER{
						UPDATE w_table SET 
							indicateurs[3] = indicateurs[1] - indicateurs[2],
							indicateurs[4] = CASE 
												WHEN indicateurs[1] > 0 AND indicateurs[2] > 0 THEN base.cti_division(indicateurs[1] - indicateurs[2], indicateurs[2]) * 100
											 ELSE 0 END,
							indicateurs[7] = indicateurs[5] - indicateurs[6],
							indicateurs[8] = CASE 
												WHEN indicateurs[5] > 0 AND indicateurs[6] > 0 THEN base.cti_division(indicateurs[5] - indicateurs[6], indicateurs[6]) * 100
											 ELSE 0 END
					}
					
				]]></select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS" />
					<FIELD name="SORT" />
					
					<!-- Première donnée -->
					<FIELD name="F1" />
					<FIELD name="D1" />
					<FIELD name="D1_ECA" />
					<FIELD name="D1_PCT" />
					
					<!-- Deuxième donnée -->
					<FIELD name="F2" />
					<FIELD name="D2" />
					<FIELD name="D2_ECA" />
					<FIELD name="D2_PCT" />
					
				</FIELDS>
			</SQL>
		</QUERY>
        <QUERY type="propertiesLink" name="VIEWPROPERTIES" forSelections="false">
			<SQL>
				<select><![CDATA[
						SELECT 'X_PERIODE_D', greatest(('[PERIODE]'::date - '1 year'::interval)::date, (SELECT (min(mois)::text||'01')::date FROM rh.p_chiffrier_production))::text
					UNION ALL
						SELECT 'X_TOPERIODE_D', greatest(('[TOPERIODE]'::date - '1 year'::interval)::date, (SELECT (min(mois)::text||'01')::date FROM rh.p_chiffrier_production))::text
					UNION ALL
						SELECT 'X_PERIODE', greatest(('[PERIODE]'::date - '3 years'::interval)::date, (SELECT (min(mois)::text||'01')::date FROM rh.p_chiffrier_production))::text
				]]></select>
				<FIELDS>
					<FIELD name="name" />
					<FIELD name="value" />
				</FIELDS>
			</SQL>
		</QUERY>
	</QUERIES>
	<PRESENTATION>
		<VIEWLINKS>
			<VIEWLINK label="Comparatif" shortLabel="Comparatif" view="RH000017.XML" enabled="true" rowContext="false" buttonType="COMPARATIF">
				<ARG name="PERIODE_D" value="return VIEW.X_PERIODE_D;" />
				<ARG name="TOPERIODE_D" value="return VIEW.X_TOPERIODE_D;" />
				<ARG name="DATA1" value="'NBSAL'" />
				<ARG name="DATA2" value="'MTMASSE'" />
				<ARG name="DATA3" value="'MTBRUTMOY'" />
			</VIEWLINK>
			<VIEWLINK label="Evolution" shortLabel="Evolution" view="RH000015.XML" enabled="true" rowContext="false" componentName="PERIODICITE_VIEWLINK" buttonType="EVOLUTION">
				<ARG name="DATA" value="'MTMASSE'" />
			</VIEWLINK>
			<VIEWLINK label="Analyse croisée" shortLabel="Analyse croisée" view="RH000016.XML" enabled="true" rowContext="false" buttonType="ANALYSE_CROISEE">
				<ARG name="PERIODE" value="return VIEW.X_PERIODE;" />
				<ARG name="DATA" value="'MTMASSE'" />
				<ARG name="COLUMNBY" value="'MCAL'" />
				<ARG name="GROUPBY" value="'ACAL'" />
				<ARG name="GROUPBY_2" value="return SELECT.GROUPBY;" />
				<ARG name="GROUPBY_TAB" value="'TAB'" />
				<ARG name="COLUMNBYCOUNT" value="'12'" />
			</VIEWLINK>
			<VIEWLINK label="Justificatif de paie" shortLabel="Justificatif de paie" view="RH000011.XML" componentName="RH_VIEWLINK" >
				<ARGS name="SPEC" >
					<value><![CDATA[
						LINKVARIABLES['GROUPBY_2'] = 'SAL'
						return 'OK';
					]]></value>
				</ARGS>
			</VIEWLINK>
		</VIEWLINKS>
        <ONGLET excelLabel="Effet Simplifié" label="Effet Simplifié" multiTab="true" multiTabBreakField="TABD" multiTabBreakLabelField="TABDL" multiTabBreakLonglabelField="TABDLL">
			<CHART title="Séjours pour les 12 premiers" type="columnChart" maxItems="12" maxItemsSortOn="F1" maxItemsSortSeq="D" sortField="COD" sortSeq="A" condition="ROW.LVL == '1'">
				<CATEGORY field="CODTXT" type="Char" />
				<SERIE field="EPXS" displayName="Effet Prix " displayNameCalc="false" />
				<SERIE field="EVLS" displayName="Effet Volume" displayNameCalc="false" />
			</CHART>
			<DATAGRID title="" total="true" showOthers="true" headerHeight="70" variableRowHeight="true" selectRowInRows="= ROW.OID == '-9999997'" otherRowInRows="= ROW.OID == '-9999998'" totalRowInRows="= ROW.OID == '-9999999'" sortable="= SELECT.GROUPBY_2 == '-1' || SELECT.GROUPBY_TAB == 'TAB'">
				<INSERT name="DATAGRID_MULTITAB_STYLES" />
				<COLUMN dataField="LVL" width="50" type="Char" visible="false" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text" />
				<COLUMN dataField="OID" width="60" type="Char" visible="false" headerText="Oid" />
				<COLUMN dataField="COD" width="70" type="Char" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text" totalComplement="TOTAL">
					<CELLSTYLE name="paddingLeft" value="15" condition="ROW.LVL == '2' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				</COLUMN>
				<COLUMN dataField="TXT" type="Char" minWidth="200" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" otherFunction="text" otherComplement="Autres" />
				<COLUMN dataField="CODTXT" type="Char" minWidth="200" visible="false" totalFunction="text" otherFunction="text" calc="true">
					<CALC formula="ROW.COD + ' ' + ROW.TXT.toString().substr(0,10)" />
				</COLUMN>
				
				<COLUMN dataField="D1" type="Number" width="80" outputFormat="= SELECT.DATA012" selectable="true" headerText="'(Q1)'+ '\n' +SELECT.DATA01_LABEL +'\n'+ '&lt;font color=\'#DB1702\'&gt;N-1&lt;/font&gt;'" headerTextCalc="true" description="= SELECT.DATA013 " textAlign="center">
						<HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
				</COLUMN>
				<COLUMN dataField="F1" type="Number" width="80" outputFormat="= SELECT.DATA012" selectable="true" headerText="'(Q2)' +'\n' +SELECT.DATA01_LABEL +'\n'+ '&lt;font color=\'#DB1702\'&gt;N&lt;/font&gt;'"  headerTextCalc="true" description="= SELECT.DATA013 " textAlign="center">
						<HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
				</COLUMN>
				<COLUMN dataField="D1_ECA" type="Number" width="80" outputFormat="= SELECT.DATA012" headerText="@LF@ Ecart" textAlign="center">
					<CELLSTYLE name="cellIndicator" value="triangle_down, 10, left middle, 0xD63E00" condition="(SELECT.DATA014 == 'P' &amp;&amp; ROW.F1 &lt; ROW.D1) || (SELECT.DATA014 == 'N' &amp;&amp; ROW.F1 &gt; ROW.D1)" />
					<CELLSTYLE name="cellIndicator" value="triangle_up, 10, left middle, 0x75a0eb" condition="(SELECT.DATA014 == 'P' &amp;&amp; ROW.F1 &gt; ROW.D1) || (SELECT.DATA014 == 'N' &amp;&amp; ROW.F1 &lt; ROW.D1)" />
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, left middle, 0xFFA500" condition="ROW.F1 != null &amp;&amp; ROW.D1 != null &amp;&amp; ROW.F1 == ROW.D1" />
                        <HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
                </COLUMN>
				<COLUMN dataField="D1_PCT" type="Number" width="70" outputFormat="= if (ROW.D1 !=0) {return '#,00%'} else {return '#'}" headerText="@LF@ %" textAlign="center">
						<HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
				</COLUMN>
				
				<COLUMN dataField="D2" type="Number" width="85" outputFormat="#E" selectable="true" headerText="+ '\n' + SELECT.DATA02_LABEL+ '\n' +  '&lt;font color=\'#DB1702\'&gt;N-1&lt;/font&gt;'  + '\n' " headerTextCalc="true" description="= SELECT.DATA023 " textAlign="center">	
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
				<COLUMN dataField="F2" type="Number" width="85" outputFormat="#E" selectable="true" headerText="+ '\n' + SELECT.DATA02_LABEL+ '\n' +  '&lt;font color=\'#DB1702\'&gt;N&lt;/font&gt;'  + '\n' " headerTextCalc="true" description="= SELECT.DATA023" textAlign="center">	
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
				<COLUMN dataField="D2_ECA" type="Number" width="95" outputFormat="#E" headerText="(X1) @LF@ Ecart" textAlign="center">
					<CELLSTYLE name="cellIndicator" value="triangle_down, 10, left middle, 0xD63E00" condition="(SELECT.DATA024 == 'P' &amp;&amp; ROW.F2 &lt; ROW.D2) || (SELECT.DATA024 == 'N' &amp;&amp; ROW.F2 &gt; ROW.D2)" />
					<CELLSTYLE name="cellIndicator" value="triangle_up, 10, left middle, 0x75a0eb" condition="(SELECT.DATA024 == 'P' &amp;&amp; ROW.F2 &gt; ROW.D2) || (SELECT.DATA024 == 'N' &amp;&amp; ROW.F2 &lt; ROW.D2)" />
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, left middle, 0xFFA500" condition="ROW.F2 != null &amp;&amp; ROW.D2 != null &amp;&amp; ROW.F2 == ROW.D2" />
                        <HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
				<COLUMN dataField="D2_PCT" type="Number" width="70" outputFormat="= if (ROW.D2 !=0) {return '#,00%'} else {return '#'}" headerText="@LF@ %" textAlign="center">	
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
                <COLUMN dataField="CA_MOY_OLD" type="Number" width="80" outputFormat="#E" headerText="'(P1)' + '\n' + SELECT.DATA02_LABEL + ' moyen '+'\n'+ '&lt;font color=\'#DB1702\'&gt;N-1&lt;/font&gt;'" headerTextCalc="true"  description="CA / ETP" totalFunction="calc" otherFunction="calc" calc="true" textAlign="center">
					<CALC formula="(ROW.D2 / ROW.D1)" />
                    <HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
				</COLUMN>
				<COLUMN dataField="CA_MOY_NOW" type="Number" width="80" outputFormat="#E" headerText="'(P2)' + '\n' + SELECT.DATA02_LABEL + ' moyen ' +'\n'+ '&lt;font color=\'#DB1702\'&gt;N&lt;/font&gt;'" headerTextCalc="true"  description="CA / ETP" totalFunction="calc" otherFunction="calc" calc="true" textAlign="center">
					<CALC formula="(ROW.F2 / ROW.F1)" />
                    <HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
                    <FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
				</COLUMN>
				<COLUMN dataField="EPXS" type="Number" width="95" outputFormat="#E" headerText="@LF@ Effet Prix" description="EP=(P2-P1)*Q1" totalFunction="calc" otherFunction="calc" calc="true" textAlign="center">
					<CALC formula="(ROW.CA_MOY_NOW - ROW.CA_MOY_OLD)* ROW.D1" />
                    <CELLSTYLE name="cellIndicator" value="circle, 5, left middle, 0xD63E00" condition="(ROW.EPX &lt; '0')" />
                    <HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
				<COLUMN dataField="EVLS" type="Number" width="95" outputFormat="#E" headerText="@LF@ Effet Volume" description="EV=(Q2-Q1)*P1" totalFunction="calc" otherFunction="calc" calc="true" textAlign="center">
					<CALC formula="(ROW.F1 - ROW.D1)* ROW.CA_MOY_OLD" />
                    <CELLSTYLE name="cellIndicator" value="circle, 5, left middle, 0xD63E00" condition="(ROW.EVL &lt; '0')" />
                    <HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
				<COLUMN dataField="ETOT" type="Number" width="90" outputFormat="#E" headerText="@LF@ Somme des Effets" description="X1 = EP + EV " totalFunction="calc" otherFunction="calc" calc="true" textAlign="center">
					<CALC formula="(ROW.EPXS + ROW.EVLS)" />
                    <HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
			</DATAGRID>
		</ONGLET>
		<ONGLET excelLabel="Effet Croisé" label="Effet Croisé" multiTab="true" multiTabBreakField="TABD" multiTabBreakLabelField="TABDL" multiTabBreakLonglabelField="TABDLL">
			<CHART title="Séjours pour les 12 premiers" type="columnChart" maxItems="12" maxItemsSortOn="F1" maxItemsSortSeq="D" sortField="COD" sortSeq="A" condition="ROW.LVL == '1'">
				<CATEGORY field="CODTXT" type="Char" />
				<SERIE field="EPX" displayName="Effet Prix " displayNameCalc="false" />
				<SERIE field="EVL" displayName="Effet Volume" displayNameCalc="false" />
				<SERIE field="ECR" displayName="Effet Croisé" displayNameCalc="false" />
			</CHART>
			<DATAGRID title="" total="true" showOthers="true" headerHeight="70" variableRowHeight="true" selectRowInRows="= ROW.OID == '-9999997'" otherRowInRows="= ROW.OID == '-9999998'" totalRowInRows="= ROW.OID == '-9999999'" sortable="= SELECT.GROUPBY_2 == '-1' || SELECT.GROUPBY_TAB == 'TAB'">
				<INSERT name="DATAGRID_MULTITAB_STYLES" />
				<COLUMN dataField="LVL" width="50" type="Char" visible="false" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text" />
				<COLUMN dataField="OID" width="60" type="Char" visible="false" headerText="Oid" />
				<COLUMN dataField="COD" width="70" type="Char" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text" totalComplement="TOTAL">
					<CELLSTYLE name="paddingLeft" value="15" condition="ROW.LVL == '2' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				</COLUMN>
				<COLUMN dataField="TXT" type="Char" minWidth="200" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" otherFunction="text" otherComplement="Autres" />
				<COLUMN dataField="CODTXT" type="Char" minWidth="200" visible="false" totalFunction="text" otherFunction="text" calc="true">
					<CALC formula="ROW.COD + ' ' + ROW.TXT.toString().substr(0,10)" />
				</COLUMN>
				
				<COLUMN dataField="D1" type="Number" width="80" outputFormat="= SELECT.DATA012" selectable="true" headerText="'(Q1)'+ '\n' +SELECT.DATA01_LABEL +'\n'+ '&lt;font color=\'#DB1702\'&gt;N-1&lt;/font&gt;'" headerTextCalc="true" description="= SELECT.DATA013 " textAlign="center">
						<HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
				</COLUMN>
				<COLUMN dataField="F1" type="Number" width="80" outputFormat="= SELECT.DATA012" selectable="true" headerText="'(Q2)' +'\n' +SELECT.DATA01_LABEL +'\n'+ '&lt;font color=\'#DB1702\'&gt;N&lt;/font&gt;'"  headerTextCalc="true" description="= SELECT.DATA013 " textAlign="center">
						<HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
				</COLUMN>
				<COLUMN dataField="D1_ECA" type="Number" width="80" outputFormat="= SELECT.DATA012" headerText="@LF@ Ecart" textAlign="center">
					<CELLSTYLE name="cellIndicator" value="triangle_down, 10, left middle, 0xD63E00" condition="(SELECT.DATA014 == 'P' &amp;&amp; ROW.F1 &lt; ROW.D1) || (SELECT.DATA014 == 'N' &amp;&amp; ROW.F1 &gt; ROW.D1)" />
					<CELLSTYLE name="cellIndicator" value="triangle_up, 10, left middle, 0x75a0eb" condition="(SELECT.DATA014 == 'P' &amp;&amp; ROW.F1 &gt; ROW.D1) || (SELECT.DATA014 == 'N' &amp;&amp; ROW.F1 &lt; ROW.D1)" />
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, left middle, 0xFFA500" condition="ROW.F1 != null &amp;&amp; ROW.D1 != null &amp;&amp; ROW.F1 == ROW.D1" />
                        <HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
                </COLUMN>
				<COLUMN dataField="D1_PCT" type="Number" width="70" outputFormat="= if (ROW.D1 !=0) {return '#,00%'} else {return '#'}" headerText="@LF@ %" textAlign="center">
						<HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
				</COLUMN>
				
				<COLUMN dataField="D2" type="Number" width="85" outputFormat="#E" selectable="true" headerText="+ '\n' + SELECT.DATA02_LABEL+ '\n' +  '&lt;font color=\'#DB1702\'&gt;N-1&lt;/font&gt;'  + '\n' " headerTextCalc="true" description="= SELECT.DATA023 " textAlign="center">	
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
				<COLUMN dataField="F2" type="Number" width="85" outputFormat="#E" selectable="true" headerText="+ '\n' + SELECT.DATA02_LABEL+ '\n' +  '&lt;font color=\'#DB1702\'&gt;N&lt;/font&gt;'  + '\n' " headerTextCalc="true" description="= SELECT.DATA023" textAlign="center">	
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
				<COLUMN dataField="D2_ECA" type="Number" width="95" outputFormat="#E" headerText="(X1) @LF@ Ecart" textAlign="center">
					<CELLSTYLE name="cellIndicator" value="triangle_down, 10, left middle, 0xD63E00" condition="(SELECT.DATA024 == 'P' &amp;&amp; ROW.F2 &lt; ROW.D2) || (SELECT.DATA024 == 'N' &amp;&amp; ROW.F2 &gt; ROW.D2)" />
					<CELLSTYLE name="cellIndicator" value="triangle_up, 10, left middle, 0x75a0eb" condition="(SELECT.DATA024 == 'P' &amp;&amp; ROW.F2 &gt; ROW.D2) || (SELECT.DATA024 == 'N' &amp;&amp; ROW.F2 &lt; ROW.D2)" />
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, left middle, 0xFFA500" condition="ROW.F2 != null &amp;&amp; ROW.D2 != null &amp;&amp; ROW.F2 == ROW.D2" />
                        <HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
				<COLUMN dataField="D2_PCT" type="Number" width="70" outputFormat="= if (ROW.D2 !=0) {return '#,00%'} else {return '#'}" headerText="@LF@ %" textAlign="center">	
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
                <COLUMN dataField="CA_MOY_OLD" type="Number" width="80" outputFormat="#E" headerText="'(P1)' + '\n' + SELECT.DATA02_LABEL + ' moyen '+'\n'+ '&lt;font color=\'#DB1702\'&gt;N-1&lt;/font&gt;'" headerTextCalc="true"  description=" CA / ETP" totalFunction="calc" otherFunction="calc" calc="true" textAlign="center">
					<CALC formula="(ROW.D2 / ROW.D1)" />
                    <HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
				</COLUMN>
				<COLUMN dataField="CA_MOY_NOW" type="Number" width="80" outputFormat="#E" headerText="'(P2)' + '\n' + SELECT.DATA02_LABEL + ' moyen ' +'\n'+ '&lt;font color=\'#DB1702\'&gt;N&lt;/font&gt;'" headerTextCalc="true"  description=" CA / ETP" totalFunction="calc" otherFunction="calc" calc="true" textAlign="center">
					<CALC formula="(ROW.F2 / ROW.F1)" />
                    <HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
                    <FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
				</COLUMN>
				<COLUMN dataField="EPX" type="Number" width="95" outputFormat="#E" headerText="@LF@ Effet Prix" description="EP=(P2-P1)*Q1" totalFunction="calc" otherFunction="calc" calc="true" textAlign="center">
					<CALC formula="(ROW.CA_MOY_NOW - ROW.CA_MOY_OLD)* ROW.D1" />
                    <CELLSTYLE name="cellIndicator" value="circle, 5, left middle, 0xD63E00" condition="(ROW.EPX &lt; '0')" />
                    <HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
				<COLUMN dataField="EVL" type="Number" width="95" outputFormat="#E" headerText="@LF@ Effet Volume" description="EV=(Q2-Q1)*P1" totalFunction="calc" otherFunction="calc" calc="true" textAlign="center">
					<CALC formula="(ROW.F1 - ROW.D1)* ROW.CA_MOY_OLD" />
                    <CELLSTYLE name="cellIndicator" value="circle, 5, left middle, 0xD63E00" condition="(ROW.EVL &lt; '0')" />
                    <HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
				<COLUMN dataField="ECR" type="Number" width="95" outputFormat="#E" headerText="@LF@ Effet Croisé" description="EC=(Q2-Q1)*(P2-P1)" totalFunction="calc" otherFunction="calc" calc="true" textAlign="center">
					<CALC formula="((ROW.F1 - ROW.D1)*(ROW.CA_MOY_NOW - ROW.CA_MOY_OLD) )" />
                    <CELLSTYLE name="cellIndicator" value="circle, 5, left middle, 0xD63E00" condition="(ROW.ECR &lt; '0')" />
                    <HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
				<COLUMN dataField="ETOT" type="Number" width="90" outputFormat="#E" headerText="@LF@ Somme des Effets" description="X1 = EP + EV + EC" totalFunction="calc" otherFunction="calc" calc="true" textAlign="center">
					<CALC formula="(ROW.EPX + ROW.EVL + ROW.ECR)" />
                    <HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
			</DATAGRID>
		</ONGLET>
	</PRESENTATION>
</VUE>
