📄 orderitems.ftl
字号:
<#--
* Copyright (c) 2003 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)
*@version $Revision: 1.10 $
*@since 2.2
-->
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="boxoutside">
<tr>
<td width="100%">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="boxtop">
<tr>
<td valign="middle" align="left">
<div class="boxhead"> Order Items</div>
</td>
<#if orderHeader?has_content && orderHeader.statusId != "ORDER_CANCELLED" && orderHeader.statusId != "ORDER_COMPLETED">
<td valign="middle" align="right">
<div class="tabletext"><a href="<@ofbizUrl>/changeOrderItemStatus?orderId=${orderId}&statusId=ITEM_CANCELLED&${paramString}</@ofbizUrl>" class="submenutextright">Cancel All Items</a></div>
</td>
</#if>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="boxbottom">
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr align=left valign=bottom>
<td width="30%" align="left"><div class="tableheadtext">Product</div></td>
<td width="30%" align="left"><div class="tableheadtext">Status</div></td>
<td width="5%" align="right"><div class="tableheadtext">Quantity</div></td>
<td width="10%" align="right"><div class="tableheadtext">Unit / List</div></td>
<td width="10%" align="right"><div class="tableheadtext">Adjustments</div></td>
<td width="10%" align="right"><div class="tableheadtext">Subtotal</div></td>
<td width="5%"> </td>
</tr>
<#if !orderItemList?has_content>
<tr><td><font color="red">ERROR: Sales Order Lines lookup failed.</font></td></tr>
<#else>
<#list orderItemList as 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">
<a href="/catalog/control/EditProduct?productId=${productId}" class="buttontext" target="_blank">[catalog]</a>
<a href="/ecommerce/control/product?product_id=${productId}" class="buttontext" target="_blank">[ecommerce]</a>
</div>
</#if>
</td>
<#-- now show status details per line item -->
<#assign currentItemStatus = orderItem.getRelatedOne("StatusItem")>
<td align="left" colspan="1">
<div class="tabletext">Current: ${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 return>
<div class="tabletext">
<font color="red"><b>Returned</b></font> #<a href="<@ofbizUrl>/returnMain?returnId=${return.returnId}</@ofbizUrl>" class="buttontext">${return.returnId}</a>
</div>
</#list>
</#if>
</td>
<td align="right" valign="top" nowrap>
<#assign remainingQuantity = (orderItem.quantity?default(0) - orderItem.cancelQuantity?default(0))>
<div class="tabletext">Ordered: ${orderItem.quantity?default(0)?string.number} </div>
<div class="tabletext">Cancelled: ${orderItem.cancelQuantity?default(0)?string.number} </div>
<div class="tabletext">Remaining: ${remainingQuantity?string.number} </div>
</td>
<td align="right" valign="top" nowrap>
<div class="tabletext" nowrap><@ofbizCurrency amount=orderItem.unitPrice isoCode=currencyUomId/> / <@ofbizCurrency amount=orderItem.unitListPrice isoCode=currencyUomId/></div>
</td>
<td align="right" valign="top" nowrap>
<div class="tabletext" nowrap><@ofbizCurrency amount=Static["org.ofbiz.order.order.OrderReadHelper"].getOrderItemAdjustmentsTotal(orderItem, orderAdjustments, true, false, false) isoCode=currencyUomId/></div>
</td>
<td align="right" valign="top" nowrap>
<#if orderItem.statusId != "ITEM_CANCELLED">
<div class="tabletext" nowrap><@ofbizCurrency amount=Static["org.ofbiz.order.order.OrderReadHelper"].getOrderItemSubTotal(orderItem, orderAdjustments) isoCode=currencyUomId/></div>
<#else>
<div class="tabletext" nowrap><@ofbizCurrency amount=0.00 isoCode=currencyUomId/></div>
</#if>
</td>
<td> </td>
<td align="right" valign="top" nowrap>
<#if (security.hasEntityPermission("ORDERMGR", "_ADMIN", session) && orderItem.statusId != "ITEM_CANCELLED" && orderItem.statusId != "ITEM_COMPLETED") || (security.hasEntityPermission("ORDERMGR", "_UPDATE", session) && orderItem.statusId != "ITEM_CANCELLED" && orderItem.statusId != "ITEM_COMPLETED" && orderHeader.statusId != "ORDER_SENT")>
<div class="tabletext"><a href="<@ofbizUrl>/cancelOrderItem?order_id=${orderItem.orderId}&item_seq=${orderItem.orderItemSeqId}&${paramString}</@ofbizUrl>" class="buttontext">[Cancel]</a></div>
<#else>
</#if>
</td>
</#if>
</tr>
<#-- now show adjustment details per line item -->
<#assign orderItemAdjustments = Static["org.ofbiz.order.order.OrderReadHelper"].getOrderItemAdjustmentList(orderItem, orderAdjustments)>
<#if orderItemAdjustments?exists && orderItemAdjustments?has_content>
<#list orderItemAdjustments as orderItemAdjustment>
<#assign adjustmentType = orderItemAdjustment.getRelatedOne("OrderAdjustmentType")>
<tr>
<td align="right" colspan="2">
<div class="tabletext" style="font-size: xx-small;"><b><i>Adjustment</i>:</b> <b>${adjustmentType.description}</b> : ${orderItemAdjustment.description?if_exists} (${orderItemAdjustment.comments?default("")})</div>
</td>
<td> </td>
<td> </td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -