📄 returnitems.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 Si Chen (sichen@opensourcestrategies.com) *@author Mu Jinsong (mujinsong@opensourcestrategies.com) *@version $Rev: 7319 $ *@since 2.2--><#macro displayReturnAdjustment returnAdjustment adjEditable> <#assign returnHeader = returnAdjustment.getRelatedOne("ReturnHeader")> <#assign adjReturnType = returnAdjustment.getRelatedOne("ReturnType")?if_exists> <input type="hidden" name="_rowSubmit_o_${rowCount}" value="Y" /> <input type="hidden" name="returnAdjustmentId_o_${rowCount}" value="${returnAdjustment.returnAdjustmentId}" /> <tr class="tabletext"> <td colspan="2"> </td> <td colspan="3" class="tabletext">${returnAdjustment.description?default("N/A")} <#if returnAdjustment.comments?has_content>: ${returnAdjustment.comments}</#if> </div></td> <#if (adjEditable)> <td> <input type="text" class="inputBox" size="8" name="amount_o_${rowCount}" value="${returnAdjustment.amount?string("##0.00")}"/> </td> <#else> <td class="tabletextright"><@ofbizCurrency amount=returnAdjustment.amount isoCode=returnHeader.currencyUomId/></td> </#if> <td colspan="2"> </td> <td><div class="tabletext"> <#if (!adjEditable)> ${adjReturnType.description?default("N/A")} <#else> <select name="returnTypeId_o_${rowCount}" class="selectBox"> <#if (adjReturnType?has_content)> <option value="${adjReturnType.returnTypeId}">${adjReturnType.description?if_exists}</option> <option value="${adjReturnType.returnTypeId}">--</option> </#if> <#list returnTypes as returnTypeItem> <option value="${returnTypeItem.returnTypeId}">${returnTypeItem.description?if_exists}</option> </#list> </select> </#if> </div> </td> <#if (adjEditable)> <td align='right'><a href="<@ofbizUrl>removeReturnAdjustment?returnAdjustmentId=${returnAdjustment.returnAdjustmentId}&returnId=${returnAdjustment.returnId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonRemove}</a></td> <#else> <td> </td> </#if> <#assign rowCount = rowCount + 1> <#assign returnTotal = returnTotal + returnAdjustment.get("amount")> </tr> </#macro><div class='tabContainer'> <a href="<@ofbizUrl>returnMain?returnId=${returnId?if_exists}</@ofbizUrl>" class="tabButton">Return Header</a> <a href="<@ofbizUrl>returnItems?returnId=${returnId?if_exists}</@ofbizUrl>" class="tabButtonSelected">Return Items</a> <#if returnHeader?has_content && returnHeader.destinationFacilityId?has_content && returnHeader.statusId == "RETURN_ACCEPTED"> <a href="/facility/control/ReceiveReturn?facilityId=${returnHeader.destinationFacilityId}&returnId=${returnHeader.returnId?if_exists}${externalKeyParam}" class="tabButton">Receive Return</a> </#if></div><div> <a href="<@ofbizUrl>return.pdf?returnId=${returnId?if_exists}</@ofbizUrl>" class="buttontext">PDF</a></div><!-- if we're called with loadOrderItems or createReturn, then orderId would exist --><#if !requestParameters.orderId?exists><table width="100%" border='0' cellpadding='2' cellspacing='0'> <#assign readOnly = (returnHeader.statusId != "RETURN_REQUESTED")> <tr><td colspan="10"><div class="head3">${uiLabelMap.OrderItemsReturned} ${uiLabelMap.CommonIn} ${uiLabelMap.OrderOrderReturn} #${returnId}</div></td></tr> <tr><td colspan="10"><hr class="sepbar"></td></tr> <tr> <td><div class="tableheadtext">${uiLabelMap.OrderOrderItems}</div></td> <td><div class="tableheadtext">Product Id</div></td> <td><div class="tableheadtext">${uiLabelMap.CommonDescription}</div></td> <td><div class="tableheadtext">${uiLabelMap.OrderQuantity}</div></td> <td><div class="tableheadtext">${uiLabelMap.OrderPrice}</div></td> <td><div class="tableheadtext">${uiLabelMap.OrderSubTotal}</div></td> <td><div class="tableheadtext">${uiLabelMap.OrderReturnReason}</div></td> <td><div class="tableheadtext">${uiLabelMap.OrderItemStatus}</div></td> <td><div class="tableheadtext">${uiLabelMap.CommonType}</div></td> <#if (readOnly)> <td><div class="tableheadtext">${uiLabelMap.OrderReturnResponse}</div></td> </#if> <td> </td> </tr> <tr><td colspan="10"><hr class="sepbar"></td></tr> <#assign returnTotal = 0.0> <#assign rowCount = 0> <form method="post" action="<@ofbizUrl>updateReturnItems</@ofbizUrl>"> <input type="hidden" name="_useRowSubmit" value="Y"> <#if returnItems?has_content> <#list returnItems as item> <#assign orderItem = item.getRelatedOne("OrderItem")?if_exists> <#assign orderHeader = item.getRelatedOne("OrderHeader")?if_exists> <#assign returnReason = item.getRelatedOne("ReturnReason")?if_exists> <#assign returnType = item.getRelatedOne("ReturnType")?if_exists> <#assign status = item.getRelatedOne("InventoryStatusItem")?if_exists> <#if (item.get("returnQuantity")?exists && item.get("returnPrice")?exists)> <#assign returnTotal = returnTotal + item.get("returnQuantity") * item.get("returnPrice") > <#assign returnItemSubTotal = item.get("returnQuantity") * item.get("returnPrice") > <#else> <#assign returnItemSubTotal = null > <#-- otherwise the last item's might carry over --> </#if> <tr> <td class="tabletext"><a href="<@ofbizUrl>orderview?orderId=${item.orderId}</@ofbizUrl>" class="buttontext">${item.orderId}</a> - ${item.orderItemSeqId?default("N/A")}</td> <input name="orderId_o_${rowCount}" value="${item.orderId}" type="hidden"> <input name="returnId_o_${rowCount}" value="${item.returnId}" type="hidden"> <input name="returnItemTypeId_o_${rowCount}" value="${item.returnItemTypeId}" type="hidden"> <input name="returnItemSeqId_o_${rowCount}" value="${item.returnItemSeqId}" type="hidden"> <input type="hidden" name="_rowSubmit_o_${rowCount}" value="Y" /> <td><div class="tabletext"> <#if item.get("productId")?exists> <a href="/catalog/control/EditProductInventoryItems?productId=${item.productId}" class="buttontext">${item.productId}</a> <#else> N/A </#if></div></td> <td><div class="tabletext"> <#if readOnly> ${item.description?default("N/A")} <#else> <input name="description_o_${rowCount}" value="${item.description}" type="text" class='inputBox' size="15"> </#if> </div></td> <td><div class="tabletextright"> <#if readOnly> ${item.returnQuantity?string.number} <#else> <input name="returnQuantity_o_${rowCount}" value="${item.returnQuantity}" type="text" class='inputBox' size="8" align="right"> </#if> </div></td> <td><div class="tabletextright"> <#if readOnly> <@ofbizCurrency amount=item.returnPrice isoCode=orderHeader.currencyUom/> <#else> <input name="returnPrice_o_${rowCount}" value="${item.returnPrice}" type="text" class='inputBox' size="8" align="right"> </#if> </div></td> <td class="tabletextright"> <#if returnItemSubTotal?exists><@ofbizCurrency amount=returnItemSubTotal isoCode=orderHeader.currencyUom/></#if> </td> <td><div class="tabletext"> <#if readOnly> ${returnReason.description?default("N/A")} <#else> <select name="returnReasonId_o_${rowCount}" class='selectBox'>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -