<?xml version="1.0" encoding="ISO-8859-1"?>
<VUE name="ECO000069" 
	label="ECO. Fiche Article" 
	database="iCTI" 
	swf="*CTI_view1" 
	globals="ECO_globals.XML" 
	componentsFile="ECO_components.XML"
	dboptimizer="ECO_dboptimizer.XML"
	softCode="iCTI_eco">
	<CACHE cachable="false" />
	<title><![CDATA[=	
		
		var toReturn = 'Détail articles : ';
		
		switch ([VIEW.ACTION_AFFICHAGE]) {
			case 'MESSAGE' :
				toReturn += 'aucun résultat';
				break;
			case 'AFFICHER' :
				toReturn += VIEW.ARTICLE_TEXTE + ' (' + VIEW.ARTICLE_CODE + ')';
				toReturn += ' - ' + SELECT.PERIODE_LABEL + ' à ' + SELECT.TOPERIODE_LABEL;
				break;
			case 'LISTER' :
				toReturn += 'sélectionnez un article dans la liste';
				break;
		}
		return toReturn;
		
	]]></title>

	<VIEWPROPERTIES>
		<PROPERTY dataLink="VIEWPROPERTIES" nameField="name" valueField="value"/>
	</VIEWPROPERTIES>

	<VIEWPROPERTIES componentName="PROPERTIES_MOUVEMENTS"/>
	<VIEWPROPERTIES componentName="PROPERTIES_GROUPBY"/>
	<VIEWPROPERTIES componentName="PROPERTIES_DATA"/>
	
	<SELECTIONS componentName="FILTRES_ARTICLE_SELECTIONS"/>
	
	<SELECTIONS label="Paramètres de l'analyse" displayText="">
		<GROUP label="Période">
			<FIELD name="ALIAS_PERIODE" label="" UI="combo" width="180" default="CUM_LAST_12_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="Indicateurs commandes">
			<FIELD name="DATA_COMLIST" label="" UI="combo" width="210" default="CTI_COM" default2="" tree="true" printable="false"  visible="false">
				<OPTION label="Options" data="" globalListProvider="DATA_LISTE_IND"  condition="dataItem.data6 &gt; 20 and dataItem.data6 &lt; 30"/>
				<OPTION label="Sélection libre" data="0"/>
			</FIELD>
		</GROUP>
		<GROUP label="Données (15 Max)" visible="= SELECT.DATA_COMLIST == '0'">
			<FIELD name="DATA_COM01" label="" UI="combo" width="200" default="" default2="" tree="true" printable="false" visible="= SELECT.DATA_COMLIST == '0'" update="= if(SELECT.DATA_COMLIST != '0') {return SELECT.DATA_COMLIST2.split('|')[0]} else {return 'no_update'}">
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 20 and dataItem.data6 &lt; 30"/>
				<OPTION label="Options" data="" globalListProvider="DATA_AP_EC"/>
			</FIELD>
			<FIELD name="DATA_COM02" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false" selectable="false" visible="= (SELECT.DATA_COMLIST == '0' &amp;&amp; SELECT.DATA_COM01 != '0')" update="= if(SELECT.DATA_COMLIST != '0') {return SELECT.DATA_COMLIST2.split('|')[1]} else {return 'no_update'}">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 20 and dataItem.data6 &lt; 30"/>
				<OPTION label="Options" data="" globalListProvider="DATA_AP_EC"/>
			</FIELD>
			<FIELD name="DATA_COM03" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false" visible="= (SELECT.DATA_COMLIST == '0' &amp;&amp; SELECT.DATA_COM01 != '0' &amp;&amp;  SELECT.DATA_COM02 != '0')"   update="= if(SELECT.DATA_COMLIST != '0') {return SELECT.DATA_COMLIST2.split('|')[2]} else if(SELECT.DATA_COM02 != '0') {return 'no_update'} else {return '0'}">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 20 and dataItem.data6 &lt; 30"/>
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
		</GROUP >
		<GROUP visible="= SELECT.DATA_COMLIST == '0'">
			<FIELD name="DATA_COM04" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false"  visible="= (SELECT.DATA_COM03 != '0' &amp;&amp;  SELECT.DATA_COM02 != '0' &amp;&amp;  SELECT.DATA_COMLIST == '0' &amp;&amp; SELECT.DATA_COM01 != '0')" update="= if(SELECT.DATA_COMLIST != '0') {return SELECT.DATA_COMLIST2.split('|')[3]} else if(SELECT.DATA_COM03 != '0') {return 'no_update'} else {return '0'}">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 20 and dataItem.data6 &lt; 30"/>
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
			<FIELD name="DATA_COM05" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false"  visible="= (SELECT.DATA_COM03 != '0' &amp;&amp;  SELECT.DATA_COM02 != '0' &amp;&amp;  SELECT.DATA_COMLIST == '0' &amp;&amp; SELECT.DATA_COM01 != '0' &amp;&amp;  SELECT.DATA_COM04 != '0')" update="= if(SELECT.DATA_COMLIST != '0') {return SELECT.DATA_COMLIST2.split('|')[4]} else if(SELECT.DATA_COM04 != '0') {return 'no_update'} else {return '0'}">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 20 and dataItem.data6 &lt; 30"/>
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
			<FIELD name="DATA_COM06" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false"  visible="= (SELECT.DATA_COM03 != '0' &amp;&amp;  SELECT.DATA_COM02 != '0' &amp;&amp;  SELECT.DATA_COMLIST == '0' &amp;&amp; SELECT.DATA_COM01 != '0' &amp;&amp;  SELECT.DATA_COM04 != '0' &amp;&amp;  SELECT.DATA_COM05 != '0')"  update="= if(SELECT.DATA_COMLIST != '0') {return SELECT.DATA_COMLIST2.split('|')[5]} else if(SELECT.DATA_COM05 != '0') {return 'no_update'} else {return '0'}">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 20 and dataItem.data6 &lt; 30"/>
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
		</GROUP >
		<GROUP visible="= SELECT.DATA_COMLIST == '0'">
			<FIELD name="DATA_COM07" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false"  visible="= (SELECT.DATA_COM05 != '0' &amp;&amp;  SELECT.DATA_COM06 != '0' &amp;&amp;  SELECT.DATA_COM04 != '0' &amp;&amp; SELECT.DATA_COM03 != '0' &amp;&amp;  SELECT.DATA_COM02 != '0' &amp;&amp;  SELECT.DATA_COMLIST == '0' &amp;&amp; SELECT.DATA_COM01 != '0')" update="= if(SELECT.DATA_COMLIST != '0') {return SELECT.DATA_COMLIST2.split('|')[6]} else if(SELECT.DATA_COM06 != '0') {return 'no_update'} else {return '0'}">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 20 and dataItem.data6 &lt; 30"/>
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
			<FIELD name="DATA_COM08" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false"  visible="= (SELECT.DATA_COM05 != '0' &amp;&amp;  SELECT.DATA_COM06 != '0' &amp;&amp;  SELECT.DATA_COM04 != '0' &amp;&amp; SELECT.DATA_COM03 != '0' &amp;&amp;  SELECT.DATA_COM02 != '0' &amp;&amp;  SELECT.DATA_COMLIST == '0' &amp;&amp; SELECT.DATA_COM01 != '0' &amp;&amp;  SELECT.DATA_COM07 != '0')"  update="= if(SELECT.DATA_COMLIST != '0') {return SELECT.DATA_COMLIST2.split('|')[7]} else if(SELECT.DATA_COM07 != '0') {return 'no_update'} else {return '0'}">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 20 and dataItem.data6 &lt; 30"/>
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
			<FIELD name="DATA_COM09" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false"  visible="= (SELECT.DATA_COM05 != '0' &amp;&amp;  SELECT.DATA_COM06 != '0' &amp;&amp;  SELECT.DATA_COM04 != '0' &amp;&amp; SELECT.DATA_COM03 != '0' &amp;&amp;  SELECT.DATA_COM02 != '0' &amp;&amp;  SELECT.DATA_COMLIST == '0' &amp;&amp; SELECT.DATA_COM01 != '0' &amp;&amp;  SELECT.DATA_COM07 != '0' &amp;&amp;  SELECT.DATA_COM08 != '0')" update="= if(SELECT.DATA_COMLIST != '0') {return SELECT.DATA_COMLIST2.split('|')[8]} else if(SELECT.DATA_COM08 != '0') {return 'no_update'} else {return '0'}">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 20 and dataItem.data6 &lt; 30"/>
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
		</GROUP>
		<GROUP visible="= SELECT.DATA_COMLIST == '0'">
			<FIELD name="DATA_COM10" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false"  visible="= (SELECT.DATA_COM05 != '0' &amp;&amp;  SELECT.DATA_COM06 != '0' &amp;&amp;  SELECT.DATA_COM04 != '0' &amp;&amp; SELECT.DATA_COM03 != '0' &amp;&amp;  SELECT.DATA_COM02 != '0' &amp;&amp;  SELECT.DATA_COMLIST == '0' &amp;&amp; SELECT.DATA_COM01 != '0' &amp;&amp;  SELECT.DATA_COM07 != '0' &amp;&amp;  SELECT.DATA_COM08 != '0'  &amp;&amp;  SELECT.DATA_COM09 != '0')" update="= if(SELECT.DATA_COMLIST != '0') {return SELECT.DATA_COMLIST2.split('|')[9]} else if(SELECT.DATA_COM09 != '0') {return 'no_update'} else {return '0'}">
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 20 and dataItem.data6 &lt; 30"/>
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
			<FIELD name="DATA_COM11" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false"  visible="= (SELECT.DATA_COM05 != '0' &amp;&amp;  SELECT.DATA_COM06 != '0' &amp;&amp;  SELECT.DATA_COM04 != '0' &amp;&amp; SELECT.DATA_COM03 != '0' &amp;&amp;  SELECT.DATA_COM02 != '0' &amp;&amp;  SELECT.DATA_COMLIST == '0' &amp;&amp; SELECT.DATA_COM01 != '0' &amp;&amp;  SELECT.DATA_COM07 != '0' &amp;&amp;  SELECT.DATA_COM08 != '0'  &amp;&amp;  SELECT.DATA_COM09 != '0'  &amp;&amp;  SELECT.DATA_COM10 != '0')"  update="= if(SELECT.DATA_COMLIST != '0') {return SELECT.DATA_COMLIST2.split('|')[10]} else if(SELECT.DATA_COM10 != '0') {return 'no_update'} else {return '0'}">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 20 and dataItem.data6 &lt; 30"/>
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
			<FIELD name="DATA_COM12" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false"  visible="= (SELECT.DATA_COM05 != '0' &amp;&amp;  SELECT.DATA_COM06 != '0' &amp;&amp;  SELECT.DATA_COM04 != '0' &amp;&amp; SELECT.DATA_COM03 != '0' &amp;&amp;  SELECT.DATA_COM02 != '0' &amp;&amp;  SELECT.DATA_COMLIST == '0' &amp;&amp; SELECT.DATA_COM01 != '0' &amp;&amp;  SELECT.DATA_COM07 != '0' &amp;&amp;  SELECT.DATA_COM08 != '0'  &amp;&amp;  SELECT.DATA_COM09 != '0'  &amp;&amp;  SELECT.DATA_COM10 != '0'  &amp;&amp;  SELECT.DATA_COM11 != '0')" update="= if(SELECT.DATA_COMLIST != '0') {return SELECT.DATA_COMLIST2.split('|')[11]} else if(SELECT.DATA_COM11 != '0') {return 'no_update'} else {return '0'}">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 20 and dataItem.data6 &lt; 30"/>
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
		</GROUP>
		<GROUP visible="= SELECT.DATA_COMLIST == '0'">
			<FIELD name="DATA_COM13" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false"  visible="= (SELECT.DATA_COM05 != '0' &amp;&amp;  SELECT.DATA_COM06 != '0' &amp;&amp;  SELECT.DATA_COM04 != '0' &amp;&amp; SELECT.DATA_COM03 != '0' &amp;&amp;  SELECT.DATA_COM02 != '0' &amp;&amp;  SELECT.DATA_COMLIST == '0' &amp;&amp; SELECT.DATA_COM01 != '0' &amp;&amp;  SELECT.DATA_COM07 != '0' &amp;&amp;  SELECT.DATA_COM08 != '0'  &amp;&amp;  SELECT.DATA_COM09 != '0' &amp;&amp;  SELECT.DATA_COM10 != '0' &amp;&amp;  SELECT.DATA_COM11 != '0'  &amp;&amp;  SELECT.DATA_COM12 != '0')" update="= if(SELECT.DATA_COMLIST != '0') {return SELECT.DATA_COMLIST2.split('|')[12]} else if(SELECT.DATA_COM12 != '0') {return 'no_update'} else {return '0'}">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 20 and dataItem.data6 &lt; 30"/>
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
			<FIELD name="DATA_COM14" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false"  visible="= (SELECT.DATA_COM05 != '0' &amp;&amp;  SELECT.DATA_COM06 != '0' &amp;&amp;  SELECT.DATA_COM04 != '0' &amp;&amp; SELECT.DATA_COM03 != '0' &amp;&amp;  SELECT.DATA_COM02 != '0' &amp;&amp;  SELECT.DATA_COMLIST == '0' &amp;&amp; SELECT.DATA_COM01 != '0' &amp;&amp;  SELECT.DATA_COM07 != '0' &amp;&amp;  SELECT.DATA_COM08 != '0'  &amp;&amp;  SELECT.DATA_COM09 != '0'  &amp;&amp;  SELECT.DATA_COM10 != '0' &amp;&amp;  SELECT.DATA_COM11 != '0'  &amp;&amp;  SELECT.DATA_COM12 != '0' &amp;&amp;  SELECT.DATA_COM13 != '0')"  update="= if(SELECT.DATA_COMLIST != '0') {return SELECT.DATA_COMLIST2.split('|')[13]} else if(SELECT.DATA_COM13 != '0') {return 'no_update'} else {return '0'}">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 20 and dataItem.data6 &lt; 30"/>
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
			<FIELD name="DATA_COM15" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false"  visible="= (SELECT.DATA_COM05 != '0' &amp;&amp;  SELECT.DATA_COM06 != '0' &amp;&amp;  SELECT.DATA_COM04 != '0' &amp;&amp; SELECT.DATA_COM03 != '0' &amp;&amp;  SELECT.DATA_COM02 != '0' &amp;&amp;  SELECT.DATA_COMLIST == '0' &amp;&amp; SELECT.DATA_COM01 != '0' &amp;&amp;  SELECT.DATA_COM07 != '0' &amp;&amp;  SELECT.DATA_COM08 != '0'  &amp;&amp;  SELECT.DATA_COM09 != '0'  &amp;&amp;  SELECT.DATA_COM10 != '0'  &amp;&amp;  SELECT.DATA_COM11 != '0' &amp;&amp;  SELECT.DATA_COM12 != '0' &amp;&amp;  SELECT.DATA_COM13 != '0' &amp;&amp;  SELECT.DATA_COM14 != '0')" update="= if(SELECT.DATA_COMLIST != '0') {return SELECT.DATA_COMLIST2.split('|')[14]} else if(SELECT.DATA_COM14 != '0') {return 'no_update'} else {return '0'}">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 20 and dataItem.data6 &lt; 30"/>
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
		</GROUP>
		<GROUP label="Indicateurs mouvements">
			<FIELD name="DATA_MVTLIST" label="" UI="combo" width="200" default="CTI_MVT" default2="" tree="true" printable="false"  visible="true" >
				<OPTION label="Options" data="" globalListProvider="DATA_LISTE_IND" condition="dataItem.data6 &gt; 10 and dataItem.data6 &lt; 15"/>
				<OPTION label="Sélection libre" data="0"/>
			</FIELD>
		</GROUP>
		<GROUP label="Données (15 Max)" visible="= SELECT.DATA_MVTLIST == '0'">
			<FIELD name="DATA_MVT01" label="" UI="combo" width="200" default="0" default2="" tree="true" printable="false" visible="= SELECT.DATA_MVTLIST == '0'" update="= if(SELECT.DATA_MVTLIST != '0') {return SELECT.DATA_MVTLIST2.split('|')[0]} else {return 'no_update'}">
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 10 and dataItem.data6 &lt; 15"/>
			</FIELD>
			<FIELD name="DATA_MVT02" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false" selectable="false" visible="= (SELECT.DATA_MVTLIST == '0' &amp;&amp; SELECT.DATA_MVT01 != '0')" update="= if(SELECT.DATA_MVTLIST != '0') {return SELECT.DATA_MVTLIST2.split('|')[1]} else {return 'no_update'}">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 10 and dataItem.data6 &lt; 15"/>
			</FIELD>
			<FIELD name="DATA_MVT03" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false" visible="= (SELECT.DATA_MVTLIST == '0' &amp;&amp; SELECT.DATA_MVT01 != '0' &amp;&amp;  SELECT.DATA_MVT02 != '0')"   update="= if(SELECT.DATA_MVTLIST != '0') {return SELECT.DATA_MVTLIST2.split('|')[2]} else if(SELECT.DATA_MVT02 != '0') {return 'no_update'} else {return '0'}">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 10 and dataItem.data6 &lt; 15"/>
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
		</GROUP >
		<GROUP visible="= SELECT.DATA_MVTLIST == '0'">
			<FIELD name="DATA_MVT04" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false"  visible="= (SELECT.DATA_MVT03 != '0' &amp;&amp;  SELECT.DATA_MVT02 != '0' &amp;&amp;  SELECT.DATA_MVTLIST == '0' &amp;&amp; SELECT.DATA_MVT01 != '0')" update="= if(SELECT.DATA_MVTLIST != '0') {return SELECT.DATA_MVTLIST2.split('|')[3]} else if(SELECT.DATA_MVT03 != '0') {return 'no_update'} else {return '0'}">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 10 and dataItem.data6 &lt; 15"/>
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
			<FIELD name="DATA_MVT05" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false"  visible="= (SELECT.DATA_MVT03 != '0' &amp;&amp;  SELECT.DATA_MVT02 != '0' &amp;&amp;  SELECT.DATA_MVTLIST == '0' &amp;&amp; SELECT.DATA_MVT01 != '0' &amp;&amp;  SELECT.DATA_MVT04 != '0')" update="= if(SELECT.DATA_MVTLIST != '0') {return SELECT.DATA_MVTLIST2.split('|')[4]} else if(SELECT.DATA_MVT04 != '0') {return 'no_update'} else {return '0'}">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 10 and dataItem.data6 &lt; 15"/>
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
			<FIELD name="DATA_MVT06" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false"  visible="= (SELECT.DATA_MVT03 != '0' &amp;&amp;  SELECT.DATA_MVT02 != '0' &amp;&amp;  SELECT.DATA_MVTLIST == '0' &amp;&amp; SELECT.DATA_MVT01 != '0' &amp;&amp;  SELECT.DATA_MVT04 != '0' &amp;&amp;  SELECT.DATA_MVT05 != '0')"  update="= if(SELECT.DATA_MVTLIST != '0') {return SELECT.DATA_MVTLIST2.split('|')[5]} else if(SELECT.DATA_MVT05 != '0') {return 'no_update'} else {return '0'}">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 10 and dataItem.data6 &lt; 15"/>
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
		</GROUP >
		<GROUP visible="= SELECT.DATA_MVTLIST == '0'">
			<FIELD name="DATA_MVT07" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false"  visible="= (SELECT.DATA_MVT05 != '0' &amp;&amp;  SELECT.DATA_MVT06 != '0' &amp;&amp;  SELECT.DATA_MVT04 != '0' &amp;&amp; SELECT.DATA_MVT03 != '0' &amp;&amp;  SELECT.DATA_MVT02 != '0' &amp;&amp;  SELECT.DATA_MVTLIST == '0' &amp;&amp; SELECT.DATA_MVT01 != '0')" update="= if(SELECT.DATA_MVTLIST != '0') {return SELECT.DATA_MVTLIST2.split('|')[6]} else if(SELECT.DATA_MVT06 != '0') {return 'no_update'} else {return '0'}">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 10 and dataItem.data6 &lt; 15"/>
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
			<FIELD name="DATA_MVT08" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false"  visible="= (SELECT.DATA_MVT05 != '0' &amp;&amp;  SELECT.DATA_MVT06 != '0' &amp;&amp;  SELECT.DATA_MVT04 != '0' &amp;&amp; SELECT.DATA_MVT03 != '0' &amp;&amp;  SELECT.DATA_MVT02 != '0' &amp;&amp;  SELECT.DATA_MVTLIST == '0' &amp;&amp; SELECT.DATA_MVT01 != '0' &amp;&amp;  SELECT.DATA_MVT07 != '0')"  update="= if(SELECT.DATA_MVTLIST != '0') {return SELECT.DATA_MVTLIST2.split('|')[7]} else if(SELECT.DATA_MVT07 != '0') {return 'no_update'} else {return '0'}">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 10 and dataItem.data6 &lt; 15"/>
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
			<FIELD name="DATA_MVT09" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false"   visible="= (SELECT.DATA_MVT05 != '0' &amp;&amp;  SELECT.DATA_MVT06 != '0' &amp;&amp;  SELECT.DATA_MVT04 != '0' &amp;&amp; SELECT.DATA_MVT03 != '0' &amp;&amp;  SELECT.DATA_MVT02 != '0' &amp;&amp;  SELECT.DATA_MVTLIST == '0' &amp;&amp; SELECT.DATA_MVT01 != '0' &amp;&amp;  SELECT.DATA_MVT07 != '0' &amp;&amp;  SELECT.DATA_MVT08 != '0')" update="= if(SELECT.DATA_MVTLIST != '0') {return SELECT.DATA_MVTLIST2.split('|')[8]} else if(SELECT.DATA_MVT08 != '0') {return 'no_update'} else {return '0'}">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 10 and dataItem.data6 &lt; 15"/>
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
		</GROUP>
		<GROUP visible="= SELECT.DATA_MVTLIST == '0'">
			<FIELD name="DATA_MVT10" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false"   visible="= (SELECT.DATA_MVT05 != '0' &amp;&amp;  SELECT.DATA_MVT06 != '0' &amp;&amp;  SELECT.DATA_MVT04 != '0' &amp;&amp; SELECT.DATA_MVT03 != '0' &amp;&amp;  SELECT.DATA_MVT02 != '0' &amp;&amp;  SELECT.DATA_MVTLIST == '0' &amp;&amp; SELECT.DATA_MVT01 != '0' &amp;&amp;  SELECT.DATA_MVT07 != '0' &amp;&amp;  SELECT.DATA_MVT08 != '0'  &amp;&amp;  SELECT.DATA_MVT09 != '0')" update="= if(SELECT.DATA_MVTLIST != '0') {return SELECT.DATA_MVTLIST2.split('|')[9]} else if(SELECT.DATA_MVT09 != '0') {return 'no_update'} else {return '0'}">
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 10 and dataItem.data6 &lt; 15"/>
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
			<FIELD name="DATA_MVT11" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false"   visible="= (SELECT.DATA_MVT05 != '0' &amp;&amp;  SELECT.DATA_MVT06 != '0' &amp;&amp;  SELECT.DATA_MVT04 != '0' &amp;&amp; SELECT.DATA_MVT03 != '0' &amp;&amp;  SELECT.DATA_MVT02 != '0' &amp;&amp;  SELECT.DATA_MVTLIST == '0' &amp;&amp; SELECT.DATA_MVT01 != '0' &amp;&amp;  SELECT.DATA_MVT07 != '0' &amp;&amp;  SELECT.DATA_MVT08 != '0'  &amp;&amp;  SELECT.DATA_MVT09 != '0'  &amp;&amp;  SELECT.DATA_MVT10 != '0')"  update="= if(SELECT.DATA_MVTLIST != '0') {return SELECT.DATA_MVTLIST2.split('|')[10]} else if(SELECT.DATA_MVT10 != '0') {return 'no_update'} else {return '0'}">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 10 and dataItem.data6 &lt; 15"/>
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
			<FIELD name="DATA_MVT12" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false"   visible="= (SELECT.DATA_MVT05 != '0' &amp;&amp;  SELECT.DATA_MVT06 != '0' &amp;&amp;  SELECT.DATA_MVT04 != '0' &amp;&amp; SELECT.DATA_MVT03 != '0' &amp;&amp;  SELECT.DATA_MVT02 != '0' &amp;&amp;  SELECT.DATA_MVTLIST == '0' &amp;&amp; SELECT.DATA_MVT01 != '0' &amp;&amp;  SELECT.DATA_MVT07 != '0' &amp;&amp;  SELECT.DATA_MVT08 != '0'  &amp;&amp;  SELECT.DATA_MVT09 != '0'  &amp;&amp;  SELECT.DATA_MVT10 != '0'  &amp;&amp;  SELECT.DATA_MVT11 != '0')" update="= if(SELECT.DATA_MVTLIST != '0') {return SELECT.DATA_MVTLIST2.split('|')[11]} else if(SELECT.DATA_MVT11 != '0') {return 'no_update'} else {return '0'}">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 10 and dataItem.data6 &lt; 15"/>
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
		</GROUP>
		<GROUP visible="= SELECT.DATA_MVTLIST == '0'">
			<FIELD name="DATA_MVT13" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false"   visible="= (SELECT.DATA_MVT05 != '0' &amp;&amp;  SELECT.DATA_MVT06 != '0' &amp;&amp;  SELECT.DATA_MVT04 != '0' &amp;&amp; SELECT.DATA_MVT03 != '0' &amp;&amp;  SELECT.DATA_MVT02 != '0' &amp;&amp;  SELECT.DATA_MVTLIST == '0' &amp;&amp; SELECT.DATA_MVT01 != '0' &amp;&amp;  SELECT.DATA_MVT07 != '0' &amp;&amp;  SELECT.DATA_MVT08 != '0'  &amp;&amp;  SELECT.DATA_MVT09 != '0' &amp;&amp;  SELECT.DATA_MVT10 != '0' &amp;&amp;  SELECT.DATA_MVT11 != '0'  &amp;&amp;  SELECT.DATA_MVT12 != '0')" update="= if(SELECT.DATA_MVTLIST != '0') {return SELECT.DATA_MVTLIST2.split('|')[12]} else if(SELECT.DATA_MVT12 != '0') {return 'no_update'} else {return '0'}">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 10 and dataItem.data6 &lt; 15"/>
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
			<FIELD name="DATA_MVT14" label="" UI="combo" width="200" default="0" default2="0" tree="true" printable="false"   visible="= (SELECT.DATA_MVT05 != '0' &amp;&amp;  SELECT.DATA_MVT06 != '0' &amp;&amp;  SELECT.DATA_MVT04 != '0' &amp;&amp; SELECT.DATA_MVT03 != '0' &amp;&amp;  SELECT.DATA_MVT02 != '0' &amp;&amp;  SELECT.DATA_MVTLIST == '0' &amp;&amp; SELECT.DATA_MVT01 != '0' &amp;&amp;  SELECT.DATA_MVT07 != '0' &amp;&amp;  SELECT.DATA_MVT08 != '0'  &amp;&amp;  SELECT.DATA_MVT09 != '0'  &amp;&amp;  SELECT.DATA_MVT10 != '0' &amp;&amp;  SELECT.DATA_MVT11 != '0'  &amp;&amp;  SELECT.DATA_MVT12 != '0' &amp;&amp;  SELECT.DATA_MVT13 != '0')"  update="= if(SELECT.DATA_MVTLIST != '0') {return SELECT.DATA_MVTLIST2.split('|')[13]} else if(SELECT.DATA_MVT13 != '0') {return 'no_update'} else {return '0'}">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP_IND" condition="dataItem.data6 &gt; 10 and dataItem.data6 &lt; 15"/>
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
		</GROUP>
		<GROUP label="Regroupement" visible="1!=1">
			<FIELD name="GROUPBY" label="" UI="combo" width="200" default="AMCMD" tree="true" visible="false">
				<OPTION label="Année-Mois Commande" globalListProvider="DATE_GROUPBY" treeLevel="1"  />
			</FIELD>
			<FIELD name="GROUPBY_2" label="" UI="combo" width="200" default="AMMVT" tree="true" visible="false">
				<OPTION label="Année-Mois Commande" globalListProvider="DATE_GROUPBY" treeLevel="1"  />
			</FIELD>
			<FIELD name="GROUPBY_3" label="" UI="combo" width="200" default="AMSTO" tree="true" visible="false">
				<OPTION label="Année-Mois stock" globalListProvider="DATE_GROUPBY" treeLevel="1"  />				
			</FIELD>
			<FIELD name="GROUPBY_TAB" width="100" label="Présentation" UI="combo" default="AUTO" visible="false">
				<OPTION label="Automatique" data="AUTO"/>
				<OPTION label="Arbre" data="TREE"/>
				<OPTION label="Onglet" data="TAB"/>
			</FIELD>
			<FIELD name="DATE_BASE" label="" width="130" UI="combo" default="CMD" default2="date_commande" visible="false">
				<OPTION label="Date commande" data="CMD" data2="date_commande"/>
			</FIELD>
		</GROUP>
	</SELECTIONS>
	
	<QUERIES>
		<QUERY label="Liste">
			<SQL optimizer=""> 
				<select><![CDATA[		
					SELECT 
						oid,
						code,
						texte
					FROM w_tmp_list
				]]></select>
				<FIELDS>
					<FIELD name="ARTICLE_LIST_ID"/>
					<FIELD name="ARTICLE_LIST_CODE"/>
					<FIELD name="ARTICLE_LIST_TEXTE"/>
				</FIELDS>
			</SQL>
		</QUERY>
		<QUERY label="Fiche articles">
			<SQL optimizer="V_MOUVEMENTS_ARTICLES_X" optimizer2="V_ALL_X">
				<select><![CDATA[		
					SELECT	
						article_code,
						article_texte,
						type_article_code,
						type_article_texte,
						categorie_article_code,
						categorie_article_code || ' - ' || categorie_article_texte,
						sous_categorie_article_code,
						sous_categorie_article_code || ' - ' || sous_categorie_article_texte,
						famille_article_code,
						famille_article_code || ' - ' || famille_article_texte,
						sous_famille_article_code,
						sous_famille_article_code || ' - ' || sous_famille_article_texte,
						classification_atc_code,
						classification_atc_code || ' - ' || classification_atc_texte,
						classification_atc_1_code,
						classification_atc_1_code || ' - ' || classification_atc_1_texte,
						classification_atc_2_code,
						classification_atc_2_code || ' - ' || classification_atc_2_texte,
						classification_atc_3_code,
						classification_atc_3_code || ' - ' || classification_atc_3_texte,
						classification_atc_4_code,
						classification_atc_4_code || ' - ' || classification_atc_4_texte,
						compte_article_code,
						compte_article_code || ' - ' || compte_article_texte,
						'' as fournisseur_code,
						article_texte_fournisseur,
						lpp_code,
						lpp_code || ' - ' || lpp_texte,
						ucd_code,
						ucd_code || ' - ' || ucd_texte,
						CASE WHEN gere_en_stock != '0' THEN 'Oui' ELSE 'Non' END,
						unite_stockage_article_code,
						unite_stockage_article_code || ' - ' || unite_stockage_article_texte,
						unite_distribution_article_code,
						unite_distribution_article_code || ' - ' || unite_distribution_article_texte,
						section_cle_code,
						section_cle_code || ' - ' || section_cle_texte
					FROM 
						(select 1, count(*) from w_tmp_list group by 1 having count(*) = 1) list
						JOIN
						(
							SELECT article_oid AS article_id,ucd_article_id AS ucd_id,lpp_article_id AS lpp_id,compte_id AS compte_article_id,* FROM eco.v_articles_2
						) sub ON 1=1
						LEFT JOIN eco.v_lpp_2 ON lpp_article_id = lpp_oid
						LEFT JOIN eco.v_ucd_2 ON ucd_article_id = ucd_oid
						LEFT JOIN eco.v_comptes_2 ON compte_id = compte_article_oid
						LEFT JOIN 
						( 
							SELECT section_id, t_classes_sections.code AS section_cle_code, t_classes_sections.texte AS section_cle_texte, to_id
							FROM eco.t_classes 
								JOIN eco.t_classes_sections ON classe_id = t_classes.oid
								JOIN eco.t_classes_sections_elements ON section_id = t_classes_sections.oid
							WHERE
								t_classes.code = 'CTI_CLE_REP'
						) rep ON rep.to_id =  [VIEW.REPARTITION_FIELD]
						LEFT JOIN (SELECT 
							ref_fournisseur_oid,
							array_to_string(array_agg(texte || ' (ref. ' || ref_cod || ') '),'- ') AS article_texte_fournisseur
						FROM (
							SELECT
								oid AS ref_fournisseur_oid,
								unnest(ref_fournisseur_id) as ref_id,
								unnest(ref_fournisseur_code) AS ref_cod,
								unnest(ref_fournisseur_texte) AS ref_txt
							FROM eco.t_articles
							) sub 
							LEFT JOIN eco.t_fournisseurs ON ref_id = t_fournisseurs.oid
						GROUP BY 1
						) ref ON article_id = ref_fournisseur_oid
					WHERE 1=1 
						[VIEW.ARTICLE_SELECT]
					
				]]></select>
				<FIELDS>
					<FIELD name="ART_CODE"/>
					<FIELD name="ART_TEXT"/>
					<FIELD name="TYP_CODE"/>
					<FIELD name="TYP_TEXT"/>
					<FIELD name="CAT_CODE"/>
					<FIELD name="CAT_TEXT"/>
					<FIELD name="SCAT_CODE"/>
					<FIELD name="SCAT_TEXT"/>
					<FIELD name="FAM_CODE"/>
					<FIELD name="FAM_TEXT"/>
					<FIELD name="SFAM_CODE"/>
					<FIELD name="SFAM_TEXT"/>
					<FIELD name="ATC_CODE"/>
					<FIELD name="ATC_TEXT"/>
					<FIELD name="ATC1_CODE"/>
					<FIELD name="ATC1_TEXT"/>
					<FIELD name="ATC2_CODE"/>
					<FIELD name="ATC2_TEXT"/>
					<FIELD name="ATC3_CODE"/>
					<FIELD name="ATC3_TEXT"/>
					<FIELD name="ATC4_CODE"/>
					<FIELD name="ATC4_TEXT"/>
					<FIELD name="CPT_CODE"/>
					<FIELD name="CPT_TEXT"/>
					<FIELD name="FOU_CODE"/>
					<FIELD name="FOU_TEXT"/>
					<FIELD name="LPP_CODE"/>
					<FIELD name="LPP_TEXT"/>
					<FIELD name="UCD_CODE"/>
					<FIELD name="UCD_TEXT"/>
					<FIELD name="STOCKE"/>
					<FIELD name="UN_STO_CODE"/>
					<FIELD name="UN_STO_TEXT"/>
					<FIELD name="UN_DIS_CODE"/>
					<FIELD name="UN_DIS_TEXT"/>
					<FIELD name="CLE_SECTION_CODE"/>
					<FIELD name="CLE_SECTION_TEXT"/>
				</FIELDS>
			</SQL>
		</QUERY>
		<QUERY label="Commandes"> 
			<SQL optimizer="V_LIGNES_COMMANDES_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]}
						INDICATORS{
							[DATA_COM015],
							[DATA_COM025],
							[DATA_COM035],
							[DATA_COM045],
							[DATA_COM055],
							[DATA_COM065],
							[DATA_COM075],
							[DATA_COM085],
							[DATA_COM095],
							[DATA_COM105],
							[DATA_COM115],
							[DATA_COM125],
							[DATA_COM135],
							[DATA_COM145],
							[DATA_COM155]
						}
						INDICATORS_TEXT{
							MAX(CASE WHEN unite_approvisionnement_article_id <> 0 AND unite_approvisionnement_article_code <> 'UN' THEN unite_approvisionnement_article_texte ELSE '' END)::text,,
						}	
					FROM #V_LIGNES_COMMANDES_X##V_ALL_X#
					WHERE 1=1
						AND (SELECT count(*) FROM w_tmp_list) = 1
						AND [DATE_BASE2] BETWEEN '[PERIODE]' AND '[TOPERIODE]'
						[VIEW.ARTICLE_SELECT]
					AFTER{
						INSERT INTO w_table (
							oidt
							,oid1
							,code1
							,texte1
							,oid
							,code
							,texte
							)
						SELECT 
							0,
							mois, mois, texte,
							mois, mois, texte
						FROM base.p_calendrier_mois
						WHERE 
						date_debut BETWEEN '[PERIODE]' AND '[TOPERIODE]'
						AND mois NOT IN (SELECT code1 FROM w_table GROUP BY 1)
					}

				]]></select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS"/>
					<FIELD name="DATA_COM01"/>
					<FIELD name="DATA_COM02"/>
					<FIELD name="DATA_COM03"/>
					<FIELD name="DATA_COM04"/>
					<FIELD name="DATA_COM05"/>
					<FIELD name="DATA_COM06"/>
					<FIELD name="DATA_COM07"/>
					<FIELD name="DATA_COM08"/>
					<FIELD name="DATA_COM09"/>
					<FIELD name="DATA_COM10"/>
					<FIELD name="DATA_COM11"/>
					<FIELD name="DATA_COM12"/>
					<FIELD name="DATA_COM13"/>
					<FIELD name="DATA_COM14"/>
					<FIELD name="DATA_COM15"/>
					<FIELD name="UNIT" />
				</FIELDS>
			</SQL>
		</QUERY>
		<QUERY label="Mouvements"> 
			<SQL optimizer="V_MOUVEMENTS_ARTICLES_X" optimizer2="V_ALL_X">
				<select><![CDATA[		

					CTISELECT_TREE
						GROUPBY1{[VIEW.GROUPBY_2_OID_FIELD],, [VIEW.GROUPBY_2_COD_FIELD],, [VIEW.GROUPBY_2_TXT_FIELD]}
						GROUPBY1MODE{[GROUPBY_TAB]}
						INDICATORS{
							[DATA_MVT015],
							[DATA_MVT025],
							[DATA_MVT035],
							[DATA_MVT045],
							[DATA_MVT055],
							[DATA_MVT065],
							[DATA_MVT075],
							[DATA_MVT085],
							[DATA_MVT095],
							[DATA_MVT105],
							[DATA_MVT115],
							[DATA_MVT125],
							[DATA_MVT135],
							[DATA_MVT145]
						}
						INDICATORS_TEXT{
							MAX(CASE WHEN unite_stockage_article_id <> 0 AND unite_stockage_article_code <> 'UN' THEN unite_stockage_article_texte ELSE '' END)::text,,
						}
					FROM #V_MOUVEMENTS_ARTICLES_X##V_ALL_X#
					WHERE 1=1
						AND (SELECT count(*) FROM w_tmp_list) = 1
						AND date BETWEEN '[PERIODE]' AND '[TOPERIODE]'
						[VIEW.ARTICLE_SELECT]
					AFTER{
						INSERT INTO w_table (
							oidt
							,oid1
							,code1
							,texte1
							,oid
							,code
							,texte
							)
						SELECT 
							0,
							mois, mois, texte,
							mois, mois, texte
						FROM base.p_calendrier_mois
						WHERE 
						date_debut BETWEEN '[PERIODE]' AND '[TOPERIODE]'
						AND mois NOT IN (SELECT code1 FROM w_table GROUP BY 1)
					}
				]]></select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS"/>
					<FIELD name="DATA_MVT01" />
					<FIELD name="DATA_MVT02" />
					<FIELD name="DATA_MVT03" />
					<FIELD name="DATA_MVT04" />
					<FIELD name="DATA_MVT05" />
					<FIELD name="DATA_MVT06" />
					<FIELD name="DATA_MVT07" />
					<FIELD name="DATA_MVT08" />
					<FIELD name="DATA_MVT09" />
					<FIELD name="DATA_MVT10" />
					<FIELD name="DATA_MVT11" />
					<FIELD name="DATA_MVT12" />
					<FIELD name="DATA_MVT13" />
					<FIELD name="DATA_MVT14" />
					<FIELD name="DATA_MVT15" />
					<FIELD name="UNIT" />
				</FIELDS>
			</SQL>
		</QUERY>
		<QUERY label="Stocks mensuels"> 
			<SQL optimizer="V_STOCK_MENSUEL_X" optimizer2="V_ALL_X">
				<select><![CDATA[		

					CTISELECT_TREE
						GROUPBY1{[VIEW.GROUPBY_3_OID_FIELD],, [VIEW.GROUPBY_3_COD_FIELD],, [VIEW.GROUPBY_3_TXT_FIELD]}
						GROUPBY1MODE{[GROUPBY_TAB]}
						OPTIONS{NOTZERO=1}
						INDICATORS{
							COUNT(DISTINCT unite_stockage_article_id),
							SUM(stock_quantite_debut),
							SUM(entree_quantite),
							SUM(sortie_quantite),
							SUM(entree_quantite) - SUM(sortie_quantite),
							SUM(stock_quantite_fin),
							
							SUM(stock_valeur_debut),
							SUM(entree_montant),
							SUM(sortie_montant),
							SUM(entree_montant) - SUM(sortie_montant),
							SUM(stock_valeur_fin),
							
							SUM(pump)
							,
							SUM(pump)
						}	
						INDICATORS_TEXT{
							MAX(CASE WHEN unite_stockage_article_id <> 0 AND unite_stockage_article_code <> 'UN' THEN unite_stockage_article_texte ELSE '' END)::text,,
						}	
					FROM #V_STOCK_MENSUEL_X##V_ALL_X#
					WHERE 1=1
						AND (SELECT count(*) FROM w_tmp_list) = 1
						AND date_debut BETWEEN '[PERIODE]' AND '[TOPERIODE]'
						[VIEW.ARTICLE_SELECT]
					
					
					AFTER{
						UPDATE w_table SET 
							indicateurs[2] = CASE WHEN indicateurs[1] = 1 THEN indicateurs[2] ELSE 0 END,
							indicateurs[3] = CASE WHEN indicateurs[1] = 1 THEN indicateurs[3] ELSE 0 END,
							indicateurs[4] = CASE WHEN indicateurs[1] = 1 THEN indicateurs[4] ELSE 0 END,
							indicateurs[5] = CASE WHEN indicateurs[1] = 1 THEN indicateurs[5] ELSE 0 END,
							indicateurs[6] = CASE WHEN indicateurs[1] = 1 THEN indicateurs[6] ELSE 0 END,
							indicateurs_text[1] = CASE WHEN indicateurs[1] = 1 THEN indicateurs_text[1] ELSE '' END
					}

				]]></select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS"/>
					<FIELD name="QUST" />
					<FIELD name="QSTD" />
					<FIELD name="QENT" />
					<FIELD name="QSOR" />
					<FIELD name="QECA" />
					<FIELD name="QSTF" />
					
					<FIELD name="MSTD" />
					<FIELD name="MENT" />
					<FIELD name="MSOR" />
					<FIELD name="MECA" />
					<FIELD name="MSTF" />
					
					<FIELD name="PUMD" />
					<FIELD name="PUMF" />
					
					<FIELD name="UNIT" />
				</FIELDS>
			</SQL>
		</QUERY>
		<QUERY type="propertiesLink" name="VIEWPROPERTIES" forRows="false">
			<SQL>
				<select><![CDATA[
				
					DROP TABLE IF EXISTS w_tmp_list
					;
					CREATE TEMP TABLE w_tmp_list AS 
						SELECT
							article_id AS oid,
							article_code AS code,
							article_texte AS texte
						FROM
						(
							SELECT article_oid AS article_id,ucd_article_id AS ucd_id,lpp_article_id AS lpp_id,compte_id AS compte_article_id,* FROM eco.v_articles_2
						) sub
						LEFT JOIN eco.v_lpp_2 ON lpp_article_id = lpp_oid
						LEFT JOIN eco.v_ucd_2 ON ucd_article_id = ucd_oid
						LEFT JOIN eco.v_comptes_2 ON compte_id = compte_article_oid
						LEFT JOIN 
						( 
							SELECT section_id, t_classes_sections.code AS section_cle_code, t_classes_sections.texte AS section_cle_texte, to_id
							FROM eco.t_classes 
								JOIN eco.t_classes_sections ON classe_id = t_classes_sections.oid
								JOIN eco.t_classes_sections_elements ON section_id = t_classes_sections.oid
							WHERE
								t_classes.code = 'CTI_CLE_REP'
						) rep ON rep.to_id = article_oid
						WHERE 1=1
							[VIEW.ARTICLE_SELECT]
						GROUP BY 1,2,3
					;
				
					SELECT
						'ARTICLE_ID',
						coalesce(max(oid), 0)::text
					FROM w_tmp_list
					UNION ALL
						SELECT
							'ACTION_AFFICHAGE',
							CASE 
								WHEN count(*) = 0 THEN 'MESSAGE'
								WHEN count(*) = 1 THEN 'AFFICHER'
								WHEN count(*) > 1 THEN 'LISTER'
							END
						FROM w_tmp_list
					;
					
				]]></select>
				<FIELDS>
					<FIELD name="name"/>
					<FIELD name="value"/>
				</FIELDS>
			</SQL>
			<SQL>
				<select><![CDATA[
					SELECT 'ARTICLE_CODE', code FROM eco.t_articles WHERE oid = to_number('[VIEW.ARTICLE_ID]', '99999999999')
						UNION ALL
					SELECT 'ARTICLE_TEXTE', texte FROM eco.t_articles WHERE oid = to_number('[VIEW.ARTICLE_ID]', '99999999999')
				]]></select>
				<FIELDS>
					<FIELD name="name"/>
					<FIELD name="value"/>
				</FIELDS>
			</SQL>
			<SQL>
				<select><![CDATA[
					SELECT 'REPARTITION_FIELD', regexp_replace(regexp_replace(regexp_replace(t_listes_tables.name,'^t_',''),'s_','_','g'),'s$','') || '_id' 
					FROM 
						eco.t_divers
						JOIN eco.t_listes_tables ON t_listes_tables.code = valeur
				]]></select>
				<FIELDS>
					<FIELD name="name"/>
					<FIELD name="value"/>
				</FIELDS>
			</SQL>
		</QUERY>
	</QUERIES>
	
	<PRESENTATION>
		<VIEWLINKS>
			<VIEWLINK label="Détail Article" shortLabel="Détail Article" view="ECO000069.XML" visible="= TAB == 0 &amp;&amp; VIEW.ACTION_AFFICHAGE == 'LISTER'" componentName="" >
				<ARGS name="ALL" >
					<value><![CDATA[
					
					LINKVARIABLES['ARTICLE'] = 'DT' + ROW.ARTICLE_LIST_ID;
					
					return 'OK';
			
					]]></value>
				</ARGS>
			</VIEWLINK>
			<VIEWLINK label="Liste lignes commandes" shortLabel="Liste lignes" view="ECO000011.XML" visible="= TAB == 1" componentName="ECO_VIEWLINK" >
				<ARGS name="SPEC" >
					<value><![CDATA[
						LINKVARIABLES['GROUPBY'] = 'CMD'
						LINKVARIABLES['GROUPBY_2'] = 'CML'
						LINKVARIABLES['SITE'] = '-1'
						LINKVARIABLES['GESTIONNAIRE'] = '-1'
						LINKVARIABLES['LIEU'] = '-1'
						LINKVARIABLES['UNITE_FONCTIONNELLE'] = '-1'
						LINKVARIABLES['ETAT_LIVRAISON'] = '-1'
						LINKVARIABLES['TEXTE'] = ''
						LINKVARIABLES['DATA01'] = '0'
						return 'OK';
			
					]]></value>
				</ARGS>
			</VIEWLINK>	
			<VIEWLINK label="Liste lignes commandes" shortLabel="Liste mouvements" view="ECO000010.XML" visible="= TAB == 2" componentName="ECO_VIEWLINK" >
				<ARGS name="SPEC" >
					<value><![CDATA[
						LINKVARIABLES['GROUPBY'] = 'AMMVT'
						LINKVARIABLES['GROUPBY_2'] = 'MVT'
						LINKVARIABLES['SITE'] = '-1'
						LINKVARIABLES['GESTIONNAIRE'] = '-1'
						LINKVARIABLES['LIEU'] = '-1'
						LINKVARIABLES['UNITE_FONCTIONNELLE'] = '-1'
						LINKVARIABLES['UCD_MOUVEMENT'] = '-1'
						LINKVARIABLES['LPP_MOUVEMENT'] = '-1'
						LINKVARIABLES['POLE'] = '-1'
						LINKVARIABLES['SENS_MOUVEMENT'] = '-1'
						LINKVARIABLES['TYPE_MOUVEMENT'] = '-1'
						LINKVARIABLES['TEXTE'] = ''
						LINKVARIABLES['INDICATEUR'] = '-1'
						LINKVARIABLES['DATA01'] = '0'
						return 'OK';
					]]></value>
				</ARGS>
				<ARG name="DATA_MVT01" value="
					var result:int = int(COLUMN.NAME.substr(COLUMN.NAME.length-4,2));
					switch (SELECT[COLUMN.NAME.substring(0,COLUMN.NAME.length-2)]) {
						case '4.2' :
							result = result - 1;
							break;
						case '4.3' :
							result = result - 2;
							break;
						case '4.4' :
							result = result - 2;
							break;
						default :
							break;
					};
					if (result &lt; 10) return SELECT[COLUMN.NAME.substring(0,COLUMN.NAME.length-4)+'0'+result.toString()];
					else return SELECT[COLUMN.NAME.substring(0,COLUMN.NAME.length-4)+result.toString()];"/>
			</VIEWLINK>	
		</VIEWLINKS>
		<ONGLET label="Liste" newPage="true" visibleCondition="VIEW.ACTION_AFFICHAGE == 'LISTER'">
			<DATAGRID title="" total="false" headerHeight="20" rowHeight="20">
				<COLUMN dataField="ARTICLE_LIST_ID" type="Number" visible="false" headerText="Oid" />
				<COLUMN dataField="ARTICLE_LIST_CODE" type="Char" visible="true" headerText="Code article" width="100" textAlign="center"/>
				<COLUMN dataField="ARTICLE_LIST_TEXTE" type="Char" visible="true" headerText="Libellé" minWidth="200" />
			</DATAGRID>
		</ONGLET>
		<ONGLET label="Article" queryNumber="1" newPage="true" visibleCondition="VIEW.ACTION_AFFICHAGE == 'AFFICHER'">
			<DATAGRID title="" total="false" showHeaders="false" rowHeight="20" multiLine="true" headerHeight="18">
				<ROWSTYLE name="fontSize" value="11"/>
				<ROWSTYLE name="backgroundColor" value="0xffd393" condition="ROW.KEY == 'CHA'"/>
				<ROWSTYLE name="fontWeight" value="bold" condition="ROW.KEY == 'CHA'"/>
				<COLUMN dataField="KEY" visible="false" textAlign="left"/>
				<COLUMN dataField="LABEL" visible="true" width="220" textAlign="left">
					<CELLSTYLE name="paddingLeft" value="30" condition="ROW.KEY == 'PAD'"/>
					<CELLSTYLE name="paddingLeft" value="40" condition="ROW.KEY == 'PAD2'"/>
				</COLUMN>
				<COLUMN dataField="VAL" visible="true" minWidth="400" textAlign="left">
					<CELLSTYLE name="fontWeight" value="bold" condition="ROW.KEY == '1'"/>
					<CELLSTYLE name="fontWeight" value="bold" condition="ROW.KEY == '2'"/>
					<CELLSTYLE name="paddingLeft" value="10" condition="ROW.KEY == 'PAD2'"/>
				</COLUMN>
					
				<LINE label="Code" key="2">
					<COLUMN dataField="ART_CODE" type="Char" toDataField="VAL" visible="true" textAlign="left" />
				</LINE>
				<LINE label="Libellé" key="2">
					<COLUMN dataField="ART_TEXT" type="Char" outputFormat="#" toDataField="VAL" visible="true" textAlign="left" />
				</LINE>
				<LINE label="Description" key="CHA" />
				
				<LINE label="[DICT.ECO.TYPE_ARTICLE#5]" key="PAD">
					<COLUMN dataField="TYP_TEXT" type="Char" toDataField="VAL" visible="true" textAlign="left" />
				</LINE>
				<LINE label="Compte" key="PAD">
					<COLUMN dataField="CPT_TEXT" type="Char" toDataField="VAL" visible="true" textAlign="left" />
				</LINE>
				<LINE label="Fournisseurs" key="PAD">
					<COLUMN dataField="FOU_TEXT" type="Char" toDataField="VAL" visible="true" textAlign="left" />
				</LINE>
				<LINE label="Géré en stock" key="PAD">
					<COLUMN dataField="STOCKE" type="Char" toDataField="VAL" visible="true" textAlign="left" />
				</LINE>
				<LINE label="Clé de répartition CTI" key="PAD">
					<COLUMN dataField="CLE_SECTION_TEXT" type="Char" toDataField="VAL" visible="true" textAlign="left" />
				</LINE>
				
				
				
				<LINE label="[DICT.ECO.CATEGORIE#5]" key="CHA" />
				<LINE label="[DICT.ECO.CATEGORIE#5]" key="PAD">
					<COLUMN dataField="CAT_TEXT" type="Char" toDataField="VAL" visible="true" textAlign="left" />
				</LINE>
				<LINE label="[DICT.ECO.SOUS_CATEGORIE#5]" key="PAD">
					<COLUMN dataField="SCAT_TEXT" type="Char" toDataField="VAL" visible="true" textAlign="left" />
				</LINE>

				<LINE label="[DICT.ECO.FAMILLE#5]" key="CHA" />
				<LINE label="[DICT.ECO.FAMILLE#5]" key="PAD">
					<COLUMN dataField="FAM_TEXT" type="Char" toDataField="VAL" visible="true" textAlign="left" />
				</LINE>
				<LINE label="[DICT.ECO.SOUS_FAMILLE#5]" key="PAD">
					<COLUMN dataField="SFAM_TEXT" type="Char" toDataField="VAL" visible="true" textAlign="left" />
				</LINE>

				<LINE label="Classification ATC/Cladimed" key="CHA" />
				<LINE label="Niveau1" key="PAD">
					<COLUMN dataField="ATC1_TEXT" type="Char" toDataField="VAL" visible="true" textAlign="left" />
				</LINE>
				<LINE label="Niveau2" key="PAD">
					<COLUMN dataField="ATC2_TEXT" type="Char" toDataField="VAL" visible="true" textAlign="left" />
				</LINE>
				<LINE label="Niveau3" key="PAD">
					<COLUMN dataField="ATC3_TEXT" type="Char" toDataField="VAL" visible="true" textAlign="left" />
				</LINE>
				<LINE label="Niveau4" key="PAD">
					<COLUMN dataField="ATC4_TEXT" type="Char" toDataField="VAL" visible="true" textAlign="left" />
				</LINE>
				
				<LINE label="Lien PMSI" key="CHA"/>
				<LINE label="LPP" key="PAD">
					<COLUMN dataField="LPP_TEXT" type="Char" toDataField="VAL" visibleCondition="LPP_TEXT != ''" textAlign="left" />
				</LINE>
				<LINE label="UCD" key="PAD">
					<COLUMN dataField="UCD_TEXT" type="Char" toDataField="VAL" visible="true" textAlign="left" />
				</LINE>
				
				<LINE label="[DICT.ECO.UNITES#5]" key="CHA"/>
				<LINE label="Stockage" key="PAD">
					<COLUMN dataField="UN_STO_TEXT" type="Char" toDataField="VAL" visible="true" textAlign="left" />
				</LINE>
				<LINE label="Distribution" key="PAD">
					<COLUMN dataField="UN_DIS_TEXT" type="Char" toDataField="VAL" visible="true" textAlign="left" />
				</LINE>

			</DATAGRID>
		</ONGLET>
		<ONGLET label="Commandes" queryNumber="2" newPage="true" visibleCondition="VIEW.ACTION_AFFICHAGE == 'AFFICHER'">
			<CHART title="Evolution quantité commandée" type="lineChart" subType="" maxItems="100" maxItemsSortOn="" maxItemsSortSeq="" sortField="COD" sortSeq="A">
					<CATEGORY field="TXT" type="Char" />
					<SERIE field="DATA_COM04" displayName="SELECT.DATA_COM04_LABEL" displayNameCalc="true"/>
				</CHART>
			<DATAGRID 	title="" 
						total="true" 
						headerHeight="40" 
						selectRowInRows="= ROW.OID == '-9999997'" 
						otherRowInRows="= ROW.OID == '-9999998'" 
						totalRowInRows="= ROW.OID == '-9999999'"
						variableRowHeight="true" 
						> 
				
				<INSERT name="DATAGRID_MULTITAB_STYLES"/>
				
				<COLUMN dataField="OID"
					type="Number"
					visible="false" />
				<COLUMN dataField="COD" 
					type="Char" 
					width="120"
					outputFormat="#"
					headerText="Code" 
					textAlign="left" 
					totalComplement="*ROW">
					<INSERT name="COLUMN_COD_MULTITAB_STYLES"/>
				</COLUMN>
				<COLUMN dataField="TXT" 
					type="Char" 
					minWidth="110"
					headerText="Texte" 
					textAlign="left" 
					totalComplement="*ROW"/>
				
				<COLUMN dataField="UNIT" 
					type="Char" 
					width="50"
					headerText="Unité" 
					textAlign="left" 
					totalComplement="*ROW"/>	
				<COLUMN dataField="DATA_COM01" type="Number" width="90" fixed="false" outputFormat="= SELECT.DATA_COM014" selectable="true" headerText="SELECT.DATA_COM01_LABEL" headerTextCalc="true" description="= SELECT.DATA_COM017" visibleCondition="SELECT.DATA_COM01 != '0'" />
				<COLUMN dataField="DATA_COM02" type="Number" width="90" outputFormat="= SELECT.DATA_COM024" selectable="true" headerText="SELECT.DATA_COM02_LABEL" headerTextCalc="true" description="= SELECT.DATA_COM022 " visibleCondition="SELECT.DATA_COM02 != '0' &amp;&amp; SELECT.DATA_COM01 != '0'" />
				<COLUMN dataField="DATA_COM03" type="Number" width="90" outputFormat="= SELECT.DATA_COM034" selectable="true" headerText="SELECT.DATA_COM03_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="DATA_COM03_2" type="Number" width="90" outputFormat="= if(SELECT.DATA_COM03=='4.3'){return SELECT.DATA_COM014} else { return SELECT.DATA_COM034}" selectable="true" headerText="SELECT.DATA_COM03_LABEL" headerTextCalc="true" description="= SELECT.DATA_COM032" visibleCondition="SELECT.DATA_COM03 != '0' &amp;&amp; SELECT.DATA_COM02 != '0' &amp;&amp; SELECT.DATA_COM01 != '0'" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
					<CALC formula="
					switch(SELECT.DATA_COM03) {
						case '4.2' :
							return ROW.DATA_COM02 / TOTALROW.DATA_COM02 * 100;
							break;
						case '4.3' :
							return ROW.DATA_COM01 - ROW.DATA_COM02;
							break;
						case '4.4' :
							return ((ROW.DATA_COM01 - ROW.DATA_COM02)/ ROW.DATA_COM01 * 100);
							break;
						default :
							return ROW.DATA_COM03;
							break;
					}" />
				</COLUMN>
				<COLUMN dataField="DATA_COM04" type="Number" width="90" outputFormat="= SELECT.DATA_COM044" selectable="true" headerText="SELECT.DATA_COM04_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="DATA_COM04_2" type="Number" width="90" outputFormat="=  if(SELECT.DATA_COM04=='4.3'){return SELECT.DATA_COM024} else { return SELECT.DATA_COM044}" selectable="true" headerText="SELECT.DATA_COM04_LABEL" headerTextCalc="true" description="= SELECT.DATA_COM042 " visibleCondition="SELECT.DATA_COM04 != '0' &amp;&amp; SELECT.DATA_COM03 != '0' &amp;&amp; SELECT.DATA_COM02 != '0' &amp;&amp; SELECT.DATA_COM01 != '0'" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
					<CALC formula="
					switch(SELECT.DATA_COM04) {
						case '4.2' :
							return ROW.DATA_COM03 / TOTALROW.DATA_COM03 * 100;
							break;
						case '4.3' :
							return ROW.DATA_COM02 - ROW.DATA_COM03;
							break;
						case '4.4' :
							return ((ROW.DATA_COM02 - ROW.DATA_COM03)/ ROW.DATA_COM02 * 100);
							break;
						default :
							return ROW.DATA_COM04;
							break;
					}" />
				</COLUMN>
				<COLUMN dataField="DATA_COM05" type="Number" width="90" outputFormat="= SELECT.DATA_COM054" selectable="true" headerText="SELECT.DATA_COM05_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="DATA_COM05_2" type="Number" width="90" outputFormat="= if(SELECT.DATA_COM05=='4.3'){return SELECT.DATA_COM034} else { return SELECT.DATA_COM054}" selectable="true" headerText="SELECT.DATA_COM05_LABEL" headerTextCalc="true" description="= SELECT.DATA_COM052 " visibleCondition="SELECT.DATA_COM05 != '0' &amp;&amp; SELECT.DATA_COM04 != '0' &amp;&amp; SELECT.DATA_COM03 != '0' &amp;&amp; SELECT.DATA_COM02 != '0' &amp;&amp; SELECT.DATA_COM01 != '0'" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA_COM05) {
						case '4.2' :
							return ROW.DATA_COM04 / TOTALROW.DATA_COM04 * 100;
							break;
						case '4.3' :
							return ROW.DATA_COM03 - ROW.DATA_COM04;
							break;
						case '4.4' :
							return ((ROW.DATA_COM03 - ROW.DATA_COM04)/ ROW.DATA_COM03 * 100);
							break;
						default :
							return ROW.DATA_COM05;
							break;
					}" />
				</COLUMN>
				<COLUMN dataField="DATA_COM06" type="Number" width="90" outputFormat="= SELECT.DATA_COM064" selectable="true" headerText="SELECT.DATA_COM06_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="DATA_COM06_2" type="Number" width="90" outputFormat="= if(SELECT.DATA_COM06=='4.3'){return SELECT.DATA_COM044} else { return SELECT.DATA_COM064}" selectable="true" headerText="SELECT.DATA_COM06_LABEL" headerTextCalc="true" description="= SELECT.DATA_COM062 " visibleCondition="SELECT.DATA_COM06 != '0' &amp;&amp; SELECT.DATA_COM05 != '0' &amp;&amp; SELECT.DATA_COM04 != '0' &amp;&amp; SELECT.DATA_COM03 != '0' &amp;&amp; SELECT.DATA_COM02 != '0' &amp;&amp; SELECT.DATA_COM01 != '0'" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA_COM06) {
						case '4.2' :
							return ROW.DATA_COM05 / TOTALROW.DATA_COM05 * 100;
							break;
						case '4.3' :
							return ROW.DATA_COM04 - ROW.DATA_COM05;
							break;
						case '4.4' :
							return ((ROW.DATA_COM04 - ROW.DATA_COM05)/ ROW.DATA_COM04 * 100);
							break;
						default :
							return ROW.DATA_COM06;
							break;
					}" />
				</COLUMN>
				<COLUMN dataField="DATA_COM07" type="Number" width="90" outputFormat="= SELECT.DATA_COM074" selectable="true" headerText="SELECT.DATA_COM07_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="DATA_COM07_2" type="Number" width="90" outputFormat="= if(SELECT.DATA_COM07=='4.3'){return SELECT.DATA_COM054} else { return SELECT.DATA_COM074}" selectable="true" headerText="SELECT.DATA_COM07_LABEL" headerTextCalc="true" description="= SELECT.DATA_COM072 " visibleCondition="SELECT.DATA_COM07 != '0' &amp;&amp; SELECT.DATA_COM06 != '0' &amp;&amp; SELECT.DATA_COM05 != '0' &amp;&amp; SELECT.DATA_COM04 != '0' &amp;&amp; SELECT.DATA_COM03 != '0' &amp;&amp; SELECT.DATA_COM02 != '0' &amp;&amp; SELECT.DATA_COM01 != '0'" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA_COM07) {
						case '4.2' :
							return ROW.DATA_COM06 / TOTALROW.DATA_COM06 * 100;
							break;
						case '4.3' :
							return ROW.DATA_COM05 - ROW.DATA_COM06;
							break;
						case '4.4' :
							return ((ROW.DATA_COM05 - ROW.DATA_COM06)/ ROW.DATA_COM05 * 100);
							break;
						default :
							return ROW.DATA_COM07;
							break;
					}" />
				</COLUMN>
				<COLUMN dataField="DATA_COM08" type="Number" width="90" outputFormat="= SELECT.DATA_COM084" selectable="true" headerText="SELECT.DATA_COM08_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="DATA_COM08_2" type="Number" width="90" outputFormat="= if(SELECT.DATA_COM08=='4.3'){return SELECT.DATA_COM064} else { return SELECT.DATA_COM084}" selectable="true" headerText="SELECT.DATA_COM08_LABEL" headerTextCalc="true" description="= SELECT.DATA_COM082" visibleCondition="SELECT.DATA_COM08 != '0' &amp;&amp; SELECT.DATA_COM07 != '0' &amp;&amp; SELECT.DATA_COM06 != '0' &amp;&amp; SELECT.DATA_COM05 != '0' &amp;&amp; SELECT.DATA_COM04 != '0' &amp;&amp; SELECT.DATA_COM03 != '0' &amp;&amp; SELECT.DATA_COM02 != '0' &amp;&amp; SELECT.DATA_COM01 != '0'" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA_COM08) {
						case '4.2' :
							return ROW.DATA_COM07 / TOTALROW.DATA_COM07 * 100;
							break;
						case '4.3' :
							return ROW.DATA_COM06 - ROW.DATA_COM07;
							break;
						case '4.4' :
							return ((ROW.DATA_COM06 - ROW.DATA_COM07)/ ROW.DATA_COM06 * 100);
							break;
						default :
							return ROW.DATA_COM08;
							break;
					}" />
				</COLUMN>
				<COLUMN dataField="DATA_COM09" type="Number" width="90" outputFormat="= SELECT.DATA_COM094" selectable="true" headerText="SELECT.DATA_COM09_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="DATA_COM09_2" type="Number" width="90" outputFormat="= if(SELECT.DATA_COM09=='4.3'){return SELECT.DATA_COM074} else { return SELECT.DATA_COM094}" selectable="true" headerText="SELECT.DATA_COM09_LABEL" headerTextCalc="true" description="= SELECT.DATA_COM092 " visibleCondition="SELECT.DATA_COM09 != '0' &amp;&amp; SELECT.DATA_COM08 != '0' &amp;&amp; SELECT.DATA_COM07 != '0' &amp;&amp; SELECT.DATA_COM06 != '0' &amp;&amp; SELECT.DATA_COM05 != '0' &amp;&amp; SELECT.DATA_COM04 != '0' &amp;&amp; SELECT.DATA_COM03 != '0' &amp;&amp; SELECT.DATA_COM02 != '0' &amp;&amp; SELECT.DATA_COM01 != '0'" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA_COM09) {
						case '4.2' :
							return ROW.DATA_COM08 / TOTALROW.DATA_COM08 * 100;
							break;
						case '4.3' :
							return ROW.DATA_COM07 - ROW.DATA_COM08;
							break;
						case '4.4' :
							return ((ROW.DATA_COM07 - ROW.DATA_COM08)/ ROW.DATA_COM07 * 100);
							break;
						default :
							return ROW.DATA_COM09;
							break;
					}" />
				</COLUMN>
				<COLUMN dataField="DATA_COM10" type="Number" width="90" outputFormat="= SELECT.DATA_COM104" selectable="true" headerText="SELECT.DATA_COM10_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="DATA_COM10_2" type="Number" width="90" outputFormat="= if(SELECT.DATA_COM10=='4.3'){return SELECT.DATA_COM084} else { return SELECT.DATA_COM104}" selectable="true" headerText=" SELECT.DATA_COM10_LABEL" headerTextCalc="true" description="= SELECT.DATA_COM102 " visibleCondition="SELECT.DATA_COM10 != '0' &amp;&amp; SELECT.DATA_COM09 != '0' &amp;&amp; SELECT.DATA_COM08 != '0' &amp;&amp; SELECT.DATA_COM07 != '0' &amp;&amp; SELECT.DATA_COM06 != '0' &amp;&amp; SELECT.DATA_COM05 != '0' &amp;&amp; SELECT.DATA_COM04 != '0' &amp;&amp; SELECT.DATA_COM03 != '0' &amp;&amp; SELECT.DATA_COM02 != '0' &amp;&amp; SELECT.DATA_COM01 != '0'" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA_COM10) {
						case '4.2' :
							return ROW.DATA_COM09 / TOTALROW.DATA_COM09 * 100;
							break;
						case '4.3' :
							return ROW.DATA_COM08 - ROW.DATA_COM09;
							break;
						case '4.4' :
							return ((ROW.DATA_COM08 - ROW.DATA_COM09)/ ROW.DATA_COM08 * 100);
							break;
						default :
							return ROW.DATA_COM10;
							break;
					}" />
				</COLUMN>
				<COLUMN dataField="DATA_COM11" type="Number" width="90" outputFormat="= SELECT.DATA_COM114" selectable="true" headerText="SELECT.DATA_COM11_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="DATA_COM11_2" type="Number" width="90" outputFormat="= if(SELECT.DATA_COM11=='4.3'){return SELECT.DATA_COM094} else { return SELECT.DATA_COM114}" selectable="true" headerText=" SELECT.DATA_COM11_LABEL" headerTextCalc="true" description="= SELECT.DATA_COM112" visibleCondition="SELECT.DATA_COM11 != '0' &amp;&amp; SELECT.DATA_COM10 != '0' &amp;&amp; SELECT.DATA_COM09 != '0' &amp;&amp; SELECT.DATA_COM08 != '0' &amp;&amp; SELECT.DATA_COM07 != '0' &amp;&amp; SELECT.DATA_COM06 != '0' &amp;&amp; SELECT.DATA_COM05 != '0' &amp;&amp; SELECT.DATA_COM04 != '0' &amp;&amp; SELECT.DATA_COM03 != '0' &amp;&amp; SELECT.DATA_COM02 != '0' &amp;&amp; SELECT.DATA_COM01 != '0'" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA_COM11) {
						case '4.2' :
							return ROW.DATA_COM10 / TOTALROW.DATA_COM10 * 100;
							break;
						case '4.3' :
							return ROW.DATA_COM09 - ROW.DATA_COM10;
							break;
						case '4.4' :
							return ((ROW.DATA_COM09 - ROW.DATA_COM10)/ ROW.DATA_COM09 * 100);
							break;
						default :
							return ROW.DATA_COM11;
							break;
					}" />
				</COLUMN>
				<COLUMN dataField="DATA_COM12" type="Number" width="90" outputFormat="= SELECT.DATA_COM124" selectable="true" headerText="SELECT.DATA_COM12_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="DATA_COM12_2" type="Number" width="90" outputFormat="= if(SELECT.DATA_COM12=='4.3'){return SELECT.DATA_COM104} else { return SELECT.DATA_COM124}" selectable="true" headerText=" SELECT.DATA_COM12_LABEL" headerTextCalc="true" description="= SELECT.DATA_COM122" visibleCondition="SELECT.DATA_COM12 != '0' &amp;&amp; SELECT.DATA_COM11 != '0' &amp;&amp; SELECT.DATA_COM10 != '0' &amp;&amp; SELECT.DATA_COM09 != '0' &amp;&amp; SELECT.DATA_COM08 != '0' &amp;&amp; SELECT.DATA_COM07 != '0' &amp;&amp; SELECT.DATA_COM06 != '0' &amp;&amp; SELECT.DATA_COM05 != '0' &amp;&amp; SELECT.DATA_COM04 != '0' &amp;&amp; SELECT.DATA_COM03 != '0' &amp;&amp; SELECT.DATA_COM02 != '0' &amp;&amp; SELECT.DATA_COM01 != '0'" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA_COM12) {
						case '4.2' :
							return ROW.DATA_COM11 / TOTALROW.DATA_COM11 * 100;
							break;
						case '4.3' :
							return ROW.DATA_COM10 - ROW.DATA_COM11;
							break;
						case '4.4' :
							return ((ROW.DATA_COM10 - ROW.DATA_COM11)/ ROW.DATA_COM10 * 100);
							break;
						default :
							return ROW.DATA_COM12;
							break;
					}" />
				</COLUMN>
				<COLUMN dataField="DATA_COM13" type="Number" width="90" outputFormat="= SELECT.DATA_COM134" selectable="true" headerText="SELECT.DATA_COM13_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="DATA_COM13_2" type="Number" width="90" outputFormat="= if(SELECT.DATA_COM13=='4.3'){return SELECT.DATA_COM104} else { return SELECT.DATA_COM134}" selectable="true" headerText=" SELECT.DATA_COM13_LABEL" headerTextCalc="true" description="= SELECT.DATA_COM132" visibleCondition="SELECT.DATA_COM13 != '0' &amp;&amp; SELECT.DATA_COM11 != '0' &amp;&amp; SELECT.DATA_COM10 != '0' &amp;&amp; SELECT.DATA_COM09 != '0' &amp;&amp; SELECT.DATA_COM08 != '0' &amp;&amp; SELECT.DATA_COM07 != '0' &amp;&amp; SELECT.DATA_COM06 != '0' &amp;&amp; SELECT.DATA_COM05 != '0' &amp;&amp; SELECT.DATA_COM04 != '0' &amp;&amp; SELECT.DATA_COM03 != '0' &amp;&amp; SELECT.DATA_COM02 != '0' &amp;&amp; SELECT.DATA_COM01 != '0'" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA_COM13) {
						case '4.2' :
							return ROW.DATA_COM12 / TOTALROW.DATA_COM12 * 100;
							break;
						case '4.3' :
							return ROW.DATA_COM11 - ROW.DATA_COM12;
							break;
						case '4.4' :
							return ((ROW.DATA_COM11 - ROW.DATA_COM12)/ ROW.DATA_COM11 * 100);
							break;
						default :
							return ROW.DATA_COM13;
							break;
					}" />
				</COLUMN>
				<COLUMN dataField="DATA_COM14" type="Number" width="90" outputFormat="= SELECT.DATA_COM144" selectable="true" headerText="SELECT.DATA_COM14_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="DATA_COM14_2" type="Number" width="90" outputFormat="= if(SELECT.DATA_COM14=='4.3'){return SELECT.DATA_COM104} else { return SELECT.DATA_COM144}" selectable="true" headerText=" SELECT.DATA_COM14_LABEL" headerTextCalc="true" description="= SELECT.DATA_COM142" visibleCondition="SELECT.DATA_COM14 != '0' &amp;&amp; SELECT.DATA_COM11 != '0' &amp;&amp; SELECT.DATA_COM10 != '0' &amp;&amp; SELECT.DATA_COM09 != '0' &amp;&amp; SELECT.DATA_COM08 != '0' &amp;&amp; SELECT.DATA_COM07 != '0' &amp;&amp; SELECT.DATA_COM06 != '0' &amp;&amp; SELECT.DATA_COM05 != '0' &amp;&amp; SELECT.DATA_COM04 != '0' &amp;&amp; SELECT.DATA_COM03 != '0' &amp;&amp; SELECT.DATA_COM02 != '0' &amp;&amp; SELECT.DATA_COM01 != '0'" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA_COM14) {
						case '4.2' :
							return ROW.DATA_COM13 / TOTALROW.DATA_COM13 * 100;
							break;
						case '4.3' :
							return ROW.DATA_COM12 - ROW.DATA_COM13;
							break;
						case '4.4' :
							return ((ROW.DATA_COM12 - ROW.DATA_COM13)/ ROW.DATA_COM11 * 100);
							break;
						default :
							return ROW.DATA_COM14;
							break;
					}" />
				</COLUMN>
				<COLUMN dataField="DATA_COM15" type="Number" width="90" outputFormat="= SELECT.DATA_COM154" selectable="true" headerText="SELECT.DATA_COM15_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="DATA_COM15_2" type="Number" width="90" outputFormat="= if(SELECT.DATA_COM15=='4.3'){return SELECT.DATA_COM104} else { return SELECT.DATA_COM154}" selectable="true" headerText=" SELECT.DATA_COM15_LABEL" headerTextCalc="true" description="= SELECT.DATA_COM152" visibleCondition="SELECT.DATA_COM15 != '0' &amp;&amp; SELECT.DATA_COM11 != '0' &amp;&amp; SELECT.DATA_COM10 != '0' &amp;&amp; SELECT.DATA_COM09 != '0' &amp;&amp; SELECT.DATA_COM08 != '0' &amp;&amp; SELECT.DATA_COM07 != '0' &amp;&amp; SELECT.DATA_COM06 != '0' &amp;&amp; SELECT.DATA_COM05 != '0' &amp;&amp; SELECT.DATA_COM04 != '0' &amp;&amp; SELECT.DATA_COM03 != '0' &amp;&amp; SELECT.DATA_COM02 != '0' &amp;&amp; SELECT.DATA_COM01 != '0'" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA_COM15) {
						case '4.2' :
							return ROW.DATA_COM14 / TOTALROW.DATA_COM14 * 100;
							break;
						case '4.3' :
							return ROW.DATA_COM13 - ROW.DATA_COM14;
							break;
						case '4.4' :
							return ((ROW.DATA_COM13 - ROW.DATA_COM14)/ ROW.DATA_COM13 * 100);
							break;
						default :
							return ROW.DATA_COM15;
							break;
					}" />
				</COLUMN>
				
			</DATAGRID>
		</ONGLET>
		<ONGLET label="Mouvements"  queryNumber="3" newPage="true" visibleCondition="VIEW.ACTION_AFFICHAGE == 'AFFICHER'">
			<CHART title="" type="group" subType="" percentHeight="100">
				<CHART title="Evolution quantité entrée" type="lineChart" subType="" maxItems="100" maxItemsSortOn="" maxItemsSortSeq="" sortField="COD" sortSeq="A">
					<CATEGORY field="TXT" type="Char" />
					<SERIE field="DATA_MVT01" displayName="SELECT.DATA_MVT01_LABEL" displayNameCalc="true"/>
				</CHART>
				<CHART title="Evolution quantité sortie" type="lineChart" subType="" maxItems="100" maxItemsSortOn="" maxItemsSortSeq="" sortField="COD" sortSeq="A">
					<CATEGORY field="TXT" type="Char" />
					<SERIE field="DATA_MVT04" displayName="SELECT.DATA_MVT04_LABEL" displayNameCalc="true"/>
				</CHART>
			</CHART>
			<DATAGRID 	title="" 
						total="true" 
						headerHeight="40" 
						selectRowInRows="= ROW.OID == '-9999997'" 
						otherRowInRows="= ROW.OID == '-9999998'" 
						totalRowInRows="= ROW.OID == '-9999999'"
						variableRowHeight="true" 
						> 
				
				<INSERT name="DATAGRID_MULTITAB_STYLES"/>
				
				<COLUMN dataField="OID"
					type="Number"
					visible="false" />
				<COLUMN dataField="COD" 
					type="Char" 
					width="100"
					outputFormat="#"
					headerText="Code" 
					textAlign="left" 
					totalComplement="*ROW">
					<INSERT name="COLUMN_COD_MULTITAB_STYLES"/>
				</COLUMN>
				<COLUMN dataField="TXT" 
					type="Char" 
					minWidth="110"
					headerText="Texte" 
					textAlign="left" 
					totalComplement="*ROW"/>
				<COLUMN dataField="UNIT" 
					type="Char" 
					width="50"
					headerText="Unité" 
					textAlign="left" 
					totalComplement="*ROW"
					visibleCondition="SELECT.GROUPBY == 'ART' || SELECT.GROUPBY_2 == 'ART' || SELECT.GROUPBY_3 == 'ART'"/>	
				<COLUMN dataField="DATA_MVT01" type="Number" width="90" fixed="false" outputFormat="= SELECT.DATA_MVT014" selectable="true" headerText="SELECT.DATA_MVT01_LABEL" headerTextCalc="true" description="= SELECT.DATA_MVT017" />
				<COLUMN dataField="DATA_MVT02" type="Number" width="90" outputFormat="= SELECT.DATA_MVT024" selectable="true" headerText="SELECT.DATA_MVT02_LABEL" headerTextCalc="true" description="= SELECT.DATA_MVT022 " visibleCondition="(SELECT.DATA_MVT02 != '0' &amp;&amp; SELECT.DATA_MVT01 != '0') " />
				<COLUMN dataField="DATA_MVT03" type="Number" width="90" outputFormat="= SELECT.DATA_MVT034" selectable="true" headerText="SELECT.DATA_MVT03_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="DATA_MVT03_2" type="Number" width="90" outputFormat="= if(SELECT.DATA_MVT03=='4.3'){return SELECT.DATA_MVT014} else { return SELECT.DATA_MVT034}" selectable="true" headerText="SELECT.DATA_MVT03_LABEL" headerTextCalc="true" description="= SELECT.DATA_MVT032" visibleCondition="(SELECT.DATA_MVT03 != '0' &amp;&amp; SELECT.DATA_MVT02 != '0' &amp;&amp; SELECT.DATA_MVT03 != '0') " totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
					<CALC formula="
					switch(SELECT.DATA_MVT03) {
						case '4.2' :
							return ROW.DATA_MVT02 / TOTALROW.DATA_MVT02 * 100;
							break;
						case '4.3' :
							return ROW.DATA_MVT01 - ROW.DATA_MVT02;
							break;
						case '4.4' :
							return ((ROW.DATA_MVT01 - ROW.DATA_MVT02)/ ROW.DATA_MVT01 * 100);
							break;
						default :
							return ROW.DATA_MVT03;
							break;
					}" />
				</COLUMN>
				<COLUMN dataField="DATA_MVT04" type="Number" width="90" outputFormat="= SELECT.DATA_MVT044" selectable="true" headerText="SELECT.DATA_MVT04_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="DATA_MVT04_2" type="Number" width="90" outputFormat="=  if(SELECT.DATA_MVT04=='4.3'){return SELECT.DATA_MVT024} else { return SELECT.DATA_MVT044}" selectable="true" headerText="SELECT.DATA_MVT04_LABEL" headerTextCalc="true" description="= SELECT.DATA_MVT042 " visibleCondition="(SELECT.DATA_MVT04 != '0' &amp;&amp; SELECT.DATA_MVT03 != '0' &amp;&amp; SELECT.DATA_MVT02 != '0' &amp;&amp; SELECT.DATA_MVT01 != '0') " totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
					<CALC formula="
					switch(SELECT.DATA_MVT04) {
						case '4.2' :
							return ROW.DATA_MVT03 / TOTALROW.DATA_MVT03 * 100;
							break;
						case '4.3' :
							return ROW.DATA_MVT02 - ROW.DATA_MVT03;
							break;
						case '4.4' :
							return ((ROW.DATA_MVT02 - ROW.DATA_MVT03)/ ROW.DATA_MVT02 * 100);
							break;
						default :
							return ROW.DATA_MVT04;
							break;
					}" />
				</COLUMN>
				<COLUMN dataField="DATA_MVT05" type="Number" width="90" outputFormat="= SELECT.DATA_MVT054" selectable="true" headerText="SELECT.DATA_MVT05_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="DATA_MVT05_2" type="Number" width="90" outputFormat="= if(SELECT.DATA_MVT05=='4.3'){return SELECT.DATA_MVT034} else { return SELECT.DATA_MVT054}" selectable="true" headerText="SELECT.DATA_MVT05_LABEL" headerTextCalc="true" description="= SELECT.DATA_MVT052 " visibleCondition="(SELECT.DATA_MVT05 != '0' &amp;&amp; SELECT.DATA_MVT04 != '0' &amp;&amp; SELECT.DATA_MVT03 != '0' &amp;&amp; SELECT.DATA_MVT02 != '0' &amp;&amp; SELECT.DATA_MVT01 != '0') " totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA_MVT05) {
						case '4.2' :
							return ROW.DATA_MVT04 / TOTALROW.DATA_MVT04 * 100;
							break;
						case '4.3' :
							return ROW.DATA_MVT03 - ROW.DATA_MVT04;
							break;
						case '4.4' :
							return ((ROW.DATA_MVT03 - ROW.DATA_MVT04)/ ROW.DATA_MVT03 * 100);
							break;
						default :
							return ROW.DATA_MVT05;
							break;
					}" />
				</COLUMN>
				<COLUMN dataField="DATA_MVT06" type="Number" width="90" outputFormat="= SELECT.DATA_MVT064" selectable="true" headerText="SELECT.DATA_MVT06_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="DATA_MVT06_2" type="Number" width="90" outputFormat="= if(SELECT.DATA_MVT06=='4.3'){return SELECT.DATA_MVT044} else { return SELECT.DATA_MVT064}" selectable="true" headerText="SELECT.DATA_MVT06_LABEL" headerTextCalc="true" description="= SELECT.DATA_MVT062 " visibleCondition="(SELECT.DATA_MVT06 != '0' &amp;&amp; SELECT.DATA_MVT05 != '0' &amp;&amp; SELECT.DATA_MVT04 != '0' &amp;&amp; SELECT.DATA_MVT03 != '0' &amp;&amp; SELECT.DATA_MVT02 != '0' &amp;&amp; SELECT.DATA_MVT01 != '0') " totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA_MVT06) {
						case '4.2' :
							return ROW.DATA_MVT05 / TOTALROW.DATA_MVT05 * 100;
							break;
						case '4.3' :
							return ROW.DATA_MVT04 - ROW.DATA_MVT05;
							break;
						case '4.4' :
							return ((ROW.DATA_MVT04 - ROW.DATA_MVT05)/ ROW.DATA_MVT04 * 100);
							break;
						default :
							return ROW.DATA_MVT06;
							break;
					}" />
				</COLUMN>
				<COLUMN dataField="DATA_MVT07" type="Number" width="90" outputFormat="= SELECT.DATA_MVT074" selectable="true" headerText="SELECT.DATA_MVT07_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="DATA_MVT07_2" type="Number" width="90" outputFormat="= if(SELECT.DATA_MVT07=='4.3'){return SELECT.DATA_MVT054} else { return SELECT.DATA_MVT074}" selectable="true" headerText="SELECT.DATA_MVT07_LABEL" headerTextCalc="true" description="= SELECT.DATA_MVT072 " visibleCondition="(SELECT.DATA_MVT07 != '0' &amp;&amp; SELECT.DATA_MVT06 != '0' &amp;&amp; SELECT.DATA_MVT05 != '0' &amp;&amp; SELECT.DATA_MVT04 != '0' &amp;&amp; SELECT.DATA_MVT03 != '0' &amp;&amp; SELECT.DATA_MVT02 != '0' &amp;&amp; SELECT.DATA_MVT01 != '0') " totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA_MVT07) {
						case '4.2' :
							return ROW.DATA_MVT06 / TOTALROW.DATA_MVT06 * 100;
							break;
						case '4.3' :
							return ROW.DATA_MVT05 - ROW.DATA_MVT06;
							break;
						case '4.4' :
							return ((ROW.DATA_MVT05 - ROW.DATA_MVT06)/ ROW.DATA_MVT05 * 100);
							break;
						default :
							return ROW.DATA_MVT07;
							break;
					}" />
				</COLUMN>
				<COLUMN dataField="DATA_MVT08" type="Number" width="90" outputFormat="= SELECT.DATA_MVT084" selectable="true" headerText="SELECT.DATA_MVT08_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="DATA_MVT08_2" type="Number" width="90" outputFormat="= if(SELECT.DATA_MVT08=='4.3'){return SELECT.DATA_MVT064} else { return SELECT.DATA_MVT084}" selectable="true" headerText="SELECT.DATA_MVT08_LABEL" headerTextCalc="true" description="= SELECT.DATA_MVT082" visibleCondition="(SELECT.DATA_MVT08 != '0' &amp;&amp; SELECT.DATA_MVT07 != '0' &amp;&amp; SELECT.DATA_MVT06 != '0' &amp;&amp; SELECT.DATA_MVT05 != '0' &amp;&amp; SELECT.DATA_MVT04 != '0' &amp;&amp; SELECT.DATA_MVT03 != '0' &amp;&amp; SELECT.DATA_MVT02 != '0' &amp;&amp; SELECT.DATA_MVT01 != '0') " totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA_MVT08) {
						case '4.2' :
							return ROW.DATA_MVT07 / TOTALROW.DATA_MVT07 * 100;
							break;
						case '4.3' :
							return ROW.DATA_MVT06 - ROW.DATA_MVT07;
							break;
						case '4.4' :
							return ((ROW.DATA_MVT06 - ROW.DATA_MVT07)/ ROW.DATA_MVT06 * 100);
							break;
						default :
							return ROW.DATA_MVT08;
							break;
					}" />
				</COLUMN>
				<COLUMN dataField="DATA_MVT09" type="Number" width="90" outputFormat="= SELECT.DATA_MVT094" selectable="true" headerText="SELECT.DATA_MVT09_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="DATA_MVT09_2" type="Number" width="90" outputFormat="= if(SELECT.DATA_MVT09=='4.3'){return SELECT.DATA_MVT074} else { return SELECT.DATA_MVT094}" selectable="true" headerText="SELECT.DATA_MVT09_LABEL" headerTextCalc="true" description="= SELECT.DATA_MVT092 " visibleCondition="(SELECT.DATA_MVT09 != '0' &amp;&amp; SELECT.DATA_MVT08 != '0' &amp;&amp; SELECT.DATA_MVT07 != '0' &amp;&amp; SELECT.DATA_MVT06 != '0' &amp;&amp; SELECT.DATA_MVT05 != '0' &amp;&amp; SELECT.DATA_MVT04 != '0' &amp;&amp; SELECT.DATA_MVT03 != '0' &amp;&amp; SELECT.DATA_MVT02 != '0' &amp;&amp; SELECT.DATA_MVT01 != '0') " totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA_MVT09) {
						case '4.2' :
							return ROW.DATA_MVT08 / TOTALROW.DATA_MVT08 * 100;
							break;
						case '4.3' :
							return ROW.DATA_MVT07 - ROW.DATA_MVT08;
							break;
						case '4.4' :
							return ((ROW.DATA_MVT07 - ROW.DATA_MVT08)/ ROW.DATA_MVT07 * 100);
							break;
						default :
							return ROW.DATA_MVT09;
							break;
					}" />
				</COLUMN>
				<COLUMN dataField="DATA_MVT10" type="Number" width="90" outputFormat="= SELECT.DATA_MVT104" selectable="true" headerText="SELECT.DATA_MVT10_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="DATA_MVT10_2" type="Number" width="90" outputFormat="= if(SELECT.DATA_MVT10=='4.3'){return SELECT.DATA_MVT084} else { return SELECT.DATA_MVT104}" selectable="true" headerText=" SELECT.DATA_MVT10_LABEL" headerTextCalc="true" description="= SELECT.DATA_MVT102 " visibleCondition="(SELECT.DATA_MVT10 != '0' &amp;&amp; SELECT.DATA_MVT09 != '0' &amp;&amp; SELECT.DATA_MVT08 != '0' &amp;&amp; SELECT.DATA_MVT07 != '0' &amp;&amp; SELECT.DATA_MVT06 != '0' &amp;&amp; SELECT.DATA_MVT05 != '0' &amp;&amp; SELECT.DATA_MVT04 != '0' &amp;&amp; SELECT.DATA_MVT03 != '0' &amp;&amp; SELECT.DATA_MVT02 != '0' &amp;&amp; SELECT.DATA_MVT01 != '0') " totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA_MVT10) {
						case '4.2' :
							return ROW.DATA_MVT09 / TOTALROW.DATA_MVT09 * 100;
							break;
						case '4.3' :
							return ROW.DATA_MVT08 - ROW.DATA_MVT09;
							break;
						case '4.4' :
							return ((ROW.DATA_MVT08 - ROW.DATA_MVT09)/ ROW.DATA_MVT08 * 100);
							break;
						default :
							return ROW.DATA_MVT10;
							break;
					}" />
				</COLUMN>
				<COLUMN dataField="DATA_MVT11" type="Number" width="90" outputFormat="= SELECT.DATA_MVT114" selectable="true" headerText="SELECT.DATA_MVT11_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="DATA_MVT11_2" type="Number" width="90" outputFormat="= if(SELECT.DATA_MVT11=='4.3'){return SELECT.DATA_MVT094} else { return SELECT.DATA_MVT114}" selectable="true" headerText=" SELECT.DATA_MVT11_LABEL" headerTextCalc="true" description="= SELECT.DATA_MVT112" visibleCondition="(SELECT.DATA_MVT11 != '0' &amp;&amp; SELECT.DATA_MVT10 != '0' &amp;&amp; SELECT.DATA_MVT09 != '0' &amp;&amp; SELECT.DATA_MVT08 != '0' &amp;&amp; SELECT.DATA_MVT07 != '0' &amp;&amp; SELECT.DATA_MVT06 != '0' &amp;&amp; SELECT.DATA_MVT05 != '0' &amp;&amp; SELECT.DATA_MVT04 != '0' &amp;&amp; SELECT.DATA_MVT03 != '0' &amp;&amp; SELECT.DATA_MVT02 != '0' &amp;&amp; SELECT.DATA_MVT01 != '0') " totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA_MVT11) {
						case '4.2' :
							return ROW.DATA_MVT10 / TOTALROW.DATA_MVT10 * 100;
							break;
						case '4.3' :
							return ROW.DATA_MVT09 - ROW.DATA_MVT10;
							break;
						case '4.4' :
							return ((ROW.DATA_MVT09 - ROW.DATA_MVT10)/ ROW.DATA_MVT09 * 100);
							break;
						default :
							return ROW.DATA_MVT11;
							break;
					}" />
				</COLUMN>
				<COLUMN dataField="DATA_MVT12" type="Number" width="90" outputFormat="= SELECT.DATA_MVT124" selectable="true" headerText="SELECT.DATA_MVT12_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="DATA_MVT12_2" type="Number" width="90" outputFormat="= if(SELECT.DATA_MVT12=='4.3'){return SELECT.DATA_MVT104} else { return SELECT.DATA_MVT124}" selectable="true" headerText=" SELECT.DATA_MVT12_LABEL" headerTextCalc="true" description="= SELECT.DATA_MVT122" visibleCondition="(SELECT.DATA_MVT12 != '0' &amp;&amp; SELECT.DATA_MVT11 != '0' &amp;&amp; SELECT.DATA_MVT10 != '0' &amp;&amp; SELECT.DATA_MVT09 != '0' &amp;&amp; SELECT.DATA_MVT08 != '0' &amp;&amp; SELECT.DATA_MVT07 != '0' &amp;&amp; SELECT.DATA_MVT06 != '0' &amp;&amp; SELECT.DATA_MVT05 != '0' &amp;&amp; SELECT.DATA_MVT04 != '0' &amp;&amp; SELECT.DATA_MVT03 != '0' &amp;&amp; SELECT.DATA_MVT02 != '0' &amp;&amp; SELECT.DATA_MVT01 != '0') " totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA_MVT12) {
						case '4.2' :
							return ROW.DATA_MVT11 / TOTALROW.DATA_MVT11 * 100;
							break;
						case '4.3' :
							return ROW.DATA_MVT10 - ROW.DATA_MVT11;
							break;
						case '4.4' :
							return ((ROW.DATA_MVT10 - ROW.DATA_MVT11)/ ROW.DATA_MVT10 * 100);
							break;
						default :
							return ROW.DATA_MVT12;
							break;
					}" />
				</COLUMN>
				<COLUMN dataField="DATA_MVT13" type="Number" width="90" outputFormat="= SELECT.DATA_MVT134" selectable="true" headerText="SELECT.DATA_MVT13_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="DATA_MVT13_2" type="Number" width="90" outputFormat="= if(SELECT.DATA_MVT13=='4.3'){return SELECT.DATA_MVT104} else { return SELECT.DATA_MVT134}" selectable="true" headerText=" SELECT.DATA_MVT13_LABEL" headerTextCalc="true" description="= SELECT.DATA_MVT132" visibleCondition="(SELECT.DATA_MVT13 != '0' &amp;&amp; SELECT.DATA_MVT11 != '0' &amp;&amp; SELECT.DATA_MVT10 != '0' &amp;&amp; SELECT.DATA_MVT09 != '0' &amp;&amp; SELECT.DATA_MVT08 != '0' &amp;&amp; SELECT.DATA_MVT07 != '0' &amp;&amp; SELECT.DATA_MVT06 != '0' &amp;&amp; SELECT.DATA_MVT05 != '0' &amp;&amp; SELECT.DATA_MVT04 != '0' &amp;&amp; SELECT.DATA_MVT03 != '0' &amp;&amp; SELECT.DATA_MVT02 != '0' &amp;&amp; SELECT.DATA_MVT01 != '0') " totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA_MVT13) {
						case '4.2' :
							return ROW.DATA_MVT12 / TOTALROW.DATA_MVT12 * 100;
							break;
						case '4.3' :
							return ROW.DATA_MVT11 - ROW.DATA_MVT12;
							break;
						case '4.4' :
							return ((ROW.DATA_MVT11 - ROW.DATA_MVT12)/ ROW.DATA_MVT11 * 100);
							break;
						default :
							return ROW.DATA_MVT13;
							break;
					}" />
				</COLUMN>
				<COLUMN dataField="DATA_MVT14" type="Number" width="90" outputFormat="= SELECT.DATA_MVT144" selectable="true" headerText="SELECT.DATA_MVT14_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="DATA_MVT14_2" type="Number" width="90" outputFormat="= if(SELECT.DATA_MVT14=='4.3'){return SELECT.DATA_MVT114} else { return SELECT.DATA_MVT144}" selectable="true" headerText=" SELECT.DATA_MVT14_LABEL" headerTextCalc="true" description="= SELECT.DATA_MVT142" visibleCondition="(SELECT.DATA_MVT14 != '0' &amp;&amp; SELECT.DATA_MVT11 != '0' &amp;&amp; SELECT.DATA_MVT10 != '0' &amp;&amp; SELECT.DATA_MVT09 != '0' &amp;&amp; SELECT.DATA_MVT08 != '0' &amp;&amp; SELECT.DATA_MVT07 != '0' &amp;&amp; SELECT.DATA_MVT06 != '0' &amp;&amp; SELECT.DATA_MVT05 != '0' &amp;&amp; SELECT.DATA_MVT04 != '0' &amp;&amp; SELECT.DATA_MVT03 != '0' &amp;&amp; SELECT.DATA_MVT02 != '0' &amp;&amp; SELECT.DATA_MVT01 != '0') " totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA_MVT14) {
						case '4.2' :
							return ROW.DATA_MVT13 / TOTALROW.DATA_MVT13 * 100;
							break;
						case '4.3' :
							return ROW.DATA_MVT12 - ROW.DATA_MVT13;
							break;
						case '4.4' :
							return ((ROW.DATA_MVT12 - ROW.DATA_MVT13)/ ROW.DATA_MVT11 * 100);
							break;
						default :
							return ROW.DATA_MVT14;
							break;
					}" />
				</COLUMN>
			</DATAGRID>
		</ONGLET>
		<ONGLET label="Stocks" queryNumber="4" newPage="true" visibleCondition="VIEW.ACTION_AFFICHAGE == 'AFFICHER'">
		<CHART title="Evolution quantité stockée" type="lineChart" subType="" maxItems="100" maxItemsSortOn="" maxItemsSortSeq="" sortField="COD" sortSeq="A">
				<CATEGORY field="TXT" type="Char" />
				<SERIE field="QSTF" displayName="SELECT.DATA_MVT01_LABEL" displayNameCalc="true"/>
			</CHART>
			
				
			<DATAGRID 	title="" 
						total="true" 
						headerHeight="60" 
						selectRowInRows="= ROW.OID == '-9999997'" 
						otherRowInRows="= ROW.OID == '-9999998'" 
						totalRowInRows="= ROW.OID == '-9999999'"
						variableRowHeight="true" 
						> 
				
				<INSERT name="DATAGRID_MULTITAB_STYLES"/>
				
				<COLUMN dataField="OID"
					type="Number"
					visible="false" />
				<COLUMN dataField="COD" 
					type="Char" 
					width="100"
					outputFormat="#"
					headerText="Code" 
					textAlign="left" 
					totalComplement="*ROW">
					<INSERT name="COLUMN_COD_MULTITAB_STYLES"/>
				</COLUMN>
				<COLUMN dataField="TXT" 
					type="Char" 
					minWidth="110"
					headerText="Texte" 
					textAlign="left" 
					totalComplement="*ROW"/>
					
				<COLUMN dataField="UNIT" 
					type="Char" 
					width="50"
					headerText="Unité" 
					textAlign="left" 
					totalComplement="*ROW"
                    />	
				<COLUMN dataField="QSTD" 
					type="Number" 
					width="80"
					outputFormat="#"
					visible="true"
					headerText="Quantité@LF@Stock début" 
					textAlign="right"
					totalComplement="*ROW"
                    />
				<COLUMN dataField="QENT" 
					type="Number" 
					width="80"
					outputFormat="#"
					visible="true"
					headerText="Quantité@LF@Entrées" 
					textAlign="right"
					totalComplement="*ROW"
                    />
				<COLUMN dataField="QSOR" 
					type="Number" 
					width="80"
					outputFormat="#"
					visible="true"
					headerText="Quantité@LF@Sorties" 
					textAlign="right"
					totalComplement="*ROW"
                    />
				<COLUMN dataField="QECA" 
					type="Number" 
					width="80"
					outputFormat="#"
					visible="true"
					headerText="Quantité@LF@Ecart" 
					textAlign="right"
					totalComplement="*ROW"
                    />
				<COLUMN dataField="QSTF" 
					type="Number" 
					width="80"
					outputFormat="#"
					visible="true"
					headerText="Quantité@LF@Stock fin" 
					textAlign="right"
					totalComplement="*ROW"
                    />
					
					
				<COLUMN dataField="MSTD" 
					type="Number" 
					width="90"
					outputFormat="#,00E"
					visible="true"
					headerText="Valeur @LF@Stock début" 
					textAlign="right"
					totalComplement="*ROW"
                    />
				<COLUMN dataField="PUMD" 
					type="Number" 
					width="90"
					outputFormat="#,0000E"
					visible="true"
					headerText="PUMP @LF@Stock début" 
					textAlign="right"
					totalComplement="*ROW"
                    />
					
				<COLUMN dataField="MENT" 
					type="Number" 
					width="90"
					outputFormat="#,00E"
					visible="true"
					headerText="Montant @LF@Entrées" 
					textAlign="right"
					totalComplement="*ROW"
                    />
				<COLUMN dataField="MSOR" 
					type="Number" 
					width="90"
					outputFormat="#,00E"
					visible="true"
					headerText="Montant @LF@Sorties" 
					textAlign="right"
					totalComplement="*ROW"
                    />
				<COLUMN dataField="MECA" 
					type="Number" 
					width="90"
					outputFormat="#,00E"
					visible="true"
					headerText="Montant @LF@Ecart" 
					textAlign="right"
					totalComplement="*ROW"
                    />
				<COLUMN dataField="MSTF" 
					type="Number" 
					width="90"
					outputFormat="#,00E"
					visible="true"
					headerText="Valeur @LF@Stock fin" 
					textAlign="right"
					totalComplement="*ROW"
                    />
				<COLUMN dataField="PUMF" 
					type="Number" 
					width="90"
					outputFormat="#,0000E"
					visible="true"
					headerText="PUMP @LF@Stock fin" 
					textAlign="right"
					totalComplement="*ROW"
                    />
				
			</DATAGRID>
		</ONGLET>
	</PRESENTATION>
</VUE>

			
