<%@ page language="java" session="true" buffer="12kb" contentType="text/html;charset=ISO-8859-2" %>
<%@ page pageEncoding="UTF-8"%>
<%@ page import="com.etixpert.evolution.gui.servlets.*"%>
<%@ page import="java.util.*"%>
<%@ page import="java.net.*"%>
<%@ page import="com.etixpert.evolution.gui.servlets.*"%>
<%@ page import="com.etixpert.evolution.*"%>
<%@ page import="java.sql.*"%>
<%@ include file="header.jsp" %>
<%@ include file="check.jsp" %>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<link href="css/evolution.css" rel="stylesheet" type="text/css">
</head>
<html>  
 <body>
<%
	String jsp = "order_detail_static.jsp";
%>

<center><h1><fmt:message key="ORDER_STATIC_HEADER"/></h1></center>
<form name=new_order action="process/order_detail.jsp" method="post">	
		<input type="hidden" name="link" value="process/order_detail.jsp"/>
    	<input type="hidden" name="saveState"/>
    	<input type="hidden" name="pageAction"/>
    	<input type="hidden" name="pos"/>
	
	<label for="order_id"><fmt:message key="ORDER_NR2"/>:</label>
	<%=OrderHelper.getVal(session, jsp, "id")%><br>
	<label for="ordered_by"><fmt:message key="ROOT_ID"/>:</label>
	<%=OrderHelper.getVal(session, jsp, "ordered_by")%><br>

	<label for="distr_type"><fmt:message key="DISTRIBUTOR_TYPE"/>:</label>
	<%=OrderHelper.getVal(session, jsp, "distr_type")%><br>
	
	<label for="sponsor"><fmt:message key="SPONSOR"/>:</label>
	<%=OrderHelper.getVal(session, jsp, "sponsor")%><br>
	
	<label for="tel"><fmt:message key="TEL"/>:</label>
	<%=OrderHelper.getVal(session, jsp, "tel")%><br>

	<label for="delivery_title"><fmt:message key="DELIVERY_LEVEL_ADDRESS"/>:</label>
	<%=OrderHelper.getVal(session, jsp, "delivery_title")%><br>

	<label for="delivery_name"><fmt:message key="DELIVERY_NAME"/>:</label>
	<%=OrderHelper.getVal(session, jsp, "delivery_name")%><br>

	<label for="delivery_country_id"><fmt:message key="DELIVERY_ADDRESS"/>:</label>
	<%
		String del_country_id = OrderHelper.getVal(session, jsp, "delivery_country_id");
		String del_postcode = OrderHelper.getVal(session, jsp, "delivery_postcode");
		String del_city = OrderHelper.getVal(session, jsp, "delivery_city");
		String del_street = OrderHelper.getVal(session, jsp, "delivery_street");
		
		String del_focus = "";
		String del_city_focus = "";
		String del_street_focus = "";
		String del_country_focus = "";
		
		if (del_country_id.equals("") || del_country_id.equals("<Land>")) {
			del_country_focus = "this.value=''";
			del_country_id = "<Land>";
		}		
		if (del_postcode.equals("") || del_postcode.equals("<PLZ>")) {
			del_focus = "this.value=''";
			del_postcode = "<PLZ>";
		}
		if (del_city.equals("") || del_city.equals("<Ort>")) {
			del_city_focus = "this.value=''";
			del_city = "<Ort>";
		}
		if (del_street.equals("") || del_street.equals("<Strasse>")) {
			del_street_focus = "this.value=''";
			del_street = "<Strasse>";
		}
	%>
	<%=del_country_id%>-<%=del_postcode%>, <%=del_city%>, <%=del_street%>
	<br>
	<label for="billing_title"><fmt:message key="BILLING_LEVEL_ADDRESS"/>:</label>
	<%=OrderHelper.getVal(session, jsp, "billing_title")%><br>
	
	<label for="billing_name"><fmt:message key="BILLING_NAME"/>:</label>
	<% 
		String company = OrderHelper.getVal(session, jsp, "company");
		String billingName = OrderHelper.getVal(session, jsp, "billing_name");
		if (company!=null && !"".equals(company))
			billingName = company;
	%>
	<%=billingName%>
	<br>
	<label for="billing_country_id"><fmt:message key="BILLING_ADDRESS"/>:</label>
	<%
		String bill_country_id = OrderHelper.getVal(session, jsp, "billing_country_id");
		String bill_postcode = OrderHelper.getVal(session, jsp, "billing_postcode");
		String bill_city = OrderHelper.getVal(session, jsp, "billing_city");
		String bill_street = OrderHelper.getVal(session, jsp, "billing_street");
		
		String bill_focus = "";
		String bill_city_focus = "";
		String bill_street_focus = "";
		
		if (bill_postcode.equals("") || bill_postcode.equals("PLZ")) {
			bill_postcode = "<PLZ>";
		}
		if (bill_city.equals("") || bill_city.equals("<Ort>")) {
			bill_city = "<Ort>";
		}
		if (bill_street.equals("") || bill_street.equals("<Strasse>")) {
			bill_street = "<Strasse>";
		}
		
	%>
	<%=bill_country_id+"-"+bill_postcode+", "+bill_city+", "+bill_street%><br>
			
	<label for="pay_method_id"><fmt:message key="PAYMENT_METHOD"/>:</label>
	<%=OrderHelper.getPaymentOption(pageContext, jsp)%>
	<br>
	
	<label for="shipping_descr"><fmt:message key="SHIPPING_TYPE"/>:</label>
		<%=OrderHelper.getShippingOption(pageContext, jsp)%>
	<br>
	
	<label for="comment"><fmt:message key="COMMENT"/>:</label>
	<textarea name="comment" rows="3" class="large" readonly><%=OrderHelper.getVal(session, jsp, "comment")%></textarea>
	<br>
	<br>
	<%=com.etixpert.evolution.gui.servlets.OrderHelper.generateOrderUpperTotalRow(pageContext, "order_details_static")%>	
	<%=com.etixpert.evolution.gui.servlets.OrderHelper.generateOrderDetailsHeader(pageContext, "order_details_static")	%>
	<%=com.etixpert.evolution.gui.servlets.OrderHelper.generateStaticOrderDetailsRows(session, "order_details_static")%>	
	<%=com.etixpert.evolution.gui.servlets.OrderHelper.generateOrderTotalRow(pageContext, "order_details_static")%>	
	<br>
</form>
<body>
<html>