<%/******************************************************************************
 * Copyright (c) 2000-2005 e-Deal
 *
 * e-Deal S.A.
 * 55 rue Brillat Savarin
 * 75013 Paris
 * France
 *
 * T: +33 (0)1 53 80 80 30
 * F: +33 (0)1 73 01 69 77
 * http://www.e-deal.com
 * 
 * La diffusion de ce code source sous quelque forme que ce soit sans
 * l'autorisation de E-DEAL est interdite.
 *
 * Vous êtes autorisés à modifier ce code source uniquement pour votre usage
 * propre et sous réserve que les mentions de copyright demeurent intactes.
 *
 * Ce code est fourni en l'état. Aucune garantie d'aucune sorte, explicite ou
 * implicite n'est donnée. En aucun cas E-DEAL ne pourra être tenu pour
 * responsable des dommages pouvant résulter de l'utilisation de ce code
 * source.
 ******************************************************************************/
%>
<%@page session="true"%>
<%@ page import="com.edeal.frontline.navigation.FlRequest" %>
<%@ page import="com.edeal.frontline.FlContext" %>
<%@ page import="com.edeal.frontline.DataDictionary" %>
<%@ page import="com.edeal.frontline.Utils" %>
<%@ page import="com.edeal.frontline.FieldNotInitializedException" %>
<%@ page import="com.edeal.frontline.custom.Reservation_Bean"%>
<%@ page import="com.edeal.frontline.EnterpriseBean"%>
<%@ page import="com.edeal.frontline.PersonBean"%>
<%@page import="com.edeal.frontline.FrontlineException"%>
<%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %>
<jsp:useBean class="com.edeal.frontline.custom.Reservation_Bean" id="Reservation_" scope="request"/>
<link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/common_css.jsp">

<%
	final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass());
	FlRequest flRequest = new FlRequest(request);
	FlContext context = flRequest.getContext();
	DataDictionary dico = context.getDataDictionary();
	String id = null;
	

	try {
	    id = Reservation_.getID();
	} catch (FieldNotInitializedException fnie) {}
	
	String rs_HotelID = null;
	String IDhotel = null;
	try {
		rs_HotelID = Reservation_.getRs_HotelID();
		EnterpriseBean tiers = new EnterpriseBean(rs_HotelID,context);
		IDhotel = (String)tiers.getCustomProperty("EntHotelID_");
	} catch (FieldNotInitializedException fnie) {
		
	}catch (FrontlineException fe) {
		
	}
	
	String perMail = "";
	String perPhone = "";
 	String perReservIT_ = "";
	try {
		String rs_Contact = Reservation_.getRs_Contact();
		PersonBean contact = new PersonBean(rs_Contact,context);
		perMail = contact.getPerMail();
		perPhone = contact.getPerPhone();
		perReservIT_ = (String)contact.getCustomProperty("PerReservIT_");
	} catch (FieldNotInitializedException fnie) {
		
	}catch (FrontlineException fe) {
		
	}
	
%>

<script type="text/javascript" language="javascript">

	
</script>

<fl:bigTabs objectTitle="<%=Utils.getMessage(session, \"LF012\", false, true, \"Réservation\") %>" ou="<%= \"read_reservation_.fl\" + (id != null ? \"?id=\" + id : \"\")%>" >
    <table class="container" cellpadding="0">
		<tr>
			<td colspan="5" width="100%" class="titreFiche">
				<fl:getMessage code="FF09C" alt="Réservation N°"/><fl:getProperty name="Reservation_" property="Rs_ResaNo" alt="" preText="&nbsp;"/>
			</td>
		</tr>
    
		<tr class="ligne_separation"><td></td></tr>
		<tr>
			<td class="column2">
				<table class="container">
					<fl:fieldRead property="Rs_HotelID" bean="true" href="true" disp="<%= flRequest.computeURL(\"/read_enterprise.fl\") %>"/>
					<tr class="fieldline">
						<td id="RsIDHotel_label" class="dataLabel"><fl:label code="FF008" label="Hôtel ID"/></td>
						<td id="RsIDHotel_value" class="dataValue"><%= Utils.formatToWeb(IDhotel, true)  %></td>
					</tr>
					<tr class="fieldline">
						<td id="detail_label" class="dataLabel"><span style="font-weight: bold; color:#0000;">&nbsp;</span></td>
						<td id="detail_value" class="dataValue">&nbsp;</td>
					</tr>
					<tr class="fieldline">
						<td id="Client_label" class="dataLabel"><span style="font-weight: bold; color:#0000;"><fl:getMessage code="FF0A9" alt="Client"/></span></td>
						<td id="Client_value" class="dataValue">&nbsp;</td>
					</tr>
					<tr class="fieldline">
						<td id="contact_label" class="dataLabel"><fl:getMessage code="FF0BC" alt="Id ReservIT"/></td>
						<td id="contact_value" class="dataValue"><%= Utils.formatToWeb(perReservIT_, true)  %></td>
					</tr>
					<fl:fieldRead property="Rs_Contact" bean="true" href="true" disp="<%= flRequest.computeURL(\"/read_person.fl\") %>"/>
					
					<tr class="fieldline">
						<td id="phone_label" class="dataLabel"><fl:getMessage code="FF0AC" alt="Téléphone principal"/></td>
						<td id="phone_value" class="dataValue"><%= Utils.formatToWeb(perPhone, true)  %></td>
					</tr>
					<tr class="fieldline">
						<td id="contact_label" class="dataLabel"><fl:getMessage code="FF0AB" alt="Mail principal"/></td>
						<td id="contact_value" class="dataValue"><%= Utils.formatToWeb(perMail, true)  %></td>
					</tr>
					<tr class="fieldline">
						<td id="detail_label" class="dataLabel"><span style="font-weight: bold; color:#0000;">&nbsp;</span></td>
						<td id="detail_value" class="dataValue">&nbsp;</td>
					</tr>
					<tr class="fieldline">
						<td id="detail_label" class="dataLabel"><span style="font-weight: bold; color:#0000;"><fl:getMessage code="FF0AD" alt="Détails Réservation"/></span></td>
						<td id="detail_value" class="dataValue">&nbsp;</td>
					</tr>
					<fl:fieldRead property="Rs_ResaStatus"/>
					<fl:fieldRead property="Rs_BillingStatus"/>
					<fl:fieldRead property="Rs_ReplacedBy" bean="true" href="true" disp="<%= flRequest.computeURL(\"/read_reservation_.fl\") %>"/>
					<fl:fieldRead property="Rs_ResaMontant" format="money" postText=" EUR"/>
					<fl:fieldRead property="Rs_Currency1"/>
					<fl:fieldRead property="Rs_CrDt" format="dd/MM/yyyy"/>
					<fl:fieldRead property="Rs_BgDate" format="dd/MM/yyyy"/>
					<fl:fieldRead property="Rs_TotalClients"/>
					<fl:fieldRead property="Rs_nuiteroom"/>
					<fl:fieldRead property="Rs_nuiteclient"/>
					<fl:fieldRead property="Rs_TotalRoom"/>
					<fl:fieldRead property="Rs_CatName"/>
					<fl:fieldRead property="Rs_TypRoomName"/>
					<fl:fieldRead property="Rs_WithOption"/>
					<tr class="fieldline">
						<td id="detail_label" class="dataLabel"><span style="font-weight: bold; color:#0000;">&nbsp;</span></td>
						<td id="detail_value" class="dataValue">&nbsp;</td>
					</tr>
					<tr class="fieldline">
						<td id="detail_label" class="dataLabel"><span style="font-weight: bold; color:#0000;"><fl:getMessage code="FF0B0" alt="Détails Client"/></span></td>
						<td id="detail_value" class="dataValue">&nbsp;</td>
					</tr>
					<fl:fieldRead property="Rs_SeniorNumber"/>
					<fl:fieldRead property="Rs_AdultNumber"/>
					<fl:fieldRead property="Rs_AdoNumber"/>
					<fl:fieldRead property="Rs_ChildrenNber"/>
					<fl:fieldRead property="Rs_BabyNber"/>
					<fl:fieldRead property="Rs_AdherentNum"/>
					<tr class="fieldline">
						<td id="detail_label" class="dataLabel"><span style="font-weight: bold; color:#0000;">&nbsp;</span></td>
						<td id="detail_value" class="dataValue">&nbsp;</td>
					</tr>
					<tr class="fieldline">
						<td id="detail_label" class="dataLabel"><span style="font-weight: bold; color:#0000;"><fl:getMessage code="FF0AF" alt="Fidélisation"/></span></td>
						<td id="detail_value" class="dataValue">&nbsp;</td>
					</tr>
					<fl:fieldRead property="Rs_FidelityPg"/>
					
				</table>
			</td>
			<td class="separation"><div class="separation"></div></td>
			<td class="column2">
				<table class="container" cellpadding="0">
					<tr class="fieldline">
						<td id="detail_label" class="dataLabel"><span style="font-weight: bold; color:#0000;"><fl:getMessage code="FF0B3" alt="Informations Partenaire"/></span></td>
						<td id="detail_value" class="dataValue">&nbsp;</td>
					</tr>
					<fl:fieldRead property="Rs_Origine"/>
					<fl:fieldRead property="Rs_Type"/>
					<fl:fieldRead property="Rs_ProductID" bean="true" href="true" disp="<%= flRequest.computeURL(\"/read_product.fl\") %>"/>
					<fl:fieldRead property="Rs_PartenaireID" bean="true" href="true" disp="<%= flRequest.computeURL(\"/read_enterprise.fl\") %>"/>
					<fl:fieldRead property="Rs_LoginType"/>
					<fl:fieldRead property="Rs_Achat"/>
					<fl:fieldRead property="Rs_Vente"/>
					<fl:fieldRead property="Rs_Currency2"/>
					<fl:fieldRead property="Rs_Login"/>
					<fl:fieldRead property="Rs_ProvenanceCtrID" alt=""/>
					<fl:fieldRead property="Rs_ResaStock"/>
					<fl:fieldRead property="Rs_CusFourniName"/>
					<fl:fieldRead property="Rs_ArchiveResa"/>
					<tr class="fieldline">
						<td id="detail_label" class="dataLabel"><span style="font-weight: bold; color:#0000;">&nbsp;</span></td>
						<td id="detail_value" class="dataValue">&nbsp;</td>
					</tr>
					<tr class="fieldline">
						<td id="detail_label" class="dataLabel"><span style="font-weight: bold; color:#0000;"><fl:getMessage code="FF0B2" alt="Promotion"/></span></td>
						<td id="detail_value" class="dataValue">&nbsp;</td>
					</tr>
					<fl:fieldRead property="Rs_TarifSpeTyp"/>
					<fl:fieldRead property="Rs_TarifSpeName"/>
					<tr class="fieldline">
						<td id="detail_label" class="dataLabel"><span style="font-weight: bold; color:#0000;">&nbsp;</span></td>
						<td id="detail_value" class="dataValue">&nbsp;</td>
					</tr>
					<tr class="fieldline">
						<td id="detail_label" class="dataLabel"><span style="font-weight: bold; color:#0000;"><fl:getMessage code="FF0B1" alt="Détails Facturation"/></span></td>
						<td id="detail_value" class="dataValue">&nbsp;</td>
					</tr>
					<fl:fieldRead property="Rs_InHotelInvCmsNum"/>
					<fl:fieldRead property="Rs_PartnerBilName"/>
					<fl:fieldRead property="Rs_HotelRgltNum"/>
					<fl:fieldRead property="Rs_TauxCmsPartner"/>
					<fl:fieldRead property="Rs_BilTauxCmsHotel"/>
					<fl:fieldRead property="Rs_MontantCmsTTC"/>
					
					
					
					
					
				</table>
			</td>
		</tr>
		<tr class="ligne_separation"><td></td></tr>
	</table>
	<fl:notes name="Comments" title="<%= Utils.getMessage(session, \"L64B4\", \"Commentaires\") %>" nbPix="32"><fl:getProperty name="Reservation_" alt="" property="Rs_Comments"/></fl:notes>
	<fl:smallTabs name="Reservation__Tabs">
		<%-- Fichiers --%>
		<fl:sTab id="FATTACH" title="<%= Utils.getMessage(session, \"L201C\", \"Documents joints\") %>">
			<fl:attach name="Reservation_" colID="Rs_AttID" edit="false" listFobs="true" />
		</fl:sTab>
	</fl:smallTabs>
</fl:bigTabs>