<%/******************************************************************************
 * 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.Utils" %>
<%@ page import="com.edeal.frontline.DataDictionary" %>
<%@ page import="com.edeal.frontline.FieldNotInitializedException" %>
<%@page import="com.edeal.frontline.FrontlineException"%>
<%@ page import="com.edeal.frontline.EnterpriseBean"%>
<%@ page import="com.edeal.frontline.PersonBean"%>
<%@ page import="com.edeal.frontline.custom.Reservation_Bean"%>
<%@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 = "";
	try {
		String rs_Contact = Reservation_.getRs_Contact();
		PersonBean contact = new PersonBean(rs_Contact,context);
		perMail = contact.getPerMail();
		perPhone = contact.getPerPhone();
	} catch (FieldNotInitializedException fnie) {		
	}catch (FrontlineException fe) {
		
	}
%>

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

	
</script>

<fl:bigTabs objectTitle="<%=Utils.getMessage(session, \"LF012\", \"Réservation\") %>" ou="<%= \"edit_reservation_.fl\" + (id != null ? \"?id=\" + id : \"\")%>" >
    <table class="container" cellpadding="0">
		<tr>
			<td colspan="5" width="100%">
				<table>
					<tr>					
						<td style="width: 100%" class="titreFiche">
							<fl:getMessage code="FF069" alt="No de réservation"/><%= Reservation_.getRs_ResaNo() %>
						</td>
					</tr>
				</table>
			</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>
					<fl:fieldRead property="Rs_Contact" bean="true" href="true" disp="<%= flRequest.computeURL(\"/read_person.fl\") %>"/>
					<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="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="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"/>
					<fl:fieldRead property="Rs_ResaMontant" format="money" postText=" EUR"/>
					<fl:fieldRead property="Rs_Monnaie"/>
					<fl:fieldRead property="Rs_BgDate"/>
					<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"/>
					<fl:fieldRead property="Rs_CardFidelity"/>
				</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;">&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="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"/>
					<fl:fieldRead property="Rs_PartenaireID"/>
					<fl:fieldRead property="Rs_LoginType"/>
					<fl:fieldRead property="Rs_Achat"/>
					<fl:fieldRead property="Rs_Vente"/>
					<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_TauxCmsPartner"/>
					<fl:fieldRead property="Rs_PartnerBilName"/>
					<fl:fieldRead property="Rs_HotelRgltNum"/>
					<fl:fieldRead property="Rs_BilTauxCmsHotel"/>
					<fl:fieldRead property="Rs_MontantCmsTTC"/>
				</table>
			</td>
		</tr>
		<tr class="ligne_separation"><td></td></tr>
	</table>
		<%-- NOTES --%>
	<table width="100%" cellpadding="0" class="container">
		<tbody>
			<tr class="ligne_separation">
				<td colspan="2">&nbsp;</td>
			</tr>
			<tr class="ligne_separation">
				<td colspan="2">&nbsp;</td>
			</tr>
			<tr valign="top">
				<td class="titrePartie titreTexte"><fl:label code="F2024" label="Notes"/></td>
				<td></td>
			</tr>
			<tr>		
				<td colspan="2" class="dataValue noPaddingLeft">
					<fl:getProperty name="Marque_" property="Ma_Comm" alt=""/>
				</td>	
			</tr>
			<tr class="ligne_separation">
				<td colspan="2"></td>
			</tr>
			<tr class="ligne_separation_couleur">
				<td colspan="2"></td>
			</tr>
			<tr class="ligne_separation">
				<td colspan="2"></td>
			</tr>
		</tbody>
	</table>
	<fl:smallTabs name="Att_Tabs">
		<fl:sTab id="ATTACHMENT" title="<%= Utils.getMessage(session, \"L201C\", \"Documents joints\") %>">
				<fl:attach name="Reservation_" colID="Rs_AttID" edit="false" />
		</fl:sTab>
	</fl:smallTabs>
</fl:bigTabs>
