git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1752920 13f79535-47bb-0310-9956-ffa450edef68
196 lines
9.1 KiB
Plaintext
196 lines
9.1 KiB
Plaintext
<#--
|
|
Licensed to the Apache Software Foundation (ASF) under one
|
|
or more contributor license agreements. See the NOTICE file
|
|
distributed with this work for additional information
|
|
regarding copyright ownership. The ASF licenses this file
|
|
to you under the Apache License, Version 2.0 (the
|
|
"License"); you may not use this file except in compliance
|
|
with the License. You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing,
|
|
software distributed under the License is distributed on an
|
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
KIND, either express or implied. See the License for the
|
|
specific language governing permissions and limitations
|
|
under the License.
|
|
-->
|
|
|
|
<#assign shoppingCartOrderType = "">
|
|
<#assign shoppingCartProductStore = "NA">
|
|
<#assign shoppingCartChannelType = "">
|
|
<#if shoppingCart??>
|
|
<#assign shoppingCartOrderType = shoppingCart.getOrderType()>
|
|
<#assign shoppingCartProductStore = shoppingCart.getProductStoreId()?default("NA")>
|
|
<#assign shoppingCartChannelType = shoppingCart.getChannelType()?default("")>
|
|
<#else>
|
|
<#-- allow the order type to be set in parameter, so only the appropriate section (Sales or Purchase Order) shows up -->
|
|
<#if parameters.orderTypeId?has_content>
|
|
<#assign shoppingCartOrderType = parameters.orderTypeId>
|
|
</#if>
|
|
</#if>
|
|
<!-- Sales Order Entry -->
|
|
<#if security.hasEntityPermission("ORDERMGR", "_CREATE", session)>
|
|
<#if shoppingCartOrderType != "PURCHASE_ORDER">
|
|
<div class="screenlet">
|
|
<div class="screenlet-title-bar">
|
|
<ul>
|
|
<li class="h3">${uiLabelMap.OrderSalesOrder}<#if shoppingCart??> ${uiLabelMap.OrderInProgress}</#if></li>
|
|
<li><a href="javascript:document.salesentryform.submit();">${uiLabelMap.CommonContinue}</a></li>
|
|
<li><a href="/partymgr/control/findparty?${StringUtil.wrapString(externalKeyParam)}">${uiLabelMap.PartyFindParty}</a></li>
|
|
</ul>
|
|
<br class="clear"/>
|
|
</div>
|
|
<div class="screenlet-body">
|
|
<form method="post" name="salesentryform" action="<@ofbizUrl>initorderentry</@ofbizUrl>">
|
|
<input type="hidden" name="originOrderId" value="${parameters.originOrderId!}"/>
|
|
<input type="hidden" name="finalizeMode" value="type"/>
|
|
<input type="hidden" name="orderMode" value="SALES_ORDER"/>
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
<tr>
|
|
<td > </td>
|
|
<td width="300" align='right' valign='middle' nowrap="nowrap"><div class='tableheadtext'>${uiLabelMap.ProductProductStore}</div></td>
|
|
<td > </td>
|
|
<td valign='middle'>
|
|
<div class='tabletext'>
|
|
<select name="productStoreId"<#if sessionAttributes.orderMode??> disabled</#if>>
|
|
<#assign currentStore = shoppingCartProductStore>
|
|
<#if defaultProductStore?has_content>
|
|
<option value="${defaultProductStore.productStoreId}">${defaultProductStore.storeName!}</option>
|
|
<option value="${defaultProductStore.productStoreId}">----</option>
|
|
</#if>
|
|
<#list productStores as productStore>
|
|
<option value="${productStore.productStoreId}"<#if productStore.productStoreId == currentStore> selected="selected"</#if>>${productStore.storeName!}</option>
|
|
</#list>
|
|
</select>
|
|
<#if sessionAttributes.orderMode??>${uiLabelMap.OrderCannotBeChanged}</#if>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr><td colspan="4"> </td></tr>
|
|
<tr>
|
|
<td> </td>
|
|
<td align='right' valign='middle' nowrap="nowrap"><div class='tableheadtext'>${uiLabelMap.OrderSalesChannel}</div></td>
|
|
<td> </td>
|
|
<td valign='middle'>
|
|
<div class='tabletext'>
|
|
<select name="salesChannelEnumId">
|
|
<#assign currentChannel = shoppingCartChannelType>
|
|
<#if defaultSalesChannel?has_content>
|
|
<option value="${defaultSalesChannel.enumId}">${defaultSalesChannel.description!}</option>
|
|
<option value="${defaultSalesChannel.enumId}"> ---- </option>
|
|
</#if>
|
|
<option value="">${uiLabelMap.OrderNoChannel}</option>
|
|
<#list salesChannels as salesChannel>
|
|
<option value="${salesChannel.enumId}" <#if (salesChannel.enumId == currentChannel)>selected="selected"</#if>>${salesChannel.get("description",locale)}</option>
|
|
</#list>
|
|
</select>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr><td colspan="4"> </td></tr>
|
|
<#if partyId??>
|
|
<#assign thisPartyId = partyId>
|
|
<#else>
|
|
<#assign thisPartyId = requestParameters.partyId!>
|
|
</#if>
|
|
<tr>
|
|
<td> </td>
|
|
<td align='right' valign='middle' nowrap="nowrap"><div class='tableheadtext'>${uiLabelMap.CommonUserLoginId}</div></td>
|
|
<td> </td>
|
|
<td valign='middle'>
|
|
<div class='tabletext'>
|
|
<@htmlTemplate.lookupField value="${parameters.userLogin.userLoginId}" formName="salesentryform" name="userLoginId" id="userLoginId_sales" fieldFormName="LookupUserLoginAndPartyDetails"/>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td> </td>
|
|
<td align='right' valign='middle' nowrap="nowrap"><div class='tableheadtext'>${uiLabelMap.OrderCustomer}</div></td>
|
|
<td> </td>
|
|
<td valign='middle'>
|
|
<div class='tabletext'>
|
|
<@htmlTemplate.lookupField value='${thisPartyId!}' formName="salesentryform" name="partyId" id="partyId" fieldFormName="LookupCustomerName"/>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</#if>
|
|
</#if>
|
|
<br />
|
|
<!-- Purchase Order Entry -->
|
|
<#if security.hasEntityPermission("ORDERMGR", "_PURCHASE_CREATE", session)>
|
|
<#if shoppingCartOrderType != "SALES_ORDER">
|
|
<div class="screenlet">
|
|
<div class="screenlet-title-bar">
|
|
<ul>
|
|
<li class="h3">${uiLabelMap.OrderPurchaseOrder}<#if shoppingCart??> ${uiLabelMap.OrderInProgress}</#if></li>
|
|
<li><a href="javascript:document.poentryform.submit();">${uiLabelMap.CommonContinue}</a></li>
|
|
<li><a href="/partymgr/control/findparty?${StringUtil.wrapString(externalKeyParam)}">${uiLabelMap.PartyFindParty}</a></li>
|
|
</ul>
|
|
<br class="clear"/>
|
|
</div>
|
|
<div class="screenlet-body">
|
|
<form method="post" name="poentryform" action="<@ofbizUrl>initorderentry</@ofbizUrl>">
|
|
<input type='hidden' name='finalizeMode' value='type'/>
|
|
<input type='hidden' name='orderMode' value='PURCHASE_ORDER'/>
|
|
<table width="100%" border='0' cellspacing='0' cellpadding='0'>
|
|
<#if partyId??>
|
|
<#assign thisPartyId = partyId>
|
|
<#else>
|
|
<#assign thisPartyId = requestParameters.partyId!>
|
|
</#if>
|
|
<tr>
|
|
<td> </td>
|
|
<td width="300" align='right' valign='middle' nowrap="nowrap"><div class='tableheadtext'>${uiLabelMap.OrderOrderEntryInternalOrganization}</div></td>
|
|
<td> </td>
|
|
<td valign='middle'>
|
|
<div class='tabletext'>
|
|
<select name="billToCustomerPartyId"<#if sessionAttributes.orderMode?default("") == "SALES_ORDER"> disabled</#if>>
|
|
<#list organizations as organization>
|
|
<#assign organizationName = Static["org.apache.ofbiz.party.party.PartyHelper"].getPartyName(organization, true)/>
|
|
<#if (organizationName.length() != 0)>
|
|
<option value="${organization.partyId}">${organization.partyId} - ${organizationName}</option>
|
|
</#if>
|
|
</#list>
|
|
</select>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr><td colspan="4"> </td></tr>
|
|
<tr>
|
|
<td> </td>
|
|
<td align='right' valign='middle' nowrap="nowrap"><div class='tableheadtext'>${uiLabelMap.CommonUserLoginId}</div></td>
|
|
<td> </td>
|
|
<td valign='middle'>
|
|
<div class='tabletext'>
|
|
<@htmlTemplate.lookupField value='${parameters.userLogin.userLoginId}'formName="poentryform" name="userLoginId" id="userLoginId_purchase" fieldFormName="LookupUserLoginAndPartyDetails"/>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td> </td>
|
|
<td align='right' valign='middle' nowrap="nowrap"><div class='tableheadtext'>${uiLabelMap.PartySupplier}</div></td>
|
|
<td> </td>
|
|
<td valign='middle'>
|
|
<div class='tabletext'>
|
|
<select name="supplierPartyId"<#if sessionAttributes.orderMode?default("") == "SALES_ORDER"> disabled</#if>>
|
|
<option value="">${uiLabelMap.OrderSelectSupplier}</option>
|
|
<#list suppliers as supplier>
|
|
<option value="${supplier.partyId}"<#if supplier.partyId == thisPartyId> selected="selected"</#if>>[${supplier.partyId}] - ${Static["org.apache.ofbiz.party.party.PartyHelper"].getPartyName(supplier, true)}</option>
|
|
</#list>
|
|
</select>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</#if>
|
|
</#if>
|