<?xml version="1.0" encoding="ISO-8859-15"?>
<DBOPTIMIZER>

	<VIEWNAMEOPTIMIZER viewName="V_LIGNES_COMMANDES_X" defaultViewName="eco.v_lignes_commandes_2" label="Lignes de commande"> 	
		<LEFTJOININDICATOR label="FACTURE" leftjoin="LEFT JOIN eco.v_lignes_facture_2 ON facture_commande_id = commande_id">
			<FIELD name="date_facture" />
			<FIELD name="date_reglement" />
		</LEFTJOININDICATOR>
	</VIEWNAMEOPTIMIZER>
		
	<VIEWNAMEOPTIMIZER viewName="V_MOUVEMENTS_ARTICLES_X" defaultViewName="eco.v_mouvements_articles_2" label="Mouvements"> 	
		<LEFTJOININDICATOR label="TYPE_MOUVEMENT" leftjoin="LEFT JOIN eco.v_types_mouvements_2 ON type_mouvement_id = v_types_mouvements_2.type_mouvement_oid ">
			<FIELD name="type_mouvement_code"/>
			<FIELD name="type_mouvement_texte"/>
			<FIELD name="type_mouvement_section_id"/>
			<FIELD name="type_mouvement_section_code"/>
			<FIELD name="type_mouvement_section_texte"/>
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="SEJOUR" leftjoin="LEFT JOIN eco.v_sejours_1 ON sejours_mouvement_id = mouvement_id">
			<FIELD name="rss_id" />
			<FIELD name="rss_code" />
			<FIELD name="rss_texte" />
			<FIELD name="sejour_id" />
			<FIELD name="sejour_code" />
			<FIELD name="sejour_texte" />
			<FIELD name="ca_ghs" />
			<FIELD name="encours" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="MEDECINS" leftjoin="LEFT JOIN eco.v_medecins_1 ON medecin_reference_id = medecin_id">
			<FIELD name="medecin_id" />
			<FIELD name="medecin_code" />
			<FIELD name="medecin_texte" />
			<FIELD name="specialite_id" />
			<FIELD name="specialite_code" />
			<FIELD name="specialite_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="COMMANDES" leftjoin="LEFT JOIN eco.v_commandes_1 ON commande_id = commande_oid">
			<FIELD name="commande_code" />
			<FIELD name="commande_texte" />
			<FIELD name="date_commande" />
		</LEFTJOININDICATOR>
	</VIEWNAMEOPTIMIZER>
	
	<VIEWNAMEOPTIMIZER viewName="V_STOCK_MENSUEL_X" defaultViewName="eco.v_stock_2" label="Mouvements"> 	
	</VIEWNAMEOPTIMIZER>
	
	<VIEWNAMEOPTIMIZER viewName="V_MOUVEMENTS_STOCKS_X" defaultViewName="eco.v_mouvements_articles_2" label="Mouvements"> 	
	</VIEWNAMEOPTIMIZER>
	
	<VIEWNAMEOPTIMIZER viewName="V_ALL_X" defaultViewName="" label="Tous"> 	
		<LEFTJOININDICATOR label="ARTICLES" leftjoin="LEFT JOIN eco.v_articles_2 ON article_id = v_articles_2.article_oid ">
			<FIELD name="article_code"/>
			<FIELD name="article_texte"/>
			<FIELD name="article_texte_fournisseur"/>
			<FIELD name="article_section_id"/>
			<FIELD name="article_section_code"/>
			<FIELD name="article_section_texte"/>
			<FIELD name="type_article_id"/>
			<FIELD name="type_article_code"/>
			<FIELD name="type_article_texte"/>
			<FIELD name="type_article_section_id"/>
			<FIELD name="type_article_section_code"/>
			<FIELD name="type_article_section_texte"/>
			<FIELD name="type_article_cti_id"/>
			<FIELD name="type_article_cti_code"/>
			<FIELD name="type_article_cti_texte"/>
			<FIELD name="type_article_cti_section_id"/>
			<FIELD name="type_article_cti_section_code"/>
			<FIELD name="type_article_cti_section_texte"/>
			<FIELD name="article_reference_cacic_id"/>
			<FIELD name="article_reference_cacic_code"/>
			<FIELD name="article_reference_cacic_texte"/>
			<FIELD name="article_reference_cacic_section_id"/>
			<FIELD name="article_reference_cacic_section_code"/>
			<FIELD name="article_reference_cacic_section_texte"/>
			<FIELD name="article_reference_cti_id"/>
			<FIELD name="article_reference_cti_code"/>
			<FIELD name="article_reference_cti_texte"/>
			<FIELD name="article_reference_cti_section_id"/>
			<FIELD name="article_reference_cti_section_code"/>
			<FIELD name="article_reference_cti_section_texte"/>
			<FIELD name="classification_atc_id"/>
			<FIELD name="classification_atc_code"/>
			<FIELD name="classification_atc_texte"/>
			<FIELD name="classification_atc_1_id"/>
			<FIELD name="classification_atc_1_code"/>
			<FIELD name="classification_atc_1_texte"/>
			<FIELD name="classification_atc_2_id"/>
			<FIELD name="classification_atc_2_code"/>
			<FIELD name="classification_atc_2_texte"/>
			<FIELD name="classification_atc_3_id"/>
			<FIELD name="classification_atc_3_code"/>
			<FIELD name="classification_atc_3_texte"/>
			<FIELD name="classification_atc_4_id"/>
			<FIELD name="classification_atc_4_code"/>
			<FIELD name="classification_atc_4_texte"/>
			<FIELD name="classification_atc_section_id"/>
			<FIELD name="classification_atc_section_code"/>
			<FIELD name="classification_atc_section_texte"/>
			<FIELD name="famille_article_id"/>
			<FIELD name="famille_article_code"/>
			<FIELD name="famille_article_texte"/>
			<FIELD name="famille_article_section_id"/>
			<FIELD name="famille_article_section_code"/>
			<FIELD name="famille_article_section_texte"/>
			<FIELD name="sous_famille_article_id"/>
			<FIELD name="sous_famille_article_code"/>
			<FIELD name="sous_famille_article_texte"/>
			<FIELD name="sous_famille_article_section_id"/>
			<FIELD name="sous_famille_article_section_code"/>
			<FIELD name="sous_famille_article_section_texte"/>
			<FIELD name="categorie_article_id"/>
			<FIELD name="categorie_article_code"/>
			<FIELD name="categorie_article_texte"/>
			<FIELD name="categorie_article_section_id"/>
			<FIELD name="categorie_article_section_code"/>
			<FIELD name="categorie_article_section_texte"/>
			<FIELD name="sous_categorie_article_id"/>
			<FIELD name="sous_categorie_article_code"/>
			<FIELD name="sous_categorie_article_texte"/>
			<FIELD name="sous_categorie_article_section_id"/>
			<FIELD name="sous_categorie_article_section_code"/>
			<FIELD name="sous_categorie_article_section_texte"/>
			<FIELD name="unite_stockage_article_id"/>
			<FIELD name="unite_stockage_article_code"/>
			<FIELD name="unite_stockage_article_texte"/>
			<FIELD name="unite_stockage_article_section_id"/>
			<FIELD name="unite_stockage_article_section_code"/>
			<FIELD name="unite_stockage_article_section_texte"/>
			<FIELD name="unite_distribution_article_id"/>
			<FIELD name="unite_distribution_article_code"/>
			<FIELD name="unite_distribution_article_texte"/>
			<FIELD name="unite_distribution_article_section_id"/>
			<FIELD name="unite_distribution_article_section_code"/>
			<FIELD name="t_articles.unite_distribution_section_texte AS unite_distribution_article_section_texte"/>
			<FIELD name="gere_en_stock"/>
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Type article CTI" leftjoin="LEFT JOIN eco.v_type_article_cti_link ON v_articles_2.type_article_cti_id = v_type_article_cti_link.type_article_cti_linkid">
			<FIELD name="type_article_cti_code"/>
			<FIELD name="type_article_cti_texte"/>
			<FIELD name="type_article_cti_section_id"/>
			<FIELD name="type_article_cti_section_code"/>
			<FIELD name="type_article_cti_section_texte"/>
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="SITE" leftjoin="LEFT JOIN eco.v_sites_2 ON site_id = v_sites_2.site_oid ">
			<FIELD name="site_code"/>
			<FIELD name="site_texte"/>
			<FIELD name="site_section_id"/>
			<FIELD name="site_section_code"/>
			<FIELD name="site_section_texte"/>
		</LEFTJOININDICATOR>
        <LEFTJOININDICATOR label="POLE" leftjoin="LEFT JOIN eco.v_eco_view_pole_1 ON pole_id = v_eco_view_pole_1.oid ">
			<FIELD name="pole_code"/>
			<FIELD name="pole_texte"/>
			<FIELD name="pole_section_id"/>
			<FIELD name="pole_section_code"/>
			<FIELD name="pole_section_texte"/>
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="GESTIONNAIRE" leftjoin="LEFT JOIN eco.v_gestionnaires_2 ON gestionnaire_id = v_gestionnaires_2.gestionnaire_oid ">
			<FIELD name="gestionnaire_code"/>
			<FIELD name="gestionnaire_texte"/>
			<FIELD name="gestionnaire_section_id"/>
			<FIELD name="gestionnaire_section_code"/>
			<FIELD name="gestionnaire_section_texte"/>
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="LIEUX" leftjoin="LEFT JOIN eco.v_lieux_3 ON lieu_id = v_lieux_3.lieu_oid ">
			<FIELD name="lieu_code"/>
			<FIELD name="lieu_texte"/>
			<FIELD name="lieu_section_id"/>
			<FIELD name="lieu_section_code"/>
			<FIELD name="lieu_section_texte"/>
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="COMPTES" leftjoin="LEFT JOIN eco.v_comptes_2 ON compte_article_id = v_comptes_2.compte_article_oid ">
			<FIELD name="compte_article_code"/>
			<FIELD name="compte_article_texte"/>
			<FIELD name="compte_article_section_id"/>
			<FIELD name="compte_article_section_code"/>
			<FIELD name="compte_article_section_texte"/>
		</LEFTJOININDICATOR>

		<LEFTJOININDICATOR label="FOURNISSEUR" leftjoin="LEFT JOIN eco.v_fournisseurs_2 ON fournisseur_id = v_fournisseurs_2.fournisseur_oid ">
			<FIELD name="fournisseur_code"/>
			<FIELD name="fournisseur_texte"/>
			<FIELD name="fournisseur_section_id"/>
			<FIELD name="fournisseur_section_code"/>
			<FIELD name="fournisseur_section_texte"/>
			<FIELD name="type_fournisseur_id"/>
			<FIELD name="type_fournisseur_code"/>
			<FIELD name="type_fournisseur_texte"/>
			<FIELD name="type_fournisseur_section_id"/>
			<FIELD name="type_fournisseur_section_code"/>
			<FIELD name="type_fournisseur_section_texte"/>
			<FIELD name="fournisseur_reference_cacic_id"/>
			<FIELD name="fournisseur_reference_cacic_code"/>
			<FIELD name="fournisseur_reference_cacic_texte"/>
			<FIELD name="fournisseur_reference_cacic_section_id"/>
			<FIELD name="fournisseur_reference_cacic_section_code"/>
			<FIELD name="fournisseur_reference_cacic_section_texte"/>
			<FIELD name="fournisseur_reference_cti_id"/>
			<FIELD name="fournisseur_reference_cti_code"/>
			<FIELD name="fournisseur_reference_cti_texte"/>
			<FIELD name="fournisseur_reference_cti_section_id"/>
			<FIELD name="fournisseur_reference_cti_section_code"/>
			<FIELD name="fournisseur_reference_cti_section_texte"/>
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="REF_FOURNISSEUR" leftjoin="LEFT JOIN eco.v_ref_article_fournisseur_1 ON fournisseur_id = v_ref_article_fournisseur_1.ref_article_fournisseur_id AND article_id = v_ref_article_fournisseur_1.ref_article_fournisseur_oid">
			<FIELD name="ref_article_fournisseur_oid"/>
			<FIELD name="ref_article_fournisseur_id"/>
			<FIELD name="ref_article_fournisseur_code"/>
			<FIELD name="ref_article_fournisseur_texte"/>
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="UF" leftjoin="LEFT JOIN eco.v_unites_fonctionnelles_2 ON unite_fonctionnelle_id = v_unites_fonctionnelles_2.unite_fonctionnelle_oid ">
			<FIELD name="unite_fonctionnelle_code"/>
			<FIELD name="unite_fonctionnelle_texte"/>
			<FIELD name="unite_fonctionnelle_section_id"/>
			<FIELD name="unite_fonctionnelle_section_code"/>
			<FIELD name="unite_fonctionnelle_section_texte"/>
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="PROVIDER" leftjoin="LEFT JOIN eco.v_eco_view_providers_1 ON provider_id = v_eco_view_providers_1.oid ">
			<FIELD name="provider_code" />
			<FIELD name="provider_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="LPP" leftjoin="LEFT JOIN eco.v_lpp_2 ON lpp_id = lpp_oid ">
			<FIELD name="lpp_code"/>
			<FIELD name="lpp_texte"/>
			<FIELD name="lpp_section_id"/>
			<FIELD name="lpp_section_code"/>
			<FIELD name="lpp_section_texte"/>
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="TYPE LPP" leftjoin="LEFT JOIN base.v_lpp_sus_1 ON lpp_sus_id = lpp_id AND date BETWEEN lpp_sus_date_debut AND lpp_sus_date_fin">
			<FIELD name="lpp_sus_id"/>
			<FIELD name="sus_date_debut"/>
			<FIELD name="sus_date_fin"/>
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="UCD" leftjoin="LEFT JOIN eco.v_ucd_2 ON ucd_id = ucd_oid ">
			<FIELD name="ucd_code"/>
			<FIELD name="ucd_texte"/>
			<FIELD name="ucd13_code"/>
			<FIELD name="ucd13_texte"/>
			<FIELD name="ucd_section_id"/>
			<FIELD name="ucd_section_code"/>
			<FIELD name="ucd_section_texte"/>
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="TYPE UCD" leftjoin="LEFT JOIN eco.v_ucd_tarifs_1 ON ucd_tarifs_id = ucd_id AND date BETWEEN ucd_tarifs_date_debut AND ucd_tarifs_date_fin">
			<FIELD name="ucd_tarifs_id"/>
			<FIELD name="ucd_tarifs_date_debut"/>
			<FIELD name="ucd_tarifs_date_fin"/>
		</LEFTJOININDICATOR>
	</VIEWNAMEOPTIMIZER>
	
</DBOPTIMIZER>

			
