<%@ page language="java" contentType="text/html; charset=UTF-8"		%>
<%@ taglib uri="/WEB-INF/struts-bean.tld"		prefix="bean"		%>
<%@ taglib uri="/WEB-INF/struts-html.tld"		prefix="html"		%>
<%@ taglib uri="/WEB-INF/displaytag-12.tld"		prefix="display"	%>
<%@ taglib uri="/WEB-INF/struts-logic.tld"		prefix="logic" 		%>
<jsp:include page="/ampiere/jsp/common/includeYAHOOUI.jsp" flush="true" /> 
<html>
<head>
	<title><bean:write name="GenerateInvoiceFromOrderForm" property="pageTitle"/></title>
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/ampiere/css/import.css" />
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/ampiere/css/window.css"/>
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/ampiere/css/displaytag.css" />
	<script type="text/javascript" src="${pageContext.request.contextPath}/ampiere/js/window.js"></script>
	<script type="text/javascript">
		top.document.title='<bean:write name="GenerateInvoiceFromOrderForm" property="mainWindowTitle"/>';
	</script>
</head>

<body id="main" onload="" onunload="closeMyChildren();">

<html:form	style	= "margin:0;"
			target	= "_self"
			action	= "/ampiere/GenerateInvoiceFromOrderAction.do"
			enctype	= "application/x-www-form-urlencoded"
			method	= "POST"
			onsubmit="document.getElementById('progressMsg').style.display='block'">

<html:hidden name="GenerateInvoiceFromOrderForm" property="businessPartnerId"/>
<html:hidden name="GenerateInvoiceFromOrderForm" property="changedColumn"/>
<input type="hidden" name="PCommand" value="MenuOnOff">
<input	id="C_BPartner_IDD"
		value=""
		name="C_BPartner_IDD"
		type="hidden"
		onchange="document.GenerateInvoiceFromOrderForm.businessPartnerId.value=document.GenerateInvoiceFromOrderForm.C_BPartner_IDD.value;
				  document.GenerateInvoiceFromOrderForm.businessPartnerName.value=document.GenerateInvoiceFromOrderForm.C_BPartner_IDF.value;
				  document.GenerateInvoiceFromOrderForm.changedColumn.value='businessPartnerId';
			      document.GenerateInvoiceFromOrderForm.submit();
				 "
		/>
<input id="C_BPartner_IDF" value="" name="C_BPartner_IDF" type="hidden"/>


	<table cellspacing="0" width="100%" border="0" cellpadding="0">
	<tr>
	<td>
<div id="header">
			<h1><bean:write name="GenerateInvoiceFromOrderForm" property="pageTitle"/></h1>
</div>
	</td>
	    <td valign="top" width="18">
	    	<div id="progressMsg" style="padding-top:1px;display:none;">
				<html:img alt="Wait a moment..." align="right" page = "/ampiere/images/Loading-0.gif"/>
	    	</div>
	    </td>
    </tr>
    <tr>
		<td><img	src="/compiere/ampiere/images/MenuOnOff24.gif"
					onmouseout="btnMouseOut('MenuOnOff');"
					class="imgButton"
					id="MenuOnOff"
					name="MenuOnOff"
					onclick="document.GenerateInvoiceFromOrderForm.PCommand.value='MenuOnOff';menuSwitch();"
					alt="MenuOnOff"
					onmouseover="btnMouseOver('MenuOnOff');"/>
		</td>
    </tr>
	</table>


<!-- body -->
<div id="body" >
    <table class="popupInfoTable">
    <tr>
    	<td>&nbsp;</td>
    </tr>
    <tr>
    	<td align="center">
		    <table class="windowTable" align="left">
		    <tr>
			    <td align="right" valign="middle">
			    	<bean:write name='GenerateInvoiceFromOrderForm' property='organizationLabel'/>
			    </td>
			    <td align="left" valign="middle">
			    	<html:select property="organizationId"
			    				 onchange="document.GenerateInvoiceFromOrderForm.changedColumn.value=this.name;
			    				 		   document.GenerateInvoiceFromOrderForm.submit();
			    				 		   ">
			    		<html:optionsCollection	name="GenerateInvoiceFromOrderForm"
			    								property="organizationList"
			    								value="key"
			    								label="value"/>
			    	</html:select>
			    </td>
			    <td align="right" valign="middle" nowrap>
			    	<bean:write name='GenerateInvoiceFromOrderForm' property='businessPartnerLabel'/>
			    </td>
			    <td align="left" valign="middle">
			    	<html:text	name="GenerateInvoiceFromOrderForm"
			    				property="businessPartnerName"
			    				size="20"
								onchange="if ( this.value == '' ) {;
				    				 		  document.GenerateInvoiceFromOrderForm.businessPartnerId.value=0;
				    				 		  document.GenerateInvoiceFromOrderForm.changedColumn.value='businessPartnerId';
			    				 		  } else {
				    				 		  document.GenerateInvoiceFromOrderForm.changedColumn.value=this.name;
				    				 	  }
			    				 		  document.GenerateInvoiceFromOrderForm.submit();
			    				 		 "
			    				/>
			    </td>
			    <td align="left" valign="middle">
					<html:img	align="left"
								page = "/ampiere/images/BPartner16.png"
								onclick="startLookup('C_BPartner_ID',0,501,'C_BPartner_ID', 'N',null);
										 return false;
										"
								/>
			    </td>
		    </tr>
		    </table>
		</td>
		<td>&nbsp;</td>
    </tr>
    <tr>
    	<td align="center">
		    <table align="center" cellspacing="0" class="displaytag" border="0">
			<logic:iterate	name="GenerateInvoiceFromOrderForm"
							id="data"
							property="orderList"
							scope="request"
							type="java.util.HashMap">
				<logic:equal name="data" property="RowType" value="title">
				<tr>
					<th>&nbsp;</th>
					<th><bean:write name="data" property="AD_Org_ID"/></th>
					<th><bean:write name="data" property="C_DocType_ID"/></th>
					<th><bean:write name="data" property="DocumentNo"/></th>
					<th><bean:write name="data" property="C_BPartner_ID"/></th>
					<th><bean:write name="data" property="DateOrdered"/></th>
					<th><bean:write name="data" property="TotalLines"/></th>
				</tr>
				</logic:equal>
				<logic:equal name="data" property="RowType" value="even">
				<tr class="even">
					<td>
						<html:multibox	name="GenerateInvoiceFromOrderForm" property="orderIdList">
							<bean:write name="data" property="C_Order_ID"/>
						</html:multibox>
					</td>
					<td><bean:write name="data" property="AD_Org_ID"/></td>
					<td><bean:write name="data" property="C_DocType_ID"/></td>
					<td><bean:write name="data" property="DocumentNo"/></td>
					<td><bean:write name="data" property="C_BPartner_ID"/></td>
					<td><bean:write name="data" property="DateOrdered"/></td>
					<td><bean:write name="data" property="TotalLines"/></td>
				</tr>
				</logic:equal>
				<logic:equal name="data" property="RowType" value="odd">
				<tr class="odd">
					<td>
						<html:multibox	name="GenerateInvoiceFromOrderForm" property="orderIdList">
							<bean:write name="data" property="C_Order_ID"/>
						</html:multibox>
					</td>
					<td><bean:write name="data" property="AD_Org_ID"/></td>
					<td><bean:write name="data" property="C_DocType_ID"/></td>
					<td><bean:write name="data" property="DocumentNo"/></td>
					<td><bean:write name="data" property="C_BPartner_ID"/></td>
					<td><bean:write name="data" property="DateOrdered"/></td>
					<td><bean:write name="data" property="TotalLines"/></td>
				</tr>
				</logic:equal>
			</logic:iterate>
			</table>
    	</td>
		<td>&nbsp;</td>
    </tr>
    <tr>
		<td align="center">
		    <table class="windowTable" width="100%">
		    <tr>
			    <td align="left" valign="left">
			    	<bean:write name='GenerateInvoiceFromOrderForm' property='generateSelectMessage'/>
			    </td>
			    <td class="lbl" style="padding-right:5px;">

					<input	id="ok"
							type="image"
							src="${pageContext.request.contextPath}/ampiere/images/Ok32.png"
							onclick="doCreateFrom(this);return false;"
							alt="<bean:write name='GenerateInvoiceFromOrderForm' property='generateButtonLabel'/>"
							/>
					<span>OK</span>	

					<input	id="cancel"
							type="image"
							src="${pageContext.request.contextPath}/ampiere/images/Cancel32.png"
							onclick="window.close();return false;"
							alt="<bean:write name='GenerateInvoiceFromOrderForm' property='cancelButtonLabel'/>"
							/>
					<span>キャンセル</span>
			    </td>
			</tr>
			</table>
		</td>
    </tr>
    </table>
</td>
</tr>
</table>
</div>
<!-- /body -->

</html:form>

</body>
</html>
