<%/******************************************************************************
 * 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.FieldNotInitializedException" %>
<%@ page import="com.edeal.frontline.custom.CmdGiftCheque_Bean"%>
<%@ page import="com.edeal.frontline.Utils" %>
<%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %>
<jsp:useBean class="com.edeal.frontline.custom.CmdGiftCheque_Bean" id="CmdGiftCheque_" 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 = CmdGiftCheque_.getID();
	} catch (FieldNotInitializedException fnie) {}
	
	String correspondent = null;
	
	String cgcCustomerID = null;
	try {
		cgcCustomerID = CmdGiftCheque_.getCgcCustomer();
	} catch (FieldNotInitializedException fnie) {}
	
	
	
%>

<script type="text/javascript" language="javascript">
function refreshCCs() {
	_grid__GCH_EMB_js_.render();
}

function doOnLoad() {
	refreshCCs();
}

function doRefresh() {
	window.top.location.reload();	
}

</script>

<fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"FF0F2\", \"Commande Cheque Cadeau\") %>" listTitle="<%= Utils.getMessage(session, \"LF140\", \"Liste\") %>" ou="<%= \"read_cmdgiftcheque_.fl\" + (id != null ? \"?id=\" + id : \"\")%>">
       <table class="container" cellpadding="0">
		<tr>
			<td colspan="5" class="titreFiche">
				<fl:getProperty name="CmdGiftCheque_" property="CgcCmdNum" alt="" />
			</td>
		</tr>
		<tr class="ligne_separation"><td></td></tr>
		<tr>
			<td class="column2">
				<table class="data_column" cellpadding="0">
						<fl:fieldRead property="CgcReference"/>
						<fl:fieldRead property="CgcStatusID"/>
						<fl:fieldRead property="CgcAmount" postText="&nbsp;&euro;" format="money"/>
				</table>
			</td>
			<td class="separation"><div class="separation"></div></td>	
			<td class="column2" >
				<table class="data_column" cellpadding="0">
						<fl:fieldRead property="CgcPaymentModID"/>
						<fl:fieldRead property="CgcCmdCanal"/>
					 	<fl:fieldRead property="CgcCustomer" bean="true" href="true" disp="<%= flRequest.computeURL(\"/read_correspondent.fl\") %>"/>						
				</table>
			</td>
			
		</tr>
		<tr class="ligne_separation"><td></td></tr>
	</table>
	<fl:notes name="CgcComments" title="<%= Utils.getMessage(session, \"L64B4\", \"Commentaires\") %>" nbPix="32"><fl:getProperty name="CmdGiftCheque_" property="CgcComments" alt=""/></fl:notes>
	<fl:smallTabs name="CmdGiftCheque__Tabs">
		<fl:sTab id="CCs" title="<%=Utils.getMessage(session, \"LF095\", \"Chèques Cadeaux\") %>" onselect="refreshCCs();">
			<fl:grid name="GCH_EMB" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=GCH_EMB&GchCgcID=\" + id %>"/>
		</fl:sTab>
		<fl:sTab id="ATTACHMENT" title="<%= Utils.getMessage(session, \"L201C\", \"Documents joints\") %>" >
				<fl:attach name="CmdGiftCheque_" colID="CgcAttID" edit="false" listFobs="true"/>
		</fl:sTab>
	</fl:smallTabs>
</fl:bigTabs>
