<?xml version="1.0" encoding="ISO-8859-15"?>
<VUE name="RH000013" 
	label="RH. Evolution mensuelle des [DICT.RH.CONTRAT#4]" 
	title="= SELECT.DATA_LABEL + ' par ' +  SELECT.GROUPBY_LABEL + ' de ' + SELECT.PERIODE_LABEL + ' à ' + SELECT.TOPERIODE_LABEL " 
	database="iCTI" 
	swf="*CTI_view1" 
	globals="RH_globals.XML" 
	componentsFile="RH_components.XML" 
	softCode="iCTI_rh"
	dboptimizer="RH_dboptimizer.XML"
	helpDokuWIkiDir="rh:vues:contrats" helpDokuWIkiFile="rh000013"  helpFile="">	
	
	<VIEWPROPERTIES componentName="PROPERTIES_CONTRAT"/>
	<VIEWPROPERTIES componentName="PROPERTIES_GROUPBY"/>
	<VIEWPROPERTIES>
		<PROPERTY dataLink="VIEWPROPERTIES" nameField="name" valueField="value" />
		<PROPERTY name="DATAFUNC">
			<value><![CDATA[[EVAL 
				// <?php
				
				function RH000013_calcSQL($data) {
					$ctiDivision = "base.cti_division(%s, %s)";
					$columnCheckSequence = "(CASE WHEN COLUMNCHECKSEQUENCE %s THEN %s ELSE null END)";
					$countDistinctCaseWhen = "count(DISTINCT CASE WHEN 1=1 %s THEN %s ELSE null END)";
					
					switch ($data) {
						case 'NSALPJ':
							$tmp0 = "AND %s BETWEEN date_debut_contrat AND date_fin_contrat";
							$tmp1 = sprintf($countDistinctCaseWhen, sprintf($tmp0, '\'[PERIODE]\'::date'), 'salarie_id');
							$tmp2 = sprintf($countDistinctCaseWhen, "AND COLUMNCHECKSEQUENCE " . sprintf($tmp0, 'columnby_from_date'), 'salarie_id');
							break;
						case 'NSALDJ':
							$tmp0 = "AND %s BETWEEN date_debut_contrat AND date_fin_contrat";
							$tmp1 = sprintf($countDistinctCaseWhen, sprintf($tmp0, '\'[TOPERIODE]\'::date'), 'salarie_id');
							$tmp2 = sprintf($countDistinctCaseWhen, "AND COLUMNCHECKSEQUENCE " . sprintf($tmp0, 'columnby_to_date'), 'salarie_id');
							break;
						case 'NVSALETS':
							$tmp0 = 'AND nombre_entrees = 1';
							$tmp1 = sprintf($countDistinctCaseWhen, $tmp0, 'salarie_id');
							$tmp2 = sprintf($countDistinctCaseWhen, "AND COLUMNCHECKSEQUENCE $tmp0", 'salarie_id');
							break;
						case 'NSALNVPT':
							$tmp0 = 'AND nombre_entrees = 1 AND nombre_departs = 1';
							$tmp1 = sprintf($countDistinctCaseWhen, $tmp0, 'salarie_id');
							$tmp2 = sprintf($countDistinctCaseWhen, "AND COLUMNCHECKSEQUENCE $tmp0", 'salarie_id');
							break;
						case 'SALPARTETS':
							$tmp0 = 'AND nombre_departs = 1';
							$tmp1 = sprintf($countDistinctCaseWhen, $tmp0, 'salarie_id');
							$tmp2 = sprintf($countDistinctCaseWhen, "AND COLUMNCHECKSEQUENCE $tmp0", 'salarie_id');
							break;
						case 'NSAL':
							$tmp0 = '';
							$tmp1 = sprintf($countDistinctCaseWhen, $tmp0, 'salarie_id');
							$tmp2 = sprintf($countDistinctCaseWhen, "AND COLUMNCHECKSEQUENCE $tmp0", 'salarie_id');
							break;
						case 'EFFPERM':
							$tmp1 = sprintf($countDistinctCaseWhen, "AND v_rh_view_1.mois_activite_id = to_char('[TOPERIODE]'::date, 'YYYYMM') AND effectif_permanent = 1", 'salarie_id');
							$tmp2 = sprintf($countDistinctCaseWhen, "AND effectif_permanent = 1 AND COLUMNCHECKSEQUENCE", 'salarie_id');
							break;
						case 'ROTEMP':
							$tmp0 = "
								base.cti_division(
									(count(DISTINCT CASE WHEN nombre_entrees = 1 %s THEN salarie_id ELSE null END) + count(DISTINCT CASE WHEN nombre_departs = 1 %s THEN salarie_id ELSE null END)) / 2,
									count(DISTINCT CASE WHEN %s BETWEEN date_debut_contrat AND date_fin_contrat %s THEN salarie_id ELSE null END)
								) * 100
							";
							$tmp1 = sprintf($tmp0, '', '', '\'[PERIODE]\'::date', '');
							$tmp2 = sprintf($tmp0, 'AND COLUMNCHECKSEQUENCE', 'AND COLUMNCHECKSEQUENCE', 'columnby_from_date', 'AND COLUMNCHECKSEQUENCE');
							break;
						case 'CNTCOM':
							$tmp0 = 'AND nombre_debut_contrat = 1';
							$tmp1 = sprintf($countDistinctCaseWhen, $tmp0, 'contrat_id');
							$tmp2 = sprintf($countDistinctCaseWhen, "AND COLUMNCHECKSEQUENCE $tmp0", 'contrat_id');
							break;
						case 'CNTSP':
							$tmp0 = 'AND nombre_debut_contrat = 1 AND nombre_fin_contrat = 1';
							$tmp1 = sprintf($countDistinctCaseWhen, $tmp0, 'contrat_id');
							$tmp2 = sprintf($countDistinctCaseWhen, "AND COLUMNCHECKSEQUENCE $tmp0", 'contrat_id');
							break;
						case 'CNTTOT':
							$tmp0 = '';
							$tmp1 = sprintf($countDistinctCaseWhen, $tmp0, 'contrat_id');
							$tmp2 = sprintf($countDistinctCaseWhen, "AND COLUMNCHECKSEQUENCE $tmp0", 'contrat_id');
							break;
						case 'CNTTERM':
							$tmp0 = 'AND nombre_fin_contrat = 1';
							$tmp1 = sprintf($countDistinctCaseWhen, $tmp0, 'contrat_id');
							$tmp2 = sprintf($countDistinctCaseWhen, "AND COLUMNCHECKSEQUENCE $tmp0", 'contrat_id');
							break;
						case 'NSALH':
							$tmp0 = 'AND sexe_code = \'M\'';
							$tmp1 = sprintf($countDistinctCaseWhen, $tmp0, 'salarie_id');
							$tmp2 = sprintf($countDistinctCaseWhen, "AND COLUMNCHECKSEQUENCE $tmp0", 'salarie_id');
							break;
						case 'NSALF':
							$tmp0 = 'AND sexe_code = \'F\'';
							$tmp1 = sprintf($countDistinctCaseWhen, $tmp0, 'salarie_id');
							$tmp2 = sprintf($countDistinctCaseWhen, "AND COLUMNCHECKSEQUENCE $tmp0", 'salarie_id');
							break;
						case 'AGEMOYDJ':
							$tmp0 = '
								base.cti_avg_distinct_on(
									DISTINCT 
										(CASE WHEN 1=1
											%s
										THEN ARRAY[salarie_id::numeric, age_id::numeric]
										ELSE null END)
								)
							';
							$tmp1 = sprintf($tmp0, '');
							$tmp2 = sprintf($tmp0, 'AND COLUMNCHECKSEQUENCE');
							break;
						case 'ANCMOY':
							$tmp0 = 'base.cti_avg_distinct_on(
									DISTINCT 
										(CASE WHEN 1=1
											%s
										THEN ARRAY[salarie_id::numeric, anciennete_annee_id::numeric]
										ELSE null END)
								)';
							$tmp1 = sprintf($tmp0, '', '');
							$tmp2 = sprintf($tmp0, 'AND COLUMNCHECKSEQUENCE', 'AND COLUMNCHECKSEQUENCE');
							break;
						case 'ANCREPMOY':
							$tmp0 = 'base.cti_avg_distinct_on(
									DISTINCT 
										(CASE WHEN 1=1
											%s
										THEN ARRAY[salarie_id::numeric, rhp_anciennete_reprise_annee_id::numeric]
										ELSE null END)
								)';
							$tmp1 = sprintf($tmp0, '', '');
							$tmp2 = sprintf($tmp0, 'AND COLUMNCHECKSEQUENCE', 'AND COLUMNCHECKSEQUENCE');
							break;
                        case 'NHCNT':
                            $tmp0 = '
                                sum(CASE WHEN 1=1 %s THEN %s ELSE 0 END)
                            ';
                            $tmp1 = sprintf($tmp0, '', "equivalent_temps_plein * (1820.0 / 12.0)");
                            $tmp2 = sprintf($tmp0, 'AND COLUMNCHECKSEQUENCE', 'equivalent_temps_plein * (1820.0 / 12.0)');
                            break;
						case 'ETPTH':
							$tmp0 = '
								sum(CASE WHEN 1=1 %s THEN %s ELSE 0 END)
							';
							$tmp1 = sprintf($tmp0, '', "equivalent_temps_plein / base.cti_months_between('[PERIODE]'::date, '[TOPERIODE]'::date)");
							$tmp2 = sprintf($tmp0, 'AND COLUMNCHECKSEQUENCE', 'equivalent_temps_plein / base.cti_months_between(columnby_from_date, columnby_to_date)');
							break;
                        case 'NCDI':
                            $tmp0 = 'AND type_contrat_section_code[9] = \'CDI\'';
							$tmp1 = sprintf($countDistinctCaseWhen, sprintf($tmp0, '\'[PERIODE]\'::date'), 'contrat_id');
							$tmp2 = sprintf($countDistinctCaseWhen, "AND COLUMNCHECKSEQUENCE " . sprintf($tmp0, 'columnby_from_date'), 'contrat_id');
                            break;                                
                        case 'NCDD':
                            $tmp0 = 'AND type_contrat_section_code[9] = \'CDD\'';
							$tmp1 = sprintf($countDistinctCaseWhen, sprintf($tmp0, '\'[PERIODE]\'::date'), 'contrat_id');
							$tmp2 = sprintf($countDistinctCaseWhen, "AND COLUMNCHECKSEQUENCE " . sprintf($tmp0, 'columnby_from_date'), 'contrat_id');
                            break;
						case 'RATIOSALCNT':
							$tmp0 = 'base.cti_division(count(DISTINCT v_rh_view_1.contrat_id),count(DISTINCT v_rh_view_1.salarie_id) )';
							$tmp1 = sprintf($tmp0, '', '', '\'[PERIODE]\'::date', '');
							$tmp2 = sprintf($tmp0, 'AND COLUMNCHECKSEQUENCE', 'AND COLUMNCHECKSEQUENCE', 'columnby_from_date', 'AND COLUMNCHECKSEQUENCE');
							break;
                        case 'NSALEMB':
							$tmp0 = 'AND nombre_debut_contrat = 1';
							$tmp1 = sprintf($countDistinctCaseWhen, sprintf($tmp0, '\'[PERIODE]\'::date'), 'salarie_id');
                            $tmp2 = sprintf($countDistinctCaseWhen, "AND COLUMNCHECKSEQUENCE " . sprintf($tmp0, 'columnby_from_date'), 'salarie_id');
							break;						
                        case 'NSALDEP':
							$tmp0 = 'AND nombre_fin_contrat = 1';
							$tmp1 = sprintf($countDistinctCaseWhen, sprintf($tmp0, '\'[PERIODE]\'::date'), 'salarie_id');
                            $tmp2 = sprintf($countDistinctCaseWhen, "AND COLUMNCHECKSEQUENCE " . sprintf($tmp0, 'columnby_from_date'), 'salarie_id');
							break;
						default :
							$tmp1 = 'null';
							$tmp2 = 'null';
					}
					return array($tmp1, $tmp2);
				}
				
				// ?>
			EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="DATASQL">
			<value><![CDATA[[EVAL 
				// <?php
				
				$indicators = "INDICATORS{%s,}";
				$indicatorsColumns = "INDICATORS_COLUMNS{%s,}";
					
				$tmp = RH000013_calcSQL('[DATA]');
				
				return sprintf($indicators, $tmp[0]) . PHP_EOL . sprintf($indicatorsColumns, $tmp[1]);
				
				// ?>
			EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="NB_MOIS">
			<value><![CDATA[[EVAL 
				$nbMois = 0;
				
				$y1 = substr('[PERIODE]', 0, 4);
				$y2 = substr('[TOPERIODE]', 0, 4);
				$m1 = substr('[PERIODE]', 5, 2);
				$m2 = substr('[TOPERIODE]', 5, 2);

				$nbMois = 0;
				$nbMois += ($y2 - $y1) * 12;
				$nbMois += $m2 - $m1 + 1;

				return $nbMois;
			 EVAL]]]></value>
		</PROPERTY>
	</VIEWPROPERTIES>
	
	<SELECTIONS label="Paramètres de l'analyse" displayText="">
		<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>
			<FIELD name="TOPERIODE" label="au" UI="combo" tree="true" width="200" default="2010-01-31" globalListProvider="PERIODE_FIN">
			</FIELD>
		</GROUP>
		<GROUP label="">
			<FIELD name="PERIODICITE" label="Périodicité" width="200" UI="combo" default="MONTH">
				<OPTION label="Mensuelle" data="MONTH" />
				<OPTION label="Trimestrielle" data="QUARTER" />
				<OPTION label="Annuelle" data="YEAR" />
			</FIELD>
		</GROUP>
		<GROUP label="Données">
			<FIELD name="DATA" tree="true" label="" UI="combo" default="NSAL" default2="0" width="400" printable="false">
				<OPTION label="DATA_CNT_SLR" data="" globalListProvider="DATA_CNT_SLR"/>
			</FIELD>
		</GROUP>
		<GROUP label="Regroupement">
			<FIELD name="GROUPBY" label="" UI="combo" width="200" default="SAL" tree="true" >
				<OPTION label="Entreprise" data="ENT" treeLevel="1" globalListProvider="ENTREPRISE_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_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="200" 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="[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_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="200" 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="[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_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_SALARIES_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_CONTRATS_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_REFERENTIEL_SAE_SELECTIONS"/>
	<QUERIES>
		<QUERY label="">
			<SQL optimizer="V_CNT_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]}
						COLUMNBY[PERIODICITE]{v_rh_view_1.date_fin_activite,, '[PERIODE]' ,, '[TOPERIODE]' ,, 12,, [VIEW.COLUMN_OPTION]}
						SIGNIFDATA{[VIEW.ACTIVITE_SIGNIFICATIVE_DATA],, [ACTIVITE_SIGNIFICATIVE_MODE],, [ACTIVITE_SIGNIFICATIVE_NUMBER]}
						OPTIONS{NOTZERO=1}
                        ORDERBY{indicateurs[1]}
						[VIEW.DATASQL]
					FROM #V_CNT_X##V_ALL_X#
					WHERE 1=1
						AND v_rh_view_1.date_fin_activite BETWEEN '[PERIODE]' AND '[TOPERIODE]'
						[VIEW.SALARIES_SELECT]
						[VIEW.CONTRATS_SELECT]
						[VIEW.REFERENTIEL_SAE_SELECT]
						AND est_hors_periode IS DISTINCT FROM '1'
						AND fictif <> '1'

				]]></select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS"/>
					<FIELD name="SORT"/>
					<FIELD name="N"/>
					<FIELD name="N0"/>
					<FIELD name="N1"/>
					<FIELD name="N2"/>
					<FIELD name="N3"/>
					<FIELD name="N4"/>
					<FIELD name="N5"/>
					<FIELD name="N6"/>
					<FIELD name="N7"/>
					<FIELD name="N8"/>
					<FIELD name="N9"/>
					<FIELD name="N10"/>
					<FIELD name="N11"/>
					<FIELD name="N12"/>
				</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="Dernière année"  shortLabel="Dernière année"  view="RH000096.XML" enabled="true" rowContext="false" buttonType="COMPARATIF" >
					<ARG name="ALIAS_PERIODE" value="return '-1';" />
					<ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,4)+'-01-01';"/>
					<ARG name="TOPERIODE" value=" return SELECT.TOPERIODE;"/>
					<ARG name="TYPE_COMPARAISON" value="'2'" />              
					<ARG name="GROUPBY" value="return 'MACT';"/>
					<ARG name="LGROUPBY" value="SELECT.GROUPBY;"/>
					<ARG name="LGROUPBY_2" value="if(SELECT.GROUPBY_2 != '-1'){return SELECT.GROUPBY_2;}else {return '-1';}"/>
					<ARG name="LGROUPBY_3" value="if(SELECT.GROUPBY_3 != '-1'){return SELECT.GROUPBY_3;}else {return '-1';}"/>
					<ARG name="GROUPBY_TAB" value="return 'TAB';" />
                    <ARG name="DATA1" value="'NSAL'" />
                    <ARG name="DATA2" value="'CNTTOT'" />
                    <ARG name="DATA3" value="'NCDI'" />
                    <ARG name="DATA4" value="'NCDD'" />
                    <ARG name="DATA5" value="'ETPTH'" />
                    <ARG name="DATA6" value="'0'" />
                    <ARG name="DATA7" value="'0'" />
                    <ARG name="DATA8" value="'0'" />
                    <ARG name="DATA9" value="'0'" />
                    <ARG name="DATA10" value="'0'" />
                    <ARG name="DATA011" value="'0'" />
                    <ARG name="DATA012" value="'0'" />
                    <ARG name="DATA013" value="'0'" />
                    <ARG name="DATA014" value="'0'" />
                    <ARG name="DATA015" value="'0'" />                    
			</VIEWLINK>			
            <VIEWLINK label="Comparatif" shortLabel="Comparatif" view="RH000096.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="TYPE_COMPARAISON" value="'2'" /> 
                <ARG name="DATA1" value="'NSAL'" />
                <ARG name="DATA2" value="'CNTTOT'" />
                <ARG name="DATA3" value="'NCDI'" />
                <ARG name="DATA4" value="'NCDD'" />
                <ARG name="DATA5" value="'ETPTH'" />
                <ARG name="DATA6" value="'0'" />
                <ARG name="DATA7" value="'0'" />
                <ARG name="DATA8" value="'0'" />
                <ARG name="DATA9" value="'0'" />
                <ARG name="DATA10" value="'0'" />
                <ARG name="DATA011" value="'0'" />
                <ARG name="DATA012" value="'0'" />
                <ARG name="DATA013" value="'0'" />
                <ARG name="DATA014" value="'0'" />
                <ARG name="DATA015" value="'0'" />  
			</VIEWLINK>			
            <VIEWLINK label="Comparatif mensuel" shortLabel="Comp. Mensuel" view="RH000116.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="TYPE_COMPARAISON" value="'2'" /> 
				<ARG name="DATA1" value="'NSAL'" />
				<ARG name="DATA2" value="'CNTTOT'" />
				<ARG name="DATA3" value="'ETPTH'" />
			</VIEWLINK>
			<VIEWLINK label="Evolution comparative" shortLabel="Evol. comparative" view="RH000117.XML" rowContext="false" buttonType="VIEWLINK_EVO_COMP_RH" >			
				<VIEWITEM label="Standard" shortLabel="Evolution comparative" view="RH000117.XML" rowContext="false" enabled="true" buttonType="VIEWLINK_EVO_COMP_RH">
                    <ARG name="PERIODE_D" value="return VIEW.X_PERIODE_D;" />
                    <ARG name="TOPERIODE_D" value="return VIEW.X_TOPERIODE_D;" />
					<ARG name="GROUPBY_2" value="return 'MACT';" />
				    <ARG name="TYPE_COMPARAISON" value="'2'" /> 
                    <ARG name="DATA1" value="'NSAL'" />
                    <ARG name="DATA2" value="'CNTTOT'" />
                    <ARG name="DATA3" value="'NCDI'" />
                    <ARG name="DATA4" value="'NCDD'" />
                    <ARG name="DATA5" value="'ETPTH'" />
                    <ARG name="DATA6" value="'0'" />
                    <ARG name="DATA7" value="'0'" />
                    <ARG name="DATA8" value="'0'" />
                    <ARG name="DATA9" value="'0'" />
                    <ARG name="DATA10" value="'0'" />
                    <ARG name="DATA011" value="'0'" />
                    <ARG name="DATA012" value="'0'" />
                    <ARG name="DATA013" value="'0'" />
                    <ARG name="DATA014" value="'0'" />
                    <ARG name="DATA015" value="'0'" />
                </VIEWITEM>	
				<VIEWITEM label="Détaillée" shortLabel="Evol. comparative" view="RH000117.XML" rowContext="false" enabled="true" buttonType="COMPARATIF">
                    <ARG name="PERIODE_D" value="return VIEW.X_PERIODE_D;" />
                    <ARG name="TOPERIODE_D" value="return VIEW.X_TOPERIODE_D;" />
					<ARG name="GROUPBY_2" value="return 'MCAL';" />
                    <ARG name="DATA1" value="'NSAL'" />
                    <ARG name="DATA2" value="'CNTTOT'" />
                    <ARG name="DATA3" value="'NCDI'" />
                    <ARG name="DATA4" value="'NCDD'" />
                    <ARG name="DATA5" value="'NSALH'" />
                    <ARG name="DATA6" value="'NSALF'" />
                    <ARG name="DATA7" value="'CNTTOT'" />
                    <ARG name="DATA8" value="'CNTTERM'" />
                    <ARG name="DATA9" value="'ANCMOY'" />
                    <ARG name="DATA10" value="'ETPTH'" />
                    <ARG name="DATA011" value="'ANCREPMOY'" />
                    <ARG name="DATA012" value="'0'" />
                    <ARG name="DATA013" value="'0'" />
                    <ARG name="DATA014" value="'0'" />
                    <ARG name="DATA015" value="'0'" />	
                </VIEWITEM>	
			</VIEWLINK>	
			<VIEWLINK label="Evolution" shortLabel="Evolution" view="RH000013.XML" enabled="true" rowContext="false" componentName="PERIODICITE_VIEWLINK" buttonType="EVOLUTION">
				<ARG name="DATA" value="'NSAL'" />
			</VIEWLINK>
			<VIEWLINK label="Analyse croisée" shortLabel="Analyse croisée" view="RH000099.XML" enabled="true" rowContext="false" buttonType="ANALYSE_CROISEE">
				<ARG name="ALIAS_PERIODE" value="return '-1'" />				
				<ARG name="PERIODE" value="return VIEW.X_PERIODE.substr(0,4)+'-01-01';"/>
				<ARG name="DATA" value="'NSAL'" />
				<ARG name="COLUMNBY" value="'MACT'" />
				<ARG name="GROUPBY" value="'AACT'" />
				<ARG name="GROUPBY_2" value="return SELECT.GROUPBY;" />
				<ARG name="GROUPBY_3" value="return SELECT.GROUPBY_2;" />
                <ARG name="LGROUPBY" value="return SELECT.GROUPBY;" />
				<ARG name="LGROUPBY_2" value="return SELECT.GROUPBY_2;" />
				<ARG name="LGROUPBY_3" value="return SELECT.GROUPBY_3;" />
				<ARG name="GROUPBY_TAB" value="'TAB'" />
				<ARG name="COLUMNBYCOUNT" value="'12'" />
			</VIEWLINK>
			<VIEWLINK label="Analyse"  shortLabel="Analyse" view="RH000003.XML" rowContext="false" buttonType="ANALYSE_VIEWLINK_RH">
				<VIEWITEM label="Analyse" shortLabel="Analyse"  view="RH000003.XML" rowContext="false" enabled="true" buttonType="ANALYSE_VIEWLINK_RH" componentName="RH_VIEWLINK">
                    <ARGS name="SPEC" >
                        <value><![CDATA[
                            LINKVARIABLES['ALIAS_PERIODE'] = '-1';
                            LINKVARIABLES['PERIODE'] = SELECT.PERIODE;
                            LINKVARIABLES['TOPERIODE'] = SELECT.TOPERIODE;
                            LINKVARIABLES['GROUPBY'] = SELECT.GROUPBY;
                            LINKVARIABLES['GROUPBY_2'] = SELECT.GROUPBY_2;
                            LINKVARIABLES['GROUPBY_3'] = SELECT.GROUPBY_3;
                            LINKVARIABLES['GROUPBY_TAB'] = 'TAB';
                            return 'OK';
                        ]]></value>
                    </ARGS>                    
                </VIEWITEM>					
				<VIEWITEM label="Analyse paramètrable" shortLabel="Analyse"  view="RH000118.XML" rowContext="false" enabled="true" buttonType="ANALYSE_VIEWLINK_RH" componentName="RH_VIEWLINK">
                    <ARGS name="SPEC" >
                        <value><![CDATA[
                            LINKVARIABLES['ALIAS_PERIODE'] = '-1';
                            LINKVARIABLES['PERIODE'] = SELECT.PERIODE;
                            LINKVARIABLES['TOPERIODE'] = SELECT.TOPERIODE;
                            LINKVARIABLES['GROUPBY'] = SELECT.GROUPBY;
                            LINKVARIABLES['GROUPBY_2'] = SELECT.GROUPBY_2;
                            LINKVARIABLES['GROUPBY_3'] = SELECT.GROUPBY_3;
                            LINKVARIABLES['GROUPBY_TAB'] = 'TAB';
                            LINKVARIABLES['DATA1'] = 'NSAL';
                            LINKVARIABLES['DATA2'] = 'CNTTOT';
                            LINKVARIABLES['DATA3'] = 'NCDI';
                            LINKVARIABLES['DATA4'] = 'NCDD';
                            LINKVARIABLES['DATA5'] = 'ETPTH';
                            LINKVARIABLES['DATA6'] = '0';
                            LINKVARIABLES['DATA7'] = '0';
                            LINKVARIABLES['DATA8'] = '0';
                            LINKVARIABLES['DATA9'] = '0';
                            LINKVARIABLES['DATA10'] = '0';
                            LINKVARIABLES['DATA011'] = '0';
                            LINKVARIABLES['DATA012'] = '0';
                            LINKVARIABLES['DATA013'] = '0';
                            LINKVARIABLES['DATA014'] = '0';
                            LINKVARIABLES['DATA015'] = '0';
                            return 'OK';
                        ]]></value>
                    </ARGS> 				
                </VIEWITEM>	
			</VIEWLINK>
            <VIEWLINK label="Justificatif"  shortLabel="Justificatif"  rowContext="false" buttonType="BUTTON_RHP_ZOOM" >
				<VIEWITEM label="Liste des [DICT.RH.CONTRAT#4]" shortLabel="Liste [DICT.RH.CONTRAT#4]" view="RH000006.XML" componentName="RH_VIEWLINK">
                    <ARGS name="SPEC">
                        <value><![CDATA[
                            LINKVARIABLES['GROUPBY_2'] = 'CNT'
                            return 'OK';
                
                        ]]></value>
                    </ARGS>                   
                </VIEWITEM>				
                <VIEWITEM label="Liste des [DICT.RH.SALARIE#4]" shortLabel="Liste [DICT.RH.SALARIE#2]" view="RH000006.XML" componentName="RH_VIEWLINK">
                    <ARGS name="SPEC">
                        <value><![CDATA[
                            LINKVARIABLES['GROUPBY_2'] = 'SAL'
                            return 'OK';
                
                        ]]></value>
                    </ARGS>                 
                </VIEWITEM>					
			</VIEWLINK>
		</VIEWLINKS>
		<ONGLET excelLabel="Evolution mensuelle" label="Evolution mensuelle" multiTab="true">
			<CHART title="" type="group" subType="h" percentHeight="100" fromTotal="false">			
                <CHART title="Décomposition (10 premiers)" type="pieChart" maxItems="10" maxItemsSortOn="N" maxItemsSortSeq="D" sortField="N" sortSeq="D" condition="ROW.LVL == '1'">
                    <CATEGORY field="CODTXT" type="Char" />
                    <SERIE field="N" displayName="SELECT.DATA_LABEL" displayNameCalc="true" />
                </CHART>			
                <CHART title="Evolution temporelle (5 premiers)" type="lineChart" maxItems="5" maxItemsSortOn="N" maxItemsSortSeq="D" serieIsCategory="true" sortField="N" sortSeq="D" condition="ROW.LVL == '1'">
                    <CATEGORY field="COD" type="Char" />
                    <SERIE field="N1" displayName="VIEW.COLH1" displayNameCalc="true" visibleCondition="VIEW.COLH1 != null" />
                    <SERIE field="N2" displayName="VIEW.COLH2" displayNameCalc="true" visibleCondition="VIEW.COLH2 != null" />
                    <SERIE field="N3" displayName="VIEW.COLH3" displayNameCalc="true" visibleCondition="VIEW.COLH3 != null" />
                    <SERIE field="N4" displayName="VIEW.COLH4" displayNameCalc="true" visibleCondition="VIEW.COLH4 != null" />
                    <SERIE field="N5" displayName="VIEW.COLH5" displayNameCalc="true" visibleCondition="VIEW.COLH5 != null" />
                    <SERIE field="N6" displayName="VIEW.COLH6" displayNameCalc="true" visibleCondition="VIEW.COLH6 != null" />
                    <SERIE field="N7" displayName="VIEW.COLH7" displayNameCalc="true" visibleCondition="VIEW.COLH7 != null" />
                    <SERIE field="N8" displayName="VIEW.COLH8" displayNameCalc="true" visibleCondition="VIEW.COLH8 != null" />
                    <SERIE field="N9" displayName="VIEW.COLH9" displayNameCalc="true" visibleCondition="VIEW.COLH9 != null" />
                    <SERIE field="N10" displayName="VIEW.COLH10" displayNameCalc="true" visibleCondition="VIEW.COLH10 != null" />
                    <SERIE field="N11" displayName="VIEW.COLH11" displayNameCalc="true" visibleCondition="VIEW.COLH11 != null" />
                    <SERIE field="N12" displayName="VIEW.COLH12" displayNameCalc="true" visibleCondition="VIEW.COLH12 != null" />
                </CHART>
            </CHART>
			<DATAGRID title="" total="true" showOthers="true" headerHeight="36" variableRowHeight="true" sortable="= SELECT.GROUPBY_3 == '-1' &amp;&amp; (SELECT.GROUPBY_2 == '-1' || SELECT.GROUPBY_TAB == 'TAB')" selectRowInRows="= ROW.OID == '-9999997'" otherRowInRows="= ROW.OID == '-9999998'" totalRowInRows="= ROW.OID == '-9999999'">
				<INSERT name="DATAGRID_MULTITAB_STYLES"/>
				<COLUMN dataField="OID" width="60" type="Char" visible="false" headerText="Oid">
				</COLUMN>
				<COLUMN dataField="COD" width="90" type="Char" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text" totalComplement="TOTAL">
					<INSERT name="COLUMN_COD_MULTITAB_STYLES"/>
				</COLUMN>
				<COLUMN dataField="TXT" type="Char" minWidth="50" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" otherFunction="text" otherComplement="*ROW">
				</COLUMN>
				<COLUMN dataField="CODTXT" type="Char" visible="false" totalFunction="text" otherFunction="text" calc="true">
					<CALC formula="ROW.TXT" condition="ROW.COD == ROW.TXT"/>
					<CALC formula="ROW.COD + ' - ' + ROW.TXT" condition="ROW.COD != ROW.TXT"/>
				</COLUMN>
				<COLUMN dataField="N" width="80" type="Number" outputFormat="= SELECT.DATA2" headerText="Total" textAlign="right" totalFunction="sum" otherFunction="sum">
				</COLUMN>
				<COLUMN dataField="N_P" type="Number" headerText="% / Total" width="70" outputFormat="0%" textAlign="right" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
					<CALC formula="ROW.N / TOTALROW.N * 100"/>
				</COLUMN>
				<COLUMN dataField="N0"  width="70" visibleCondition="VIEW.COLH0 != null"  type="Number"  outputFormat="= SELECT.DATA2" fixed="false" headerText="&lt;&lt;" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N1"  width="70" visibleCondition="VIEW.COLH1 != null"  type="Number"  outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH1"  headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N2"  width="70" visibleCondition="VIEW.COLH2 != null"  type="Number"  outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH2"  headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N3"  width="70" visibleCondition="VIEW.COLH3 != null"  type="Number"  outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH3"  headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N4"  width="70" visibleCondition="VIEW.COLH4 != null"  type="Number"  outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH4"  headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N5"  width="70" visibleCondition="VIEW.COLH5 != null"  type="Number"  outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH5"  headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N6"  width="70" visibleCondition="VIEW.COLH6 != null"  type="Number"  outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH6"  headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N7"  width="70" visibleCondition="VIEW.COLH7 != null"  type="Number"  outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH7"  headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N8"  width="70" visibleCondition="VIEW.COLH8 != null"  type="Number"  outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH8"  headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N9"  width="70" visibleCondition="VIEW.COLH9 != null"  type="Number"  outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH9"  headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N10" width="70" visibleCondition="VIEW.COLH10 != null" type="Number"  outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH10" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N11" width="70" visibleCondition="VIEW.COLH11 != null" type="Number"  outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH11" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N12" width="70" visibleCondition="VIEW.COLH12 != null" type="Number"  outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH12" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
			</DATAGRID>
		</ONGLET>
	</PRESENTATION>
</VUE>
