<?xml version="1.0" encoding="UTF-8" ?>
<mapping>
	<actions>
		<!--  Opportunity -->
		<!-- 
		<action path="create_opportunity"
			class="com.edeal.frontline.controller.actions.LoadAction"
			allowAnonymous="false">
			<param name="type" value="Opportunity" />
			<display code="success" action="/sales/opportunity/edit_action.jsp" body="/sales/opportunity/edit.jsp" jsInclude="/js/format_tel.jsp,/js/ac/fobAC_js.jsp"/>
			<initializer class="com.edeal.frontline.initializers.OpportunityEditInitializer" id="Opportunity" scope="request"></initializer>
		</action>
		 -->

		<action path="create_opportunity" class="com.edeal.frontline.controller.actions.LoadAction"
			 allowAnonymous="false">
			<param name="type" value="Opportunity"/>
			<initializer class="com.edeal.frontline.initializers.custom.OpportunityInitializer" id="Opportunity"
				 scope="request">
				<init_param name="initOpp" method="initDevis"/>
				<init_param name="initOppStoID" setProperty="OppStoID"/>
				<init_param name="initPrdFamilleProduit_" method="initProduitFamily"/>
				<init_param name="initOppBizProviderID" setProperty="OppBizProviderID"/>
				<init_param name="initOppAffiliationCtID_" setProperty="OppAffiliationCtID_"/>
				<init_param name="initOppAffiliationCtID_" setProperty="OppCompteClient_"/>
				<init_param name="initOppFactAvoir_" setProperty="OppFactAvoir_"/>
				<init_param name="initOppEntID" setProperty="OppEntID"/>
				<init_param name="initOppEntPerID" method="initOppPerID"/>
				<init_param name="initOppPerID" setProperty="OppPerID"/>
				<init_param name="initOppCmdTypo_" method="initOppCmdTypo_"/>
				<init_param name="initOppRefFact_" setProperty="OppReferFact_"/>
			</initializer>
			<display code="success" action="/sales/opportunity/edit_action.jsp" body="/sales/opportunity/edit.jsp"
				 jsInclude="/js/format_tel.jsp,/js/ac/fobAC_js.jsp"/>
		</action>
		<action path="create_avoir" class="com.edeal.frontline.controller.actions.custom.CreateAvoirAction"
			 allowAnonymous="false">
			<param name="type" value="Opportunity"/>
			<display code="success" action="/sales/opportunity/edit_action.jsp" body="/sales/opportunity/edit.jsp"
				 jsInclude="/js/format_tel.jsp,/js/ac/fobAC_js.jsp"/>
		</action>
		<action path="edit_opportunity" class="com.edeal.frontline.controller.actions.LoadAction"
			 allowAnonymous="false">
			<param name="type" value="Opportunity"/>
			<display code="success" action="/sales/opportunity/edit_action.jsp" body="/sales/opportunity/edit.jsp"
				 jsInclude="/js/format_tel.jsp,/js/ac/fobAC_js.jsp"/>
		</action>
		<action path="save_opportunity" class="com.edeal.frontline.controller.actions.SaveAction"
			 allowAnonymous="false">
			<param name="type" value="Opportunity"/>
			<redirect code="success" page="/read_opportunity.fl"/>
		</action>	
		<action path="view_generate_facture" class="com.edeal.frontline.controller.actions.ForwardAction"
             allowAnonymous="false">
            <display code="success" body="/sales/opportunity/view_generate_facture.jsp" action="/sales/opportunity/view_generate_facture_action.jsp"/>
        </action>
		<action path="view_generate_cotisation" class="com.edeal.frontline.controller.actions.ForwardAction"
			 allowAnonymous="false">
			<display code="success" body="/sales/opportunity/view_generate.jsp" action="/sales/opportunity/view_generate_action.jsp"/>
		</action>
		<action path="generate_cotisation" class="com.edeal.frontline.controller.actions.custom.GenerateDevisCotisationAction"
			 allowAnonymous="false">
			<forward code="success" page="/common/json.jsp"/>
		</action>
		<action path="generate_facture" class="com.edeal.frontline.controller.actions.custom.GenerateFactureCotisationAction"
			 allowAnonymous="false">
			<forward code="success" page="/common/json.jsp"/>
		</action>
		<!-- temporaire pour résoudre le problème des échéancier -->
		<action path="generate_facture_echeancier" class="com.edeal.frontline.controller.actions.custom.SolveFacEcheancierBugAction_"
			 allowAnonymous="false">
			<forward code="success" page="/common/json.jsp"/>
		</action>
		
		<action path="get_cotisation_prds" class="com.edeal.frontline.controller.actions.custom.GetCotisationProducts" allowAnonymous="false">
			<forward code="success" page="/common/json.jsp"/>
		</action>
		<action path="save_rot_ajax" class="com.edeal.frontline.controller.actions.custom.SaveCotisationRuleAjax" allowAnonymous="false" loginPage="/login_ajax.jsp">
			<forward code="success" page="/common/blank_ajax.jsp"/>
			<forward code="failure" page="/errors/failure_report_ajax.jsp"/>
		</action>
		<action path="valider_devis_opportunity" class="com.edeal.frontline.controller.actions.custom.ValiderOpportunityAction"
			 allowAnonymous="false">
			<param name="type" value="Opportunity"/>
			<param name="typeVal" value="DEVACOMM"/>
			<redirect code="success" page="/read_opportunity.fl"/>
		</action>
		<action path="valider_commande_opportunity" class="com.edeal.frontline.controller.actions.custom.ValiderOpportunityAction"
			 allowAnonymous="false">
			<param name="type" value="Opportunity"/>
			<param name="typeVal" value="COMMAFACT"/>
			<redirect code="success" page="/read_opportunity.fl"/>
		</action>
		<action path="valider_facture_opportunity" class="com.edeal.frontline.controller.actions.custom.ValiderOpportunityAction"
			 allowAnonymous="false">
			<param name="typeVal" value="FACT"/>
			<param name="type" value="Opportunity"/>
			<redirect code="success" page="/read_opportunity.fl"/>
		</action>
		<action path="valider_impression_etiquette" class="com.edeal.frontline.controller.actions.custom.ValiderOpportunityAction"
			 allowAnonymous="false">
			<param name="typeVal" value="ETIQ"/>
			<redirect code="success" page="/read_opportunity.fl"/>
		</action>
		<action path="save_newopportunity_show_products_ajax" class="com.edeal.frontline.controller.actions.SaveAction"
			 allowAnonymous="false">
			<param name="type" value="Opportunity"/>
			<forward code="success" page="/sales/opportunity/save_opp_with_product_ajax.jsp"/>
		</action>
		<action path="read_opportunity" class="com.edeal.frontline.controller.actions.LoadAction"
			 allowAnonymous="false">
			<param name="type" value="Opportunity"/>
			<subaction class="com.edeal.frontline.controller.actions.custom.InteractionListAction">
				<param name="gridName" value="OppInt"/>
				<param name="type" value="opportunity"/>
				<param name="executeQuery" value="false"/>
				<param name="embedded" value="true"/>
				<result code="success" continue="true"/>
			</subaction>
			<subaction class="com.edeal.frontline.controller.actions.CompetitorListAction">
				<result code="success" continue="true"/>
			</subaction>
			<display code="success" action="/sales/opportunity/read_action.jsp" body="/sales/opportunity/read.jsp"
				 jsInclude="/js/checkFields.jsp,/js/format_tel.jsp"/>
		</action>
		
		<!--
		<action path="delete_opportunity" class="com.edeal.frontline.controller.actions.DeleteAction"
			 allowAnonymous="false">
			<param name="type" value="Opportunity"/>
			<forward code="success" page="/list_criteria.fl?lc=OPPOR">
				<userChoice page="/prompt_user_choice.fl" displayList="true" listRedirect="/list_criteria.fl?lc=OPPOR"
					 type="Opportunity">
					<fieldNotEmpty field="OppPerID" page="/read_person.fl"/>
					<fieldNotEmpty field="OppEntID" page="/read_enterprise.fl"/>
				</userChoice>
			</forward>
		</action>
		-->
		
		<action path="delete_devis" class="com.edeal.frontline.controller.actions.DeleteAction"
			 allowAnonymous="false">
			<param name="type" value="Opportunity"/>
			<forward code="success" page="/list_criteria.fl?lc=OPPDEVIS">
				<userChoice page="/prompt_user_choice.fl" displayList="true" listRedirect="/list_criteria.fl?lc=OPPDEVIS"
					 type="Opportunity">
					<fieldNotEmpty field="OppPerID" page="/read_person.fl"/>
				</userChoice>
			</forward>
		</action>
		
		<action path="delete_commande" class="com.edeal.frontline.controller.actions.DeleteAction"
			 allowAnonymous="false">
			<param name="type" value="Opportunity"/>
			<forward code="success" page="/list_criteria.fl?lc=OPPCMD">
				<userChoice page="/prompt_user_choice.fl" displayList="true" listRedirect="/list_criteria.fl?lc=OPPCMD"
					 type="Opportunity">
					<fieldNotEmpty field="OppPerID" page="/read_person.fl"/>
				</userChoice>
			</forward>
		</action>
		
		<action path="delete_facture" class="com.edeal.frontline.controller.actions.DeleteAction"
			 allowAnonymous="false">
			<param name="type" value="Opportunity"/>
			<forward code="success" page="/list_criteria.fl?lc=OPPFACTURE">
				<userChoice page="/prompt_user_choice.fl" displayList="true" listRedirect="/list_criteria.fl?lc=OPPFACTURE"
					 type="Opportunity">
					<fieldNotEmpty field="OppPerID" page="/read_person.fl"/>
				</userChoice>
			</forward>
		</action>
		
		
		<action path="list_opportunity" class="com.edeal.frontline.controller.actions.custom.OpportunityListAction"
			 allowAnonymous="false">
			<param name="gridName" value="OppList"/>
			<display code="success" body="/sales/opportunity/list.jsp" action="/sales/opportunity/list_action.jsp"/>
		</action>
		<action path="list_opportunity_criteria" allowAnonymous="false">
			<display code="success" body="/sales/opportunity/list_criteria.jsp" action="/sales/opportunity/list_action.jsp"
				 jsInclude="/js/utils.js,/js/checkFields.jsp,/js/calendar.jsp,/js/ac/fobAC_js.jsp"/>
		</action>
		<action path="list_opportunity_ajax" class="com.edeal.frontline.controller.actions.custom.OpportunityListAction"
			 allowAnonymous="false" loginPage="/login_ajax.jsp">
			<forward code="success" page="/common/list/listAjax.jsp"/>
		</action>
		<action path="select_entper_destinitaire" class="com.edeal.frontline.controller.actions.OppDestSelectAction"
			 allowAnonymous="false">
			<forward code="success" page="/sales/opportunity/select_destinitaire.jsp"/>
		</action>
		<action path="select_entper_destinitaire_list" class="com.edeal.frontline.controller.actions.OppDestSelectListAction"
			 allowAnonymous="false">
			<forward code="success" page="/common/list/listAjax.jsp"/>
		</action>
		<action path="select_entry" class="com.edeal.frontline.controller.actions.ForwardAction"
			 allowAnonymous="false">
			<forward code="success" page="/sales/opportunity/select_entry.jsp"/>
		</action>
		<action path="select_entry_list" class="com.edeal.frontline.controller.actions.SelectEntryListAction"
			 allowAnonymous="false" loginPage="/login_ajax.jsp">
			<forward code="success" page="/common/list/listAjax.jsp"/>
		</action>
		<action path="select_entry_valid" class="com.edeal.frontline.controller.actions.SelectEntryValidAction"
			 allowAnonymous="false" loginPage="/login_ajax.jsp">
			<forward code="success" page="/sales/opportunity/transfert.jsp"/>
		</action>
		<action path="list_custom_oppint_ajax" class="com.edeal.frontline.controller.actions.custom.InteractionListAction"
			 allowAnonymous="false" loginPage="/login_ajax.jsp">
			<param name="gridName" value="OppInt"/>
			<param name="type" value="opportunity"/>
			<param name="embedded" value="true"/>
			<param name="executeQuery" value="true"/>
			<forward code="success" page="/common/list/listAjax.jsp"/>
		</action>
		<action path="competitor_opps_ajax" class="com.edeal.frontline.controller.actions.CompetitorOppsListAction"
			 allowAnonymous="false" loginPage="/login_ajax.jsp">
			<forward code="success" page="/common/list/blank_ajax.jsp"/>
		</action>
		<action path="list_custom_CompOpp_ajax" class="com.edeal.frontline.controller.actions.custom.CompetitorOppsListAction"
			 allowAnonymous="false" loginPage="/login_ajax.jsp">
			<param name="gridName" value="CompOpp"/>
			<param name="type" value="opportunity"/>
			<param name="embedded" value="true"/>
			<param name="executeQuery" value="true"/>
			<forward code="success" page="/common/list/listAjax.jsp"/>
		</action>
		<action path="test_read" class="com.edeal.frontline.controller.actions.LoadAction" allowAnonymous="false">
			<param name="type" value="Opportunity"/>
			<redirect code="success" page="/read_opportunity.fl?id=null"/>
		</action>
		<action path="read_productopportunity" class="com.edeal.frontline.controller.actions.LoadAction"
			 allowAnonymous="false">
			<param name="type" value="ProductOpportunity"/>
			<subaction class="com.edeal.frontline.controller.actions.LoadOpportunity">
				<param name="from" value="ProductOpportunity"/>
				<result code="success" continue="true"/>
			</subaction>
			<!-- initializer class="com.edeal.frontline.initializers.OpportunityReadInitializer" id="Opportunity" scope="request"></initializer -->
			<subaction class="com.edeal.frontline.controller.actions.custom.InteractionListAction">
				<param name="gridName" value="OppInt"/>
				<param name="type" value="opportunity"/>
				<param name="executeQuery" value="false"/>
				<param name="embedded" value="true"/>
				<result code="success" continue="true"/>
			</subaction>
			<subaction class="com.edeal.frontline.controller.actions.CompetitorListAction">
				<result code="success" continue="true"/>
			</subaction>
			<display code="success" action="/sales/opportunity/read_action.jsp" body="/sales/opportunity/read.jsp"
				 jsInclude="/js/checkFields.jsp,/js/format_tel.jsp"/>
		</action>
		<!-- Traitement en masse -->	
		<action path="envoyer_opportunity_courrier" class="com.edeal.frontline.controller.actions.custom.Envoyer_Courrier_MassAction" allowAnonymous="false">
			<redirect code="success" page="/download"/>
		</action>
		
		<action path="valider_impression_etiquettes" class="com.edeal.frontline.controller.actions.custom.ValiderImpressionEtiquettes_MassAction" allowAnonymous="false">
			<forward code="success" page="/list_criteria.fl?lc=COMMSEXP"/>
		</action>
		
		<action path="imprimer_etiquettes" class="com.edeal.frontline.controller.actions.custom.ImprimerEtiquettes_MassAction" allowAnonymous="false">
			<redirect code="success" page="/download"/>
		</action>
		
		<action path="envoyer_opportunity_courrier_unitaire" class="com.edeal.frontline.controller.actions.custom.Envoyer_CourrierAction"
			 allowAnonymous="false">
			<redirect code="success" page="/download"/>
		</action>
		
		<action path="fusion_document_opportunity" class="com.edeal.frontline.controller.actions.ForwardAction">
			<forward code="success" page="/marketing/document/pop_up_opportunity.jsp"/>
		</action>
		
		<action path="fusion_document_opportunity_echeancier" class="com.edeal.frontline.controller.actions.custom.Impression_DevisEcheancierAction">
			<param name="type" value="Opportunity"/>
			<redirect code="success" page="/download"/>
		</action>
		
		<action path="fusion_document_opportunity_etiq" class="com.edeal.frontline.controller.actions.ForwardAction">
			<forward code="success" page="/marketing/document/pop_up_etiquete.jsp"/>
		</action>
		
		<!-- Ignore these changes 
		<action path="envoyer_opportunity_mail" class="com.edeal.frontline.controller.actions.custom.Envoyer_Mail_MassAction" allowAnonymous="false">
			<redirect keepAttr="softwareOnly" code="success" page="/list_criteria.fl?lc=OPPFACTURE"/>
			<forward code="failure" page="/errors/failure_report_ajax.jsp" />
		</action>
		-->
		<action path="envoyer_opportunity_mail" class="com.edeal.frontline.controller.actions.custom.Envoyer_Mail_MassAction" allowAnonymous="false">
			<redirect keepAttr="softwareOnly" code="success" page="/list_criteria.fl?lc=OPPS"/>
			<forward code="failure" page="/errors/failure_report_ajax.jsp" />
		</action>
		
		<action path="export_sage_Opps" class="com.edeal.frontline.controller.export.actions.SageExportAction" allowAnonymous="true">
			<!-- <redirect keepAttr="softwareOnly" code="success" page="/list_criteria.fl?lc=FACTSAGE"/>  -->
			<redirect code="success" page="/download"/>
			<display code="failure" action="/navigation/user_choice_action.jsp" body="/errors/failure_Sage_Export_.jsp"/>
		</action>
		<!--
		
		<action path="export_mass_SAGE" class="com.edeal.frontline.controller.actions.custom.ExportMass_Opps_Action" allowAnonymous="true">
			<redirect code="success" page="/export_sage_Opps.fl?typeExport=VEN"/>
		</action>
		-->
		
		<action path="export_mass_SAGE" class="com.edeal.frontline.controller.export.actions.SageExportAction" allowAnonymous="true">
			<redirect code="success" page="/download"/>
			<display code="failure" action="/navigation/user_choice_action.jsp" body="/errors/failure_Sage_Export_.jsp"/>
		</action>
		
		<action path="envoyer_opportunity_staci_mail" class="com.edeal.frontline.controller.actions.custom.Envoyer_MailSTACIMassAction" allowAnonymous="false">
			<redirect keepAttr="softwareOnly" code="success" page="/list_criteria.fl?lc=CMDSTACI"/>
			<forward code="failure" page="/errors/failure_report_ajax.jsp" />
		</action>
		
		<action path="addfile_opportunity" class="com.edeal.frontline.controller.actions.LoadAction">
			<param name="type" value="Opportunity" />
			<forward code="success" page="/sales/opportunity/addfile.jsp"/>
		</action>
		
	</actions>
</mapping>