📄 orderitems.ftl
字号:
<#-- * Copyright (c) 2003-2005 The Open For Business Project - www.ofbiz.org * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * *@author Andy Zeneski (jaz@ofbiz.org) *@author Jean-Luc.Malet@nereide.biz (migration to uiLabelMap) *@version $Rev: 7349 $ *@since 2.2--><#if orderHeader?has_content><div class="screenlet"> <div class="screenlet-header"> <div style="float: right;"> <#if security.hasEntityPermission("ORDERMGR", "_UPDATE", session)> <#if orderHeader?has_content && orderHeader.statusId != "ORDER_CANCELLED" && orderHeader.statusId != "ORDER_COMPLETED"> <div class="tabletext"> <#-- <a href="<@ofbizUrl>cancelOrderItem?${paramString}</@ofbizUrl>" class="submenutext">${uiLabelMap.OrderCancelAllItems}</a> --> <a href="<@ofbizUrl>editOrderItems?${paramString}</@ofbizUrl>" class="submenutextright">${uiLabelMap.OrderEditItems}</a> </div> </#if> </#if> </div> <div class="boxhead"> ${uiLabelMap.OrderOrderItems}</div> </div> <div class="screenlet-body"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr align="left" valign=bottom> <td width="30%" align="left"><div class="tableheadtext">${uiLabelMap.ProductProduct}</div></td> <td width="30%" align="left"><div class="tableheadtext">${uiLabelMap.CommonStatus}</div></td> <td width="5%" align="center"><div class="tableheadtext">${uiLabelMap.OrderQuantity}</div></td> <td width="10%" align="right"><div class="tableheadtext">${uiLabelMap.OrderUnitList}</div></td> <td width="10%" align="right"><div class="tableheadtext">${uiLabelMap.OrderAdjustments}</div></td> <td width="10%" align="right"><div class="tableheadtext">${uiLabelMap.OrderSubTotal}</div></td> <td width="5%"> </td> </tr> <#if !orderItemList?has_content> <tr><td><font color="red">${uiLabelMap.checkhelper_sales_order_lines_lookup_failed}</font></td></tr> <#else> <#list orderItemList as orderItem> <#assign orderItemContentWrapper = Static["org.ofbiz.order.order.OrderContentWrapper"].makeOrderContentWrapper(orderItem, request)> <#assign orderItemShipGrpInvResList = orderReadHelper.getOrderItemShipGrpInvResList(orderItem)> <tr><td colspan="8"><hr class="sepbar"></td></tr> <tr> <#assign orderItemType = orderItem.getRelatedOne("OrderItemType")?if_exists> <#assign productId = orderItem.productId?if_exists> <#if productId?exists && productId == "shoppingcart.CommentLine"> <td colspan="1" valign="top"> <b><div class="tabletext"> >> ${orderItem.itemDescription}</div></b> </td> <#else> <td valign="top"> <div class="tabletext"> <#if productId?exists> ${orderItem.productId?default("N/A")} - ${orderItem.itemDescription?if_exists} <#elseif orderItemType?exists> ${orderItemType.description} - ${orderItem.itemDescription?if_exists} <#else> ${orderItem.itemDescription?if_exists} </#if> </div> <#if productId?exists> <div class="tabletext" style="margin-top: 15px; margin-left: 10px;"> <a href="/catalog/control/EditProduct?productId=${productId}" class="buttontext" target="_blank">${uiLabelMap.ProductCatalog}</a> <a href="/ecommerce/control/product?product_id=${productId}" class="buttontext" target="_blank">${uiLabelMap.EcommerceEcommerce}</a> <#if orderItemContentWrapper.get("IMAGE_URL")?has_content> <a href="<@ofbizUrl>viewimage?orderId=${orderId}&orderItemSeqId=${orderItem.orderItemSeqId}&orderContentTypeId=IMAGE_URL</@ofbizUrl>" target="_orderImage" class="buttontext">${uiLabelMap.OrderViewImage}</a> </#if> </div> <#-- INVENTORY --> <#if (orderHeader.statusId != "ORDER_COMPLETED") && availableToPromiseMap?exists && quantityOnHandMap?exists && availableToPromiseMap.get(productId)?exists && quantityOnHandMap.get(productId)?exists> <#assign quantityToProduce = 0> <#assign atpQuantity = availableToPromiseMap.get(productId)?default(0)> <#assign qohQuantity = quantityOnHandMap.get(productId)?default(0)> <#assign requiredQuantity = requiredProductQuantityMap.get(productId)?default(0)> <#assign onOrderQuantity = onOrderProductQuantityMap.get(productId)?default(0)> <#assign inProductionQuantity = productionProductQuantityMap.get(productId)?default(0)> <#assign unplannedQuantity = requiredQuantity - qohQuantity - inProductionQuantity - onOrderQuantity> <#if unplannedQuantity < 0><#assign unplannedQuantity = 0></#if> <div class="tabletext" style="margin-top: 15px; margin-left: 20px;"> <table cellspacing="0" cellpadding="0" border="0"> <tr><td style="text-align: right; padding-bottom: 10px;"> <a class="buttontext" href="/catalog/control/EditProductInventoryItems?productId=${productId}&externalLoginKey=${externalLoginKey}" target="_blank">${uiLabelMap.ProductInventory}</a> </td><td> </td></tr> <tr><td align="left">${uiLabelMap.OrderRequiredForSO}</td> <td style="padding-left: 15px; text-align: left;">${requiredQuantity}</td></tr> <tr><td align="left">${uiLabelMap.ProductInInventory} ${uiLabelMap.ProductQoh}</td> <td style="padding-left: 15px; text-align: left;">${qohQuantity} (${uiLabelMap.ProductAtp}: ${atpQuantity})</a></td></tr> <tr><td align="left">${uiLabelMap.OrderOnOrder}</td> <td style="padding-left: 15px; text-align: left;">${onOrderQuantity}</td></tr> <tr><td align="left">${uiLabelMap.OrderInProduction}</td> <td style="padding-left: 15px; text-align: left;">${inProductionQuantity}</td></tr> <tr><td align="left">${uiLabelMap.OrderUnplanned}</td> <td style="padding-left: 15px; text-align: left;">${unplannedQuantity}</td></tr> </table> </div> </#if> </#if> </td> <#-- now show status details per line item --> <#assign currentItemStatus = orderItem.getRelatedOne("StatusItem")> <td align="left" colspan="1" valign="top"> <div class="tabletext">${uiLabelMap.CommonCurrent}: ${currentItemStatus.description?default(currentItemStatus.statusId)}</div> <#assign orderItemStatuses = orderReadHelper.getOrderItemStatuses(orderItem)> <#list orderItemStatuses as orderItemStatus> <#assign loopStatusItem = orderItemStatus.getRelatedOne("StatusItem")> <div class="tabletext"> ${orderItemStatus.statusDatetime.toString()} : ${loopStatusItem.description?default(orderItemStatus.statusId)} </div> </#list> <#assign returns = orderItem.getRelated("ReturnItem")?if_exists> <#if returns?has_content> <#list returns as returnItem> <#assign returnHeader = returnItem.getRelatedOne("ReturnHeader")> <#if returnHeader.statusId != "RETURN_CANCELLED"> <div class="tabletext"> <font color="red"><b>${uiLabelMap.OrderReturned}</b></font> #<a href="<@ofbizUrl>returnMain?returnId=${returnItem.returnId}</@ofbizUrl>" class="buttontext">${returnItem.returnId}</a> </div> </#if> </#list> </#if> </td> <#-- QUANTITY --> <td align="right" valign="top" nowrap> <table> <tr valign="top"> <td> <#assign remainingQuantity = (orderItem.quantity?default(0) - orderItem.cancelQuantity?default(0))> <#assign shippedQuantity = orderReadHelper.getItemShippedQuantity(orderItem)> <#-- to compute shortfall amount, sum up the orderItemShipGrpInvRes.quantityNotAvailable --> <#assign shortfalledQuantity = 0/> <#list orderItemShipGrpInvResList as orderItemShipGrpInvRes> <#if (orderItemShipGrpInvRes.quantityNotAvailable?has_content && orderItemShipGrpInvRes.quantityNotAvailable > 0)> <#assign shortfalledQuantity = shortfalledQuantity + orderItemShipGrpInvRes.quantityNotAvailable/> </#if> </#list> <div class="tabletext">${uiLabelMap.OrderOrdered}: ${orderItem.quantity?default(0)?string.number} </div> <div class="tabletext">${uiLabelMap.OrderCancelled}: ${orderItem.cancelQuantity?default(0)?string.number} </div> <div class="tabletext">${uiLabelMap.OrderRemaining}: ${remainingQuantity} </div> <div class="tabletext">${uiLabelMap.OrderShortfalled}: ${shortfalledQuantity} </div> </td> <td> <div class="tabletext">${uiLabelMap.OrderShipRequest} : ${orderReadHelper.getItemReservedQuantity(orderItem)} </div> <div class="tabletext">${uiLabelMap.OrderQtyShipped}: ${shippedQuantity} </div> <div class="tabletext">${uiLabelMap.OrderOutstanding}: <#-- Make sure digital goods without shipments don't always remainn "outstanding": if item is completed, it must have no outstanding quantity. --> <#if (orderItem.statusId != null) && (orderItem.statusId == "ITEM_COMPLETED")>0<#else>${orderItem.quantity?default(0) - orderItem.cancelQuantity?default(0) - shippedQuantity}</#if> </div> <div class="tabletext">${uiLabelMap.OrderInvoiced}: ${orderReadHelper.getOrderItemInvoicedQuantity(orderItem)} </div> <div class="tabletext">${uiLabelMap.OrderReturned}: ${returnQuantityMap.get(orderItem.orderItemSeqId)?default(0)} </div> </td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -