<?xml version="1.0" encoding="ISO-8859-15"?>
<VUE name="ACTI000104" label="Activité. Comptabilisation et en-cours" title="= 'Comptabilisation et En-cours (' + SELECT.OPTION2_LABEL + ') par ' + SELECT.GROUPBY_LABEL + ' (' +  SELECT.PERIODE_LABEL + ' à ' + SELECT.TOPERIODE_LABEL + ')'" database="iCTI" swf="*CTI_view1" softCode="iCTI_activite" globals="ACTI_globals.XML" componentsFile="ACTI_components.XML"
	 helpFile="iCTI_ACTI_ACTI000104.HTML"
	 helpDokuWIkiDir="activite:comptabilisation_et_en_cours:encours"
	 helpDokuWIkiFile="acti000104"
>
	<VIEWPROPERTIES componentName="PROPERTIES_PRESTATIONS"/>
	<VIEWPROPERTIES>
		<PROPERTY name="OPTION2_WHERE">
			<value><![CDATA[[EVAL 
								switch ('[OPTION2]') {
								case 'SOR':
									return "AND montant_encours_sorti <> 0";
									break;
								default:
									return "";
								}
					EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="SHOW_FILTER_AVEC_PRESTATION">
			<value>
				<![CDATA[[EVAL 
						return "false";
				EVAL]]]>
			</value>
		</PROPERTY>
	</VIEWPROPERTIES>
	<SELECTIONS label="Paramètres de l'analyse" displayText="= var display:String = '';
						display = display + 'Source en-cours : #B#' + SELECT.SOURCE_ENCOURS_LABEL + '#/B#';
						
						return display;
						">
		<GROUP label="Période comptable">
			<FIELD name="ALIAS_PERIODE" label="" UI="combo" width="220" default="CUM_LAST_MONTH" tree="true" globalListProvider="ALIAS_PERIODE" />
			<FIELD name="PERIODE" label="de" UI="combo" tree="true" width="200" default="2009-01-01" globalListProvider="DATE_DEBUT" >
			</FIELD>
			<FIELD name="TOPERIODE" label="à" UI="combo" tree="true" width="200" default="2009-01-31" globalListProvider="DATE_FIN" >
			</FIELD>
		</GROUP>
		<GROUP>
			<FIELD name="GROUPBY" label="Regroupement" UI="combo" default="SER" width="200" tree="true">
				<OPTION label="PRESTATIONS_ENCOURS_GROUPBY" data="" globalListProvider="PRESTATIONS_ENCOURS_GROUPBY"/>
				<OPTION label="Mois d'activité" data="MOIA"/>
				<OPTION label="Mois de sortie" data="MOIS"/>
				<OPTION label="Mois de ventes" data="MOIV"/>
			</FIELD>
			<FIELD name="GROUPBY_TAB" 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="" UI="combo" default="-1" width="200" tree="true">
				<OPTION label="" data="-1"/>
				<OPTION label="PRESTATIONS_ENCOURS_GROUPBY" data="" globalListProvider="PRESTATIONS_ENCOURS_GROUPBY"/>
				<OPTION label="Mois d'activité" data="MOIA"/>
				<OPTION label="Mois de sortie" data="MOIS"/>
				<OPTION label="Mois de ventes" data="MOIV"/>
			</FIELD>
		</GROUP>
		<GROUP label="Options">
			<FIELD name="OPTION1" label="" UI="combo" width="200" default="-1" >
				<OPTION label="Nombres et montants" data="-1"/>
				<OPTION label="Montants uniquement" data="MNT"/>
			</FIELD>
			<FIELD name="OPTION2" label="" UI="combo" width="200" default="-1" >
				<OPTION label="Présents et Sortis" data="-1"/>
				<OPTION label="Sortis uniquement" data="SOR"/>
			</FIELD>
		</GROUP>
		<GROUP label="Source en-cours">
			<FIELD name="SOURCE_ENCOURS" label="" UI="combo" width="200" default="C" >
				<OPTION label="CTI Santé" data="C"/>
				<OPTION label="Prestataire facturation" data="P"/>
			</FIELD>
		</GROUP>
		<GROUP visible="false">
			<FIELD name="RUBRIQUE_CA" label="C.A." UI="combo" tree="true" width="200" default="-1"  globalListProvider="RUBRIQUES_CA" showIfNotDefault="true" />
			<FIELD name="RUBRIQUE_CODES" label="Codes" UI="text" width="150" default="" showIfNotDefault="true" visible="= SELECT.RUBRIQUE == 'SAISIECODE' " />
		</GROUP>
	</SELECTIONS>
	<SELECTIONS componentName="FILTRES_PRESTATIONS_SOUSSELECTIONS"/>
	<SELECTIONS componentName="FILTRES_PRESTATIONS_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_SEJOURS_SELECTIONS"/>
	<QUERIES>
		<QUERY label="">
			<SQL optimizer="V_SEJOURS_X" optimizer2="V_FACTURES_ENCOURS_LIGNES_C_X">
				<select><![CDATA[		
					CTIPREPAR_TREE
					WORKTABLE{ACTI000104_R}
					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]}
					SIGNIFDATA{[VIEW.ACTIVITE_SIGNIFICATIVE_DATA],, [ACTIVITE_SIGNIFICATIVE_MODE],, [ACTIVITE_SIGNIFICATIVE_NUMBER]}
					INDICATORS{
						0,,
						0,,
						0,,
						0,,
						0,,
						0,,
					
						0,,
						0,,
						0,,
						0,,
						0,,
						0,,
					
						COUNT(DISTINCT v_factures_lignes_c_4.no_sejour),,
						SUM(montant_encours),,
						SUM(montant_encours_sorti),,
						SUM(montant_encours_present),,
						SUM(nb_rubrique * coefficient),,
						SUM(nb_prestation * coefficient),,
						SUM(CASE 
							WHEN v_factures_lignes_c_4.date_fin BETWEEN '[PERIODE]' AND '[TOPERIODE]' THEN montant_encours
							ELSE 0 END),
						SUM(CASE 
							WHEN v_factures_lignes_c_4.date_fin BETWEEN '[PERIODE]' AND '[TOPERIODE]' THEN 0
							ELSE montant_encours END),
						SUM(montant_encours_groupe),,
						SUM(montant_encours_non_groupe),,
						SUM(montant_encours_non_groupe_sorti),,
						SUM(montant_encours_non_groupe_present),,
					}
					FROM #V_FACTURES_ENCOURS_LIGNES_C_X#
					WHERE 
                        date_comptable BETWEEN date(date_trunc('month', '[TOPERIODE]'::date)) AND '[TOPERIODE]'::date AND 
						code_origine = '[SOURCE_ENCOURS]'
						[VIEW.OPTION2_WHERE]
						[VIEW.SEJOURS_SELECT]
						[VIEW.PRESTATIONS_SELECT]

				
				
				]]></select>
			</SQL>
			<SQL optimizer="V_SEJOURS_X" optimizer2="V_FACTURES_ENCOURS_LIGNES_C_X">
				<select><![CDATA[		
					CTIPREPAR_TREE
					WORKTABLE{ACTI000104_E}
					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]}
					SIGNIFDATA{[VIEW.ACTIVITE_SIGNIFICATIVE_DATA],, [ACTIVITE_SIGNIFICATIVE_MODE],, [ACTIVITE_SIGNIFICATIVE_NUMBER]}
					INDICATORS{
						COUNT(DISTINCT v_factures_lignes_c_4.no_sejour),,
						SUM(montant_encours),,
						SUM(montant_encours_sorti),,
						SUM(montant_encours_present),,
						SUM(nb_rubrique * coefficient),,
						SUM(nb_prestation * coefficient),,
					
						0,,
						0,,
						0,,
						0,,
						0,,
						0,,
					
						0,,
						0,,
						0,,
						0,,
						0,,
						0,,
						0,,
						0,,
						0,,
						0,,
						0,,
						0,,
					}
					FROM #V_FACTURES_ENCOURS_LIGNES_C_X#
					WHERE 
                        date_comptable BETWEEN date(date_trunc('month', '[PERIODE]'::date - interval '1 month')) AND date(date_trunc('month','[PERIODE]'::date) - interval '1 day') AND 
						code_origine = '[SOURCE_ENCOURS]'
						[VIEW.OPTION2_WHERE]
						[VIEW.SEJOURS_SELECT]
						[VIEW.PRESTATIONS_SELECT]

				
				
				]]></select>
			</SQL>
			<SQL optimizer="V_SEJOURS_X" optimizer2="V_FACTURES_LIGNES_C_X">
				<select><![CDATA[		
					CTIPREPAR_TREE
					WORKTABLE{ACTI000104_V}
					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]}
					SIGNIFDATA{[VIEW.ACTIVITE_SIGNIFICATIVE_DATA],, [ACTIVITE_SIGNIFICATIVE_MODE],, [ACTIVITE_SIGNIFICATIVE_NUMBER]}
					INDICATORS{
						0,,
						0,,
						0,,
						0,,
						0,,
						0,,
					
						COUNT(DISTINCT v_factures_lignes_c_4.no_sejour),,
						SUM(montant_comptabilise),,
						SUM(nb_rubrique * coefficient),,
						SUM(nb_prestation * coefficient),,
						SUM(CASE 
							WHEN v_factures_lignes_c_4.date_fin BETWEEN '[PERIODE]' AND '[TOPERIODE]' THEN montant_comptabilise  
							ELSE 0 END),
						SUM(CASE 
							WHEN v_factures_lignes_c_4.date_fin BETWEEN '[PERIODE]' AND '[TOPERIODE]' THEN 0
							ELSE montant_comptabilise  END),
					
						0,,
						0,,
						0,,
						0,,
						0,,
						0,,
						0,,
						0,,
						0,,
						0,,
						0,,
						0,,
					}
					FROM #V_FACTURES_LIGNES_C_X#
						JOIN #V_SEJOURS_X# ON v_sejours_1.no_sejour = v_factures_lignes_c_4.no_sejour
					WHERE 
						date_trunc('month', date_vente) BETWEEN '[PERIODE]' AND '[TOPERIODE]'
						[VIEW.SEJOURS_SELECT]
						[VIEW.PRESTATIONS_SELECT]

				
				
				]]></select>
			</SQL>
			<SQL>
				<select><![CDATA[		
					SELECT oidt, labelt, textet, 
						oid1, code1, 
						oid2, code2, 
						oid3, code3, 
						oid, code, texte, level, 
						SUM(indicateurs[1]), 
						SUM(indicateurs[2]), 
						SUM(indicateurs[3]), 
						SUM(indicateurs[4]), 
						SUM(indicateurs[5]), 
						SUM(indicateurs[6]), 
						SUM(indicateurs[7]), 
						SUM(indicateurs[8]), 
						SUM(indicateurs[9]), 
						SUM(indicateurs[10]), 
						SUM(indicateurs[11]), 
						SUM(indicateurs[12]), 
						SUM(indicateurs[13]), 
						SUM(indicateurs[14]), 
						SUM(indicateurs[15]), 
						SUM(indicateurs[16]),
						SUM(indicateurs[17]), 
						SUM(indicateurs[18]),
						SUM(indicateurs[19]), 
						SUM(indicateurs[20]),
						SUM(indicateurs[21]),
						SUM(indicateurs[22]),
						SUM(indicateurs[23]),
						SUM(indicateurs[24]),
						SUM(indicateurs[14] - indicateurs[2]),
						SUM(indicateurs[14] - indicateurs[2] + indicateurs[8]),
						SUM(indicateurs[11] + indicateurs[19]),
						SUM(indicateurs[14] - indicateurs[2] + indicateurs[8]) - SUM(indicateurs[11] + indicateurs[19])
					FROM
					(
						SELECT 
							oidt, labelt, textet, 
							oid1, code1, 
							oid2, code2, 
							oid3, code3, 
							oid, code, texte, level, 
							indicateurs
							FROM ACTI000104_R
						UNION ALL
						SELECT 
							oidt, labelt, textet, 
							oid1, code1, 
							oid2, code2, 
							oid3, code3, 
							oid, code, texte, level, 
							indicateurs
							FROM ACTI000104_E
						UNION ALL
						SELECT 
							oidt, labelt, textet, 
							oid1, code1, 
							oid2, code2, 
							oid3, code3, 
							oid, code, texte, level, 
							indicateurs
							FROM ACTI000104_V
						) subview
					GROUP BY 1,2,3,4,5,6,7,8,9,10,11,12,13
					ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3
				
				
				]]></select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS"/>
					<FIELD name="R_NBS"/>
					<FIELD name="R_MT"/>
					<FIELD name="R_MTS"/>
					<FIELD name="R_MTP"/>
					<FIELD name="R_NBR"/>
					<FIELD name="R_NBP"/>
					<FIELD name="V_NBS"/>
					<FIELD name="V_MT"/>
					<FIELD name="V_NBR"/>
					<FIELD name="V_NBP"/>
					<FIELD name="V_MTPP"/>
					<FIELD name="V_MTHP"/>
					<FIELD name="E_NBS"/>
					<FIELD name="E_MT"/>
					<FIELD name="E_MTS"/>
					<FIELD name="E_MTP"/>
					<FIELD name="E_NBR"/>
					<FIELD name="E_NBP"/>
					<FIELD name="E_MTPP"/>
					<FIELD name="E_MTHP"/>
					<FIELD name="E_MTG"/>
					<FIELD name="E_MTNG"/>
					<FIELD name="E_MTNGS"/>
					<FIELD name="E_MTNGP"/>
					<FIELD name="EV_MT"/>
					<FIELD name="VE_MT"/>
					<FIELD name="VE_MTPP"/>
					<FIELD name="COL"/>
				</FIELDS>
			</SQL>

		</QUERY>
		<QUERY type="propertiesLink" name="VIEWPROPERTIES" forRows="false">
		</QUERY>
	</QUERIES>
	<PRESENTATION>
		<VIEWLINKS>
			<VIEWLINK label="Comparatif" shortLabel="Comparatif" view="ACTI000163.XML" componentName="STANDARD_BASE_VIEWLINK" buttonType="COMPARATIF">
			</VIEWLINK>
			<VIEWLINK label="Evolution" shortLabel="Evolution" view="ACTI000108.XML" componentName="STANDARD_BASE_VIEWLINK" component2Name="PERIODICITE_VIEWLINK" component3Name="STANDARD_BASE_VIEWLINK" buttonType="EVOLUTION">
			</VIEWLINK>
			<!-- <VIEWLINK label="Analyse croisée" shortLabel="Analyse croisée" view="ACTI000139.XML" componentName="STANDARD_BASE_VIEWLINK" buttonType="ANALYSE_CROISEE"> -->
			<!-- </VIEWLINK> -->
			<VIEWLINK label="Liste des séjours" shortLabel="Liste séjours" view="ACTI000107.XML" componentName="PRESTATIONS_BASE_VIEWLINK" component3Name="STANDARD_BASE_VIEWLINK">
				<ARG name="OPTION2" value="if (TAB == 1) {return 'ENC'} else {return SELECT.OPTION2}"/>
			</VIEWLINK>
			<VIEWLINK label="Contrôle des séjours" shortLabel="Contrôle" view="ACTI000006.XML" componentName="PRESTATIONS_BASE_VIEWLINK" component3Name="STANDARD_BASE_VIEWLINK">
			</VIEWLINK>
		</VIEWLINKS>
		<ONGLET excelLabel="Ventes et Encours" label="Ventes et Encours" multiTab="true">
			<CHART title="Séjours pour les 12 premiers" type="columnChart" maxItems="10" maxItemsSortOn="R_NBS" maxItemsSortSeq="D" sortField="COD" sortSeq="A" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char" />
				<SERIE field="R_MT" displayName="A" displayNameCalc="false" />
				<SERIE field="V_MT" displayName="B" displayNameCalc="false" />
				<SERIE field="E_MT" displayName="C" displayNameCalc="false" />
				<SERIE field="VE_MT" displayName="Y" displayNameCalc="false" />
			</CHART>
			<CHART title="Montant vente + en-cours" type="pieChart" subType="" maxItems="5" maxItemsSortOn="VE_MT" maxItemsSortSeq="D" sortField="VE_MT" sortSeq="D" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char" />
				<SERIE field="VE_MT" displayName="Montant" />
			</CHART>
			<DATAGRID title="" total="true" showOthers="true" headerHeight="72" variableRowHeight="true" sortable="= 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="70" type="Char" visible="true" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text" totalComplement="TOTAL">
					<INSERT name="COLUMN_COD_MULTITAB_STYLES"/>
				</COLUMN>
				<COLUMN dataField="TXT" type="Char" minWidth="150" maxWidth="300" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" otherFunction="text" otherComplement="*ROW">
				</COLUMN>

				<COLUMN dataField="R_NBS" width="70" type="Number" visibleCondition="SELECT.OPTION1 == '-1'" outputFormat="#" headerText="Report&#xD;En-cours&#xD;Séjours" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de séjours du mois précédent">

				</COLUMN>
				<COLUMN dataField="R_NBP" width="70" type="Number" visibleCondition="SELECT.GROUPBY == 'PRF' &amp;&amp; SELECT.OPTION1 == '-1'" outputFormat="#" headerText="Report&#xD;En-cours&#xD;Nb prestations" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de prestations du mois précédent">

				</COLUMN>
				<COLUMN dataField="R_NBR" width="70" type="Number" visibleCondition="(SELECT.GROUPBY == 'RUF' || SELECT.GROUPBY == 'RUC') &amp;&amp; SELECT.OPTION1 == '-1'" outputFormat="#" headerText="Report&#xD;En-cours&#xD;Nb rubriques" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de rubriques du mois précédent">

				</COLUMN>
				<COLUMN dataField="R_MT" width="90" type="Number" outputFormat="#E" visible="true" headerText="Report&#xD;En-cours&#xD;Montant&#xD;A" textAlign="right" totalFunction="sum" otherFunction="" description="Montant des En-cours du mois précédent">

				</COLUMN>
				<COLUMN dataField="R_MTS" width="90" type="Number" outputFormat="#E" visibleCondition="SELECT.OPTION2 == '-1'" headerText="Report&#xD;En-cours&#xD;Dont sortis" textAlign="right" totalFunction="sum" otherFunction="" description="Montant des En-cours du mois précédent sur les dossiers sortis">

				</COLUMN>
				<COLUMN dataField="R_MTP" width="90" type="Number" outputFormat="#E" visibleCondition="SELECT.OPTION2 == '-1'" headerText="Report&#xD;En-cours&#xD;Dont présents" textAlign="right" totalFunction="sum" otherFunction="" description="Montant des En-cours du mois précédent sur les dossiers Présents">

				</COLUMN>

				<COLUMN dataField="V_NBS" width="70" type="Number" visibleCondition="SELECT.OPTION1 == '-1'" outputFormat="#" headerText="Ventes&#xD;Séjours" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de séjours des ventes de la période">
				</COLUMN>
				<COLUMN dataField="V_NBP" width="70" type="Number" visibleCondition="SELECT.GROUPBY == 'PRF' &amp;&amp; SELECT.OPTION1 == '-1'" outputFormat="#" headerText="Ventes&#xD;Nb prestations" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de prestations des ventes de la période">
				</COLUMN>
				<COLUMN dataField="V_NBR" width="70" type="Number" visibleCondition="(SELECT.GROUPBY == 'RUF' || SELECT.GROUPBY == 'RUC') &amp;&amp; SELECT.OPTION1 == '-1'" outputFormat="#" headerText="Ventes&#xD;Nb rubriques" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de rubriques des ventes de la période">
				</COLUMN>
				<COLUMN dataField="V_MT" width="90" type="Number" outputFormat="#E" visible="true" headerText="Ventes&#xD;Montant&#xD;B" textAlign="right" totalFunction="sum" otherFunction="" description="Montant des ventes de la période">
				</COLUMN>

				<COLUMN dataField="E_NBS" width="70" type="Number" visibleCondition="SELECT.OPTION1 == '-1'" outputFormat="#" headerText="En-cours&#xD;Séjours" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de séjours du mois">

				</COLUMN>
				<COLUMN dataField="E_NBP" width="70" type="Number" visibleCondition="SELECT.GROUPBY == 'PRF' &amp;&amp; SELECT.OPTION1 == '-1'" outputFormat="#" headerText="En-cours&#xD;Nb prestations" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de prestations du mois">

				</COLUMN>
				<COLUMN dataField="E_NBR" width="70" type="Number" visibleCondition="(SELECT.GROUPBY == 'RUF' || SELECT.GROUPBY == 'RUC') &amp;&amp; SELECT.OPTION1 == '-1'" outputFormat="#" headerText="En-cours&#xD;Nb rubriques" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de rubriques du mois">

				</COLUMN>
				<COLUMN dataField="E_MT" width="90" type="Number" outputFormat="#E" visible="true" headerText="En-cours&#xD;Montant&#xD;C" textAlign="right" totalFunction="sum" otherFunction="" description="Montant des En-cours du mois">

				</COLUMN>
				<COLUMN dataField="E_MTS" width="90" type="Number" outputFormat="#E" visibleCondition="SELECT.OPTION2 == '-1'" headerText="En-cours&#xD;Dont sortis" textAlign="right" totalFunction="sum" otherFunction="" description="Montant des En-cours du mois sur les dossiers sortis">

				</COLUMN>
				<COLUMN dataField="E_MTP" width="90" type="Number" outputFormat="#E" visibleCondition="SELECT.OPTION2 == '-1'" headerText="En-cours&#xD;Dont présents" textAlign="right" totalFunction="sum" otherFunction="" description="Montant des En-cours du mois sur les dossiers Présents">

				</COLUMN>

				<COLUMN dataField="EV_MT" width="90" type="Number" outputFormat="#E" visible="true" headerText="Variation&#xD;En-cours&#xD;Montant&#xD;X=(C-A)" textAlign="right" totalFunction="sum" otherFunction="" description="Variation entre les En-cours du mois et les En-cours du mois précédent (C-A)">
				</COLUMN>


				<COLUMN dataField="VE_MT" width="90" type="Number" outputFormat="#E" visible="true" headerText="Ventes&#xD;+ En-cours&#xD;Montant&#xD;Y=B+(C-A)" textAlign="right" totalFunction="sum" otherFunction="" description="Activité calculé avec les ventes et la variation d'En-cours B+(C-A)">

				</COLUMN>
			</DATAGRID>

		</ONGLET>

		<ONGLET excelLabel="Ventilation selon état séjour" label="Ventilation / Etat" multiTab="true">

			<DATAGRID title="" total="true" showOthers="true" headerHeight="72" variableRowHeight="true" sortable="= 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="70" type="Char" visible="true" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text" totalComplement="TOTAL">
					<INSERT name="COLUMN_COD_MULTITAB_STYLES"/>
				</COLUMN>
				<COLUMN dataField="TXT" type="Char" minWidth="150" maxWidth="300" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" otherFunction="text" otherComplement="*ROW">
				</COLUMN>


				<COLUMN dataField="E_NBS" width="70" type="Number" visibleCondition="SELECT.OPTION1 == '-1'" outputFormat="#" headerText="En-cours&#xD;Séjours" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de séjours du mois">

				</COLUMN>
				<COLUMN dataField="E_NBP" width="70" type="Number" visibleCondition="SELECT.GROUPBY == 'PRF' &amp;&amp; SELECT.OPTION1 == '-1'" outputFormat="#" headerText="En-cours&#xD;Nb prestations" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de prestations du mois">

				</COLUMN>
				<COLUMN dataField="E_NBR" width="70" type="Number" visibleCondition="(SELECT.GROUPBY == 'RUF' || SELECT.GROUPBY == 'RUC') &amp;&amp; SELECT.OPTION1 == '-1'" outputFormat="#" headerText="En-cours&#xD;Nb rubriques" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de rubriques du mois">

				</COLUMN>
				<COLUMN dataField="E_MT" width="90" type="Number" outputFormat="#E" visible="true" headerText="En-cours&#xD;Montant" textAlign="right" totalFunction="sum" otherFunction="" description="Montant des En-cours du mois">

				</COLUMN>
				<COLUMN dataField="E_MTS" width="90" type="Number" outputFormat="#E" visibleCondition="SELECT.OPTION2 == '-1'" headerText="En-cours&#xD;Dont sortis" textAlign="right" totalFunction="sum" otherFunction="" description="Montant des En-cours du mois sur les dossiers sortis">

				</COLUMN>


				<COLUMN dataField="E_MTG" width="90" type="Number" outputFormat="#E" visibleCondition="SELECT.OPTION2 == '-1'" headerText="En-cours&#xD;Dont Groupés ou Hors PMSI" textAlign="right" totalFunction="sum" otherFunction="" description="Montant des En-cours du mois sur les dossiers sortis">

				</COLUMN>

				<COLUMN dataField="E_MTNGS" width="90" type="Number" outputFormat="#E" visibleCondition="SELECT.OPTION2 == '-1'" headerText="En-cours&#xD;Dont Sortis Non groupés" textAlign="right" totalFunction="sum" otherFunction="" description="Montant des En-cours du mois sur les dossiers Présents">

				</COLUMN>

				<COLUMN dataField="E_MTP" width="90" type="Number" outputFormat="#E" visibleCondition="SELECT.OPTION2 == '-1'" headerText="En-cours&#xD;Dont présents" textAlign="right" totalFunction="sum" otherFunction="" description="Montant des En-cours du mois sur les dossiers Présents">

				</COLUMN>


			</DATAGRID>

		</ONGLET>

		<ONGLET excelLabel="Ecarts Période" label="Ecarts Période" multiTab="true">
			<CHART title="Vente + en-cours pour les 12 premiers" type="columnChart" maxItems="12" maxItemsSortOn="R_NBS" maxItemsSortSeq="D" sortField="VE_MT" sortSeq="D" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char" />
				<SERIE field="VE_MT" displayName="X" displayNameCalc="false" />
				<SERIE field="VE_MTPP" displayName="Y" displayNameCalc="false" />
			</CHART>
			<CHART title="Répartition autour de l'écart d'estimation Moyen" type="mixedChart" ctiColors="true" showLegend="false" maxItems="25" maxItemsSortOn="COL" maxItemsSortSeq="D" sortField="COL" sortSeq="D" visibleCondition="" condition="ROW.LVL == '1'">
				<CATEGORY field="COD" type="Char" />
				<SERIE field="COL" displayName="Ecart d'estimation" minField="COLTOT" type="column"/>
				<SERIE field="COLTOT" displayName="Ecart d'estimation Moyen Total" type="line" />
			</CHART>
			<DATAGRID title="" total="true" showOthers="true" headerHeight="72" variableRowHeight="true" sortable="= 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="70" type="Char" visible="true" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text" totalComplement="TOTAL">
					<INSERT name="COLUMN_COD_MULTITAB_STYLES"/>
				</COLUMN>
				<COLUMN dataField="TXT" type="Char" minWidth="150" maxWidth="300" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" otherFunction="text" otherComplement="*ROW">
				</COLUMN>

				<COLUMNx dataField="R_NBS" width="70" type="Number" visibleCondition="SELECT.OPTION1 == '-1'" outputFormat="#" headerText="Report&#xD;En-cours&#xD;Séjours" textAlign="right" totalFunction="sum" otherFunction="sum">

				</COLUMNx>
				<COLUMNx dataField="R_NBP" width="70" type="Number" visibleCondition="SELECT.GROUPBY == 'PRF' &amp;&amp; SELECT.OPTION1 == '-1'" outputFormat="#" headerText="Report&#xD;En-cours&#xD;Nb prestations" textAlign="right" totalFunction="sum" otherFunction="sum">

				</COLUMNx>
				<COLUMNx dataField="R_NBR" width="70" type="Number" visibleCondition="(SELECT.GROUPBY == 'RUF' || SELECT.GROUPBY == 'RUC') &amp;&amp; SELECT.OPTION1 == '-1'" outputFormat="#" headerText="Report&#xD;En-cours&#xD;Nb rubriques" textAlign="right" totalFunction="sum" otherFunction="sum">

				</COLUMNx>
				<COLUMN dataField="R_MT" width="90" type="Number" outputFormat="#E" visible="true" headerText="Report&#xD;En-cours&#xD;Montant&#xD;A" textAlign="right" totalFunction="sum" otherFunction="" description="Montant des En-cours du mois précédent">

				</COLUMN>


				<COLUMNx dataField="V_NBS" width="70" type="Number" visibleCondition="SELECT.OPTION1 == '-1'" outputFormat="#" headerText="Ventes&#xD;Séjours" textAlign="right" totalFunction="sum" otherFunction="sum" >
				</COLUMNx>
				<COLUMNx dataField="V_NBP" width="70" type="Number" visibleCondition="SELECT.GROUPBY == 'PRF' &amp;&amp; SELECT.OPTION1 == '-1'" outputFormat="#" headerText="Ventes&#xD;Nb prestations" textAlign="right" totalFunction="sum" otherFunction="sum">
				</COLUMNx>
				<COLUMNx dataField="V_NBR" width="70" type="Number" visibleCondition="(SELECT.GROUPBY == 'RUF' || SELECT.GROUPBY == 'RUC') &amp;&amp; SELECT.OPTION1 == '-1'" outputFormat="#" headerText="Ventes&#xD;Nb rubriques" textAlign="right" totalFunction="sum" otherFunction="sum">
				</COLUMNx>
				<COLUMN dataField="V_MT" width="90" type="Number" outputFormat="#E" visible="true" headerText="Ventes&#xD;Montant&#xD;B" textAlign="right" totalFunction="sum" otherFunction="" description="Montant des ventes de la période">
				</COLUMN>
				<COLUMN dataField="V_MTPP" width="90" type="Number" outputFormat="#E" headerText="Ventes&#xD;Montant&#xD;Dont Période&#xD;C" textAlign="right" totalFunction="sum" otherFunction="" description="Montant des sortis de la période dans le montant des ventes">

				</COLUMN>
				<COLUMN dataField="P_MTPP" width="90" type="Number" outputFormat="#,0%" headerText="%&#xD;Sortis&#xD;Période" textAlign="right" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true" description="% des sortis de la période dans le montant des ventes (Cx100/B)">
					<CALC formula="ROW.V_MTPP * 100 / ROW.V_MT" />
				</COLUMN>
				<COLUMN dataField="V_MTHP" width="90" type="Number" outputFormat="#E" headerText="Ventes&#xD;Montant&#xD;Dont Hors P" textAlign="right" totalFunction="sum" otherFunction="" description="Montant des sortis avant la période dans le montant des ventes">

				</COLUMN>

				<COLUMNx dataField="E_NBS" width="70" type="Number" visibleCondition="SELECT.OPTION1 == '-1'" outputFormat="#" headerText="En-cours&#xD;Séjours" textAlign="right" totalFunction="sum" otherFunction="sum">

				</COLUMNx>
				<COLUMNx dataField="E_NBP" width="70" type="Number" visibleCondition="SELECT.GROUPBY == 'PRF' &amp;&amp; SELECT.OPTION1 == '-1'" outputFormat="#" headerText="En-cours&#xD;Nb prestations" textAlign="right" totalFunction="sum" otherFunction="sum">

				</COLUMNx>
				<COLUMNx dataField="E_NBR" width="70" type="Number" visibleCondition="(SELECT.GROUPBY == 'RUF' || SELECT.GROUPBY == 'RUC') &amp;&amp; SELECT.OPTION1 == '-1'" outputFormat="#" headerText="En-cours&#xD;Nb rubriques" textAlign="right" totalFunction="sum" otherFunction="sum">

				</COLUMNx>
				<COLUMN dataField="E_MT" width="90" type="Number" outputFormat="#E" visible="true" headerText="En-cours&#xD;Montant&#xD;D" textAlign="right" totalFunction="sum" otherFunction="" description="Montant des En-cours du mois">

				</COLUMN>
				<COLUMN dataField="E_MTPP" width="90" type="Number" outputFormat="#E" headerText="En-cours&#xD;Dont Période&#xD;E" textAlign="right" totalFunction="sum" otherFunction="" description="Montant des Sortis de la période dans le montant des En-cours">

				</COLUMN>
				<COLUMN dataField="E_MTHP" width="90" type="Number" outputFormat="#E" headerText="En-cours&#xD;Dont Hors P" textAlign="right" totalFunction="sum" otherFunction="" description="Montant des Sortis avant la période dans le montant des En-cours">

				</COLUMN>

				<COLUMN dataField="EV_MT" width="90" type="Number" outputFormat="#E" visible="true" headerText="Variation&#xD;En-cours&#xD;Montant&#xD;D-A" textAlign="right" totalFunction="sum" otherFunction="" description="Variation entre les En-cours du mois et les En-cours du mois précédent (D-A)">
				</COLUMN>


				<COLUMN dataField="VE_MT" width="110" type="Number" outputFormat="#E" visible="true" headerText="Ventes+En-cours&#xD;Montant&#xD;X=B+(D-A)" textAlign="right" totalFunction="sum" otherFunction="" description="Activité du mois calculé avec les ventes et la variation d'En-cours X=B+(D-A)">

				</COLUMN>

				<COLUMN dataField="VE_MTPP" width="110" type="Number" outputFormat="#E" visible="true" headerText="Ventes+En-cours&#xD;Montant&#xD;Dont Période&#xD;Y=C+E" textAlign="right" totalFunction="sum" otherFunction="" description="Activité du mois calculé avec les ventes et les En-cours de la période Y=C+D">

				</COLUMN>
				<COLUMN dataField="COL" width="90" type="Number" outputFormat="#E" visible="true" headerText="Ecart d'estimation&#xD;X-Y" textAlign="right" totalFunction="sum" otherFunction="" description="Ecart correspondant à X-Y">

				</COLUMN>
				<COLUMN dataField="COLTOT" 	type="Number" width="80" fixed="false" outputFormat="0#E" 	totalFunction="calc" otherFunction="calc" calc="true" visible="false">
					<CALC formula="TOTALROW.COL *0"/>
				</COLUMN>
			</DATAGRID>


		</ONGLET>
	</PRESENTATION>
</VUE>
