<?xml version="1.0" encoding="ISO-8859-15"?>
<VUE name="ACTI000021" label="Activité. Séjours facturés 'Actes'" title="= SELECT.QUELMONTANT2 + ' par séjour (' + SELECT.QUELLEDATE_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_ACTI000078.HTML"
    helpDokuWIkiDir="activite:activite_facturee_et_valorisee:activite_honoraire" 
    helpDokuWIkiFile="acti000078" 
>    
	<VIEWPROPERTIES>
		<PROPERTYx dataLink="VIEWPROPERTIES" nameField="name" valueField="value"/>
	</VIEWPROPERTIES>
	<VIEWPROPERTIES>
		<PROPERTY name="ACTECOLUMN">
			<value><![CDATA[[EVAL 
								switch ('[AFFICHERACTE]') {
								case 'ACT':
									return 'date_debut, medecin_facture_nom_prenom, acte_code, ';
									break;
								case 'PRE':
									return 'date_debut, medecin_facture_nom_prenom, prestation_code, ';
									break;
								default:
									return "'', '', '', ";
								}
					EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="MT1">
			<value><![CDATA[[EVAL 
								switch ('[QUELMONTANT]') {
								case '1':
									return 'montant_facture';
									break;
								case '2':
									return 'montant_comptabilise';
									break;
								case 'MTFACI':
									return 'montant_facture + COALESCE(montant_facture_actes_inclus_dans_sejour,0)';
									break;
								case 'MTI':
									return 'COALESCE(montant_facture_actes_inclus_dans_sejour,0)';
									break;
								case '3':
									return 'montant_facture + montant_non_facture';
									break;
								default:
									return 'montant_facture';
								}
					EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="MT2">
			<value><![CDATA[[EVAL 
								switch ('[QUELMONTANT]') {
								case '1':
									return 'montant_facture_1';
									break;
								case '2':
									return 'montant_comptabilise_1';
									break;
								case 'MTFACI':
									return 'montant_facture_1 + COALESCE(montant_facture_1_actes_inclus_dans_sejour,0)';
									break;
								case 'MTI':
									return 'COALESCE(montant_facture_1_actes_inclus_dans_sejour,0)';
									break;
								case '3':
									return 'montant_facture_1 + montant_non_facture';
									break;
								default:
									return '0';
								}
					EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="MT3">
			<value><![CDATA[[EVAL 
								switch ('[QUELMONTANT]') {
								case '1':
									return 'montant_facture_2 + montant_facture_22';
									break;
								case '2':
									return 'montant_comptabilise_2 + montant_comptabilise_22';
									break;
								case 'MTFACI':
									return 'montant_facture_2 + COALESCE(montant_facture_2_actes_inclus_dans_sejour,0) + montant_facture_22 + COALESCE(montant_facture_22_actes_inclus_dans_sejour,0)';
									break;
								case 'MTI':
									return 'COALESCE(montant_facture_2_actes_inclus_dans_sejour,0) + COALESCE(montant_facture_22_actes_inclus_dans_sejour,0)';
									break;
								case '3':
									return 'montant_facture_2';
									break;
								default:
									return '0';
								}
					EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="MT4">
			<value><![CDATA[[EVAL 
								switch ('[QUELMONTANT]') {
								case '1':
									return 'montant_facture_0';
									break;
								case '2':
									return 'montant_comptabilise_0';
									break;
								case 'MTFACI':
									return 'montant_facture_0 + COALESCE(montant_facture_0_actes_inclus_dans_sejour,0)';
									break;
								case 'MTI':
									return 'COALESCE(montant_facture_0_actes_inclus_dans_sejour,0)';
									break;
								case '3':
									return 'montant_facture_0';
									break;
								default:
									return '0';
								}
					EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="MT5">
			<value><![CDATA[[EVAL 
								switch ('[QUELMONTANT]') {
								case '1':
									return 'montant_depassement';
									break;
								case '2':
									return 'montant_depassement';
									break;
								case 'MTFACI':
									return 'montant_depassement';
									break;
								case '3':
									return 'montant_depassement';
									break;
								default:
									return '0';
								}
					EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="MT6">
			<value><![CDATA[[EVAL 
								switch ('[QUELMONTANT]') {
								case '1':
									return 'montant_non_facture';
									break;
								case 'MTFACI':
									return 'montant_non_facture';
									break;
                                case '3':
									return 'montant_non_facture';
									break;
								default:
									return '0';
								}
					EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="MONTANT_SELECT">
			<value><![CDATA[[EVAL 
								switch ('[QUELMONTANT]') {
								case '1':
									return 'AND (montant_facture <> 0 OR montant_depassement <> 0 OR montant_non_facture <> 0)';
									break;
								case '2':
									return 'AND (montant_comptabilise <> 0)';
									break;
								case 'MTFACI':
									return 'AND (montant_facture <> 0 OR montant_depassement <> 0 OR montant_non_facture <> 0 OR COALESCE(montant_facture_actes_inclus_dans_sejour,0) <> 0)';
									break;
								case 'MTI':
									return 'AND (COALESCE(montant_facture_actes_inclus_dans_sejour,0) <> 0)';
									break;
                                case '3':
									return 'AND (montant_facture <> 0 OR montant_depassement <> 0 OR montant_non_facture <> 0)';
									break;
								default:
									return '';
								}
					EVAL]]]></value>
		</PROPERTY>	
		<PROPERTY name="TIERS_SELECT">
			<value><![CDATA[[EVAL 
								switch ('[DATA1]') {
								case 'SEJPAT':
									return 'AND  (tiers_payant_0_id != 0 and montant_facture_0 != 0)';
									break;
								case 'SEJAMO':
									return 'AND (tiers_payant_1_id != 0 and montant_facture_1 != 0)';
									break;
								case 'SEJAMC':
									return 'AND (tiers_payant_2_id != 0 and montant_facture_2 != 0)';
									break;
								default:
									return '';
								}
					EVAL]]]></value>
		</PROPERTY>
			<PROPERTY name="QUELLEDATE_FIELD" value="" >
				<value>
					<![CDATA[
						[EVAL 
							return ACTI_get_quelledate2("[QUELLEDATE]");
						EVAL]
					]]>
				</value>
			</PROPERTY>  
	</VIEWPROPERTIES>
	<SELECTIONS label="Paramètres de l'analyse">
		<GROUP label="Période">
			<FIELD name="QUELLEDATE" label="" UI="combo" default="1" default2="date_fin">
				<OPTION label="Date activité" data="1" data2="v_factures_lignes_h_3.date_fin"/>
				<OPTION label="Date sortie" data="2" data2="v_factures_lignes_h_3.date_fin_facture"/>
				<OPTION label="Date facture" data="3" data2="v_factures_lignes_h_3.date_facture"/>
				<OPTION label="Date vente" data="4" data2="v_factures_lignes_h_3.date_vente"/>
			</FIELD>
			<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="2007-01-01" globalListProvider="DATE_DEBUT" >
			</FIELD>
			<FIELD name="TOPERIODE" label="à" UI="combo" tree="true" width="200" default="2007-01-31" globalListProvider="DATE_FIN" >
			</FIELD>
		</GROUP>
		<GROUP label="Donnée">
			<FIELD name="QUELMONTANT" label="" UI="combo" default="1">
				<OPTION label="Montant facturé" data="1" data2="Facturation actes"/>
				<OPTION label="Montant facturé et inclus dans séjour" data="MTFACI" data2="Facturation actes et actes inclus dans séjour" condition="ENV.TYPEETS != '1'"/>
				<OPTION label="Montant inclus dans séjour" data="MTI" data2="Actes inclus dans séjour" condition="ENV.TYPEETS != '1'"/>
				<OPTION label="Montant comptabilisé" data="2" data2="Comptabilisation actes"/>
				<OPTION label="Montant Total" data="3" data2="Facturation + valorisation"/>
			</FIELD>
			<FIELD name="AFFICHERACTE" label="" UI="combo" default="-1">
				<OPTION label="Pas de détail des actes" data="-1" />
				<OPTION label="Détail des prestations" data="PRE" />
				<OPTION label="Détail des actes" data="ACT" />
			</FIELD>
		</GROUP>
		<GROUP label="Données 1">
			<FIELD name="DATA1" tree="true" label="Données" UI="combo" default="MTFAC" width="400" showIfNotDefault="true" printable="false" visible="false">
				<OPTION label="PRESTATIONS_H_DATA" data="" globalListProvider="PRESTATIONS_H_DATA"/>
			</FIELD>
		</GROUP>
	</SELECTIONS>
	<SELECTIONS componentName="FILTRES_PRESTATIONS_H_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_SEJOURS_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_PATIENTS_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_PASSAGES_SELECTIONS" />
	<QUERIES>
		<QUERY label="">
			<SQL optimizer="V_FACTURES_LIGNES_H_X" optimizer2="V_SEJOURS_X" 
				select="SELECT 
                            v_factures_lignes_h_3.no_sejour,
							nom || ' ' || prenom, 
							v_sejours_1.no_patient, 
							date_entree, 
							CASE WHEN v_sejours_1.date_sortie &lt;&gt; '2099-12-31' THEN to_char(v_sejours_1.date_sortie,'YYYY-MM-DD') ELSE '' END::text, 
							[VIEW.ACTECOLUMN]
							SUM([VIEW.MT1]),
							SUM([VIEW.MT2]),
							SUM([VIEW.MT3]),
							SUM([VIEW.MT4]),
							SUM([VIEW.MT5]),
							SUM([VIEW.MT6]),

							SUM(nb_rubrique),
							SUM(nb_rubrique * coefficient),
							SUM(nb_prestation),
							SUM(nb_prestation * coefficient)
						FROM #V_FACTURES_LIGNES_H_X#
					    /*ce JOIN se fait selon RULE 0011 ou 0111 de part le dboptimizer #V_FACTURES_LIGNES_H_X#*/
					    JOIN #V_SEJOURS_X#
						LEFT JOIN activite.p_patients ON v_sejours_1.no_patient = p_patients.no_patient
						
						WHERE v_factures_lignes_h_3.[VIEW.QUELLEDATE_FIELD] &gt;= '[PERIODE]' AND v_factures_lignes_h_3.[VIEW.QUELLEDATE_FIELD] &lt;='[TOPERIODE]'

						[VIEW.TIERS_SELECT]
						[VIEW.MONTANT_SELECT]
						
						[VIEW.SEJOURS_SELECT]
						[VIEW.ACTES_SELECT]
						[VIEW.PATIENTS_SELECT]
						[VIEW.PASSAGES_SELECT]
					
						GROUP BY 1,2,3,4,5,6,7,8

						ORDER BY 1">
				<FIELDS>
					<FIELD name="SEJ"/>
					<FIELD name="NOM" ifHideNames="Non autorisé"/>
					<FIELD name="NPAT"/>
					<FIELD name="DENT"/>
					<FIELD name="DSOR"/>
					<FIELD name="DACT"/>
					<FIELD name="MED"/>
					<FIELD name="ACT"/>
					<FIELD name="M1"/>
					<FIELD name="M2"/>
					<FIELD name="M3"/>
					<FIELD name="M4"/>
					<FIELD name="M5"/>
					<FIELD name="M6"/>
					<FIELD name="NR"/>
					<FIELD name="NCR"/>
					<FIELD name="NP"/>
					<FIELD name="NCP"/>
				</FIELDS>
			</SQL>
            <SQL optimizer="V_FACTURES_LIGNES_H_X" optimizer2="V_SEJOURS_X" 
				select="SELECT 
                            '-9999999',
							'Patients'|| ' : ' ||count(distinct v_sejours_1.no_patient), 
                            'Séjours' || ' : ' ||count(distinct v_factures_lignes_h_3.no_sejour)::text,
							'',
							'',
							'',
							'',
                            '',
							SUM([VIEW.MT1]),
							SUM([VIEW.MT2]),
							SUM([VIEW.MT3]),
							SUM([VIEW.MT4]),
							SUM([VIEW.MT5]),
							SUM([VIEW.MT6]),

							SUM(nb_rubrique),
							SUM(nb_rubrique * coefficient),
							SUM(nb_prestation),
							SUM(nb_prestation * coefficient)
						FROM #V_FACTURES_LIGNES_H_X#
					    /*ce JOIN se fait selon RULE 0011 ou 0111 de part le dboptimizer #V_FACTURES_LIGNES_H_X#*/
					    JOIN #V_SEJOURS_X#
						LEFT JOIN activite.p_patients ON v_sejours_1.no_patient = p_patients.no_patient
						
						WHERE v_factures_lignes_h_3.[VIEW.QUELLEDATE_FIELD] &gt;= '[PERIODE]' AND v_factures_lignes_h_3.[VIEW.QUELLEDATE_FIELD] &lt;='[TOPERIODE]'

						[VIEW.TIERS_SELECT]
						[VIEW.MONTANT_SELECT]
						
						[VIEW.SEJOURS_SELECT]
						[VIEW.ACTES_SELECT]
						[VIEW.PASSAGES_SELECT]
                        ">
				<FIELDS>
					<FIELD name="SEJ"/>
					<FIELD name="NOM" ifHideNames="Non autorisé"/>
					<FIELD name="NPAT"/>
					<FIELD name="DENT"/>
					<FIELD name="DSOR"/>
					<FIELD name="DACT"/>
					<FIELD name="MED"/>
					<FIELD name="ACT"/>
					<FIELD name="M1"/>
					<FIELD name="M2"/>
					<FIELD name="M3"/>
					<FIELD name="M4"/>
					<FIELD name="M5"/>
					<FIELD name="M6"/>
					<FIELD name="NR"/>
					<FIELD name="NCR"/>
					<FIELD name="NP"/>
					<FIELD name="NCP"/>
				</FIELDS>
			</SQL>
		</QUERY>
		<QUERY type="propertiesLink" name="VIEWPROPERTIES" forRows="false">
		</QUERY>
	</QUERIES>
	<PRESENTATION>
		<VIEWLINKS>
			<VIEWLINK label="Détail séjour" shortLabel="Détail séjour" view="ACTI000020.XML">
				<ARG name="SEJOUR" value="ROW.SEJ"/>
			</VIEWLINK>
		</VIEWLINKS>
		<ONGLET excelLabel="Facturation" label="Facturation">
			<DATAGRID title="" total="true" showOthers="true" key="RANG" headerHeight="48" printRatio="0.8" totalRowInRows="= ROW.SEJ == '-9999999'">
				<COLUMN dataField="SEJ" frozen="left" width="100" type="Char" headerText="No séjour" textAlign="left" otherFunction="text" totalFunction="text">
                    <HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
                </COLUMN>
                <COLUMN dataField="NPAT" frozen="left" width="100" type="Char" visible="true" headerText="N° Patient" textAlign="left" otherFunction="text" totalFunction="text">
                    <HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
                </COLUMN>
				<COLUMN dataField="NOM" type="Char" frozen="left" minWidth="50" headerText="Nom" textAlign="left" totalFunction="text" totalComplement="TOTAL">
                    <HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
                </COLUMN>
				<COLUMN dataField="DENT" width="60" type="Date" inputFormat="AAAA-MM-JJ" outputFormat="DD/MM/YY" fixed="false" headerText="Date entrée" textAlign="right" totalFunction="text">
                    <HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
                </COLUMN>
				<COLUMN dataField="DSOR" width="60" type="Date" inputFormat="AAAA-MM-JJ" outputFormat="DD/MM/YY" fixed="false" headerText="Date sortie" textAlign="right" totalFunction="text">
                    <HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
                </COLUMN>
				<COLUMN dataField="ACT" type="Char" visibleCondition="SELECT.AFFICHERACTE != '-1'" width="80" headerText="Acte" textAlign="left" totalFunction="text" totalComplement="">
                    <HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
                </COLUMN>
				<COLUMN dataField="DACT" width="60" type="Date" visibleCondition="SELECT.AFFICHERACTE != '-1'" inputFormat="AAAA-MM-JJ" outputFormat="DD/MM/YY" fixed="false" headerText="Date acte" textAlign="right" totalFunction="text">
                    <HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
                </COLUMN>
				<COLUMN dataField="MED" type="Char" visibleCondition="SELECT.AFFICHERACTE != '-1'" minWidth="80" headerText="Médecin" textAlign="left" totalFunction="text" totalComplement="">
                    <HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
                </COLUMN>
				<COLUMN dataField="NP" width="80" type="Number" outputFormat="#" headerText="Nombre d'actes" textAlign="right" totalFunction="sum" otherFunction="">
                    <HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
                </COLUMN>
				<COLUMN dataField="NCP" width="80" type="Number" outputFormat="#,00" headerText="Coeff." textAlign="right" totalFunction="sum" otherFunction="">
                    <HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
                </COLUMN>
				<COLUMN dataField="M1" width="80" type="Number" outputFormat="#E" visible="true" headerText="
								if (SELECT.QUELMONTANT == '1') {return 'Total facturé'}
								if (SELECT.QUELMONTANT == 'MTFACI') {return 'Total facturé et actes inclus'}
								if (SELECT.QUELMONTANT == 'MTI') {return 'Total Actes inclus dans séjour'}
								if (SELECT.QUELMONTANT == '2') {return 'Total comptabilisé'}
								if (SELECT.QUELMONTANT == 'ENF') {return 'Total en-cours'}
								if (SELECT.QUELMONTANT == 'MF-ENF') {return 'Total'}
								if (SELECT.QUELMONTANT == '3') {return 'Total'}
					" headerTextCalc="true" textAlign="right" totalFunction="sum" otherFunction="sum">
                    <HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
				</COLUMN>
				<COLUMN dataField="M2" width="90" type="Number" visibleCondition="VIEW.MT2 != '0'" headerText="
								if (SELECT.QUELMONTANT == '1') {return 'Facturé AMO'}
								if (SELECT.QUELMONTANT == '2') {return 'Comptabilisé AMO'}
								if (SELECT.QUELMONTANT == 'MTFACI') {return 'Facturé AMO'}
								if (SELECT.QUELMONTANT == 'MTI') {return 'Facturé AMO'}
								if (SELECT.QUELMONTANT == 'ENF') {return 'En-cours AMO'}
								if (SELECT.QUELMONTANT == 'MF-ENF') {return 'Montant Facturé'}
                                if (SELECT.QUELMONTANT == '3') {return 'Total AMO'}
					" headerTextCalc="true" outputFormat="#E" textAlign="right" totalFunction="sum" otherFunction="">
                    <HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
				</COLUMN>
				<COLUMN dataField="M3" width="90" type="Number" visibleCondition="VIEW.MT3 != '0'" headerText="
								if (SELECT.QUELMONTANT == '1') {return 'Facturé AMC'}
								if (SELECT.QUELMONTANT == '2') {return 'Comptabilisé AMC'}
								if (SELECT.QUELMONTANT == 'MTFACI') {return 'Facturé AMC'}
								if (SELECT.QUELMONTANT == 'MTI') {return 'Facturé AMC'}
								if (SELECT.QUELMONTANT == 'ENF') {return 'En-cours AMC'}
								if (SELECT.QUELMONTANT == 'MF-ENF') {return 'Montant En-cours'}
                                if (SELECT.QUELMONTANT == '3') {return 'Total AMC'}
					" headerTextCalc="true" outputFormat="#E" textAlign="right" totalFunction="sum" otherFunction="sum">
                    <HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
				</COLUMN>
				<COLUMN dataField="M4" width="90" type="Number" visibleCondition="VIEW.MT4 != '0'" headerText="
								if (SELECT.QUELMONTANT == '1') {return 'Facturé Patient'}
								if (SELECT.QUELMONTANT == '2') {return 'Comptabilisé Patient'}
								if (SELECT.QUELMONTANT == 'MTFACI') {return 'Facturé Patient'}
								if (SELECT.QUELMONTANT == 'MTI') {return 'Facturé Patient'}
								if (SELECT.QUELMONTANT == 'ENF') {return 'En-cours Patient'}
								if (SELECT.QUELMONTANT == 'MF-ENF') {return ''}
                                if (SELECT.QUELMONTANT == '3') {return 'Total Patient'}
					" headerTextCalc="true" outputFormat="#E" textAlign="right" totalFunction="sum" otherFunction="sum">
                    <HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
				</COLUMN>
				<COLUMN dataField="M5" width="90" type="Number" visibleCondition="VIEW.MT5 != '0'" headerText="
								if (SELECT.QUELMONTANT == '1') {return 'Dépassements'}
								if (SELECT.QUELMONTANT == '2') {return 'Dépassements'}
								if (SELECT.QUELMONTANT == 'MTFACI') {return 'Dépassements'}
								if (SELECT.QUELMONTANT == 'MTI') {return ''}
								if (SELECT.QUELMONTANT == 'ENF') {return ''}
								if (SELECT.QUELMONTANT == 'MF-ENF') {return ''}
                                if (SELECT.QUELMONTANT == '3') {return 'Dépassements'}
					" headerTextCalc="true" outputFormat="#E" textAlign="right" totalFunction="sum" otherFunction="sum">
                    <HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
				</COLUMN>
				<COLUMN dataField="MCONV" type="Number" headerText="C.A. conventionné" width="90" visible="true" outputFormat="0E" textAlign="right" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true" 
				description="=if (SELECT.QUELMONTANT == '1') {return 'Chiffre d\'affaire conventionné = C.A. facturé - C.A. dépassements'}
								if (SELECT.QUELMONTANT == '2') {return 'Chiffre d\'affaire conventionné = C.A. comptabilisé - C.A. dépassements'}
								if (SELECT.QUELMONTANT == 'MTFACI') {return 'Chiffre d\'affaire conventionné = C.A. facturé - C.A. dépassements'}
								if (SELECT.QUELMONTANT == 'MTI') {return ''}
								if (SELECT.QUELMONTANT == 'ENF') {return ''}
								if (SELECT.QUELMONTANT == 'MF-ENF') {return ''}
								if (SELECT.QUELMONTANT == '3') {return 'Chiffre d\'affaire conventionné = (C.A. facturé + valorisé) - C.A. dépassements'}
							">
					<CALC formula="ROW.M1 - ROW.M5"/>
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
				</COLUMN>
				<COLUMN dataField="M6" width="90" type="Number" visibleCondition="VIEW.MT6 != '0'" headerText="
								if (SELECT.QUELMONTANT == '1') {return 'C.A. valorisés'}
								if (SELECT.QUELMONTANT == '2') {return ''}
								if (SELECT.QUELMONTANT == 'MTFACI') {return 'C.A. valorisés'}
								if (SELECT.QUELMONTANT == 'MTI') {return ''}
								if (SELECT.QUELMONTANT == 'ENF') {return ''}
								if (SELECT.QUELMONTANT == 'MF-ENF') {return ''}
								if (SELECT.QUELMONTANT == '3') {return 'C.A. valorisés'}
					" headerTextCalc="true" outputFormat="#E" textAlign="right" totalFunction="sum" otherFunction="sum">
                    <HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
				</COLUMN>
			</DATAGRID>
		</ONGLET>
	</PRESENTATION>
</VUE>
