You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2016/03/28 13:14:24 UTC

svn commit: r1736868 [8/20] - in /ofbiz/trunk/applications/order: template/ template/entry/ template/entry/cart/ template/entry/catalog/ template/entry/order/ template/order/ template/product/ template/quote/ template/reports/ template/request/ templat...

Added: ofbiz/trunk/applications/order/template/order/editorderitems.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/template/order/editorderitems.ftl?rev=1736868&view=auto
==============================================================================
--- ofbiz/trunk/applications/order/template/order/editorderitems.ftl (added)
+++ ofbiz/trunk/applications/order/template/order/editorderitems.ftl Mon Mar 28 11:14:22 2016
@@ -0,0 +1,423 @@
+<#--
+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.
+-->
+
+
+<#if orderHeader?has_content>
+
+<#-- price change rules -->
+<#assign allowPriceChange = false/>
+<#if (orderHeader.orderTypeId == 'PURCHASE_ORDER' || security.hasEntityPermission("ORDERMGR", "_SALES_PRICEMOD", session))>
+    <#assign allowPriceChange = true/>
+</#if>
+
+<div class="screenlet">
+    <div class="screenlet-title-bar">
+        <ul>
+          <li class="h3">&nbsp;${uiLabelMap.OrderOrderItems}</li>
+          <#if security.hasEntityPermission("ORDERMGR", "_UPDATE", session)>
+              <#if orderHeader?has_content && orderHeader.statusId != "ORDER_CANCELLED" && orderHeader.statusId != "ORDER_COMPLETED">
+                  <li><a href="javascript:document.updateItemInfo.action='<@o...@ofbizUrl>';document.updateItemInfo.submit()">${uiLabelMap.OrderCancelSelectedItems}</a></li>
+                  <li><a href="javascript:document.updateItemInfo.action='<@o...@ofbizUrl>';document.updateItemInfo.submit()">${uiLabelMap.OrderCancelAllItems}</a></li>
+                  <li><a href="<@o...@ofbizUrl>">${uiLabelMap.OrderViewOrder}</a></li>
+              </#if>
+          </#if>
+        </ul>
+        <br class="clear"/>
+    </div>
+    <div class="screenlet-body">
+        <#if !orderItemList?has_content>
+            <span class="alert">${uiLabelMap.checkhelper_sales_order_lines_lookup_failed}</span>
+        <#else>
+            <form name="updateItemInfo" method="post" action="<@o...@ofbizUrl>">
+            <input type="hidden" name="orderId" value="${orderId}"/>
+            <input type="hidden" name="orderItemSeqId" value=""/>
+            <input type="hidden" name="shipGroupSeqId" value=""/>
+            <#if (orderHeader.orderTypeId == 'PURCHASE_ORDER')>
+              <input type="hidden" name="supplierPartyId" value="${partyId}"/>
+              <input type="hidden" name="orderTypeId" value="PURCHASE_ORDER"/>
+            </#if>
+            <table class="basic-table order-items" cellspacing="0">
+                <tr class="header-row">
+                    <td width="30%" style="border-bottom:none;">${uiLabelMap.ProductProduct}</td>
+                    <td width="30%" style="border-bottom:none;">${uiLabelMap.CommonStatus}</td>
+                    <td width="5%" style="border-bottom:none;" class="align-text">${uiLabelMap.OrderQuantity}</td>
+                    <td width="10%" style="border-bottom:none;" class="align-text">${uiLabelMap.OrderUnitPrice}</td>
+                    <td width="10%" style="border-bottom:none;" class="align-text">${uiLabelMap.OrderAdjustments}</td>
+                    <td width="10%" style="border-bottom:none;" class="align-text">${uiLabelMap.OrderSubTotal}</td>
+                    <td width="2%" style="border-bottom:none;">&nbsp;</td>
+                    <td width="3%" style="border-bottom:none;">&nbsp;</td>
+                </tr>
+                <#list orderItemList as orderItem>
+                    <#if orderItem.productId??> <#-- a null product may come from a quote -->
+                      <#assign orderItemContentWrapper = Static["org.ofbiz.order.order.OrderContentWrapper"].makeOrderContentWrapper(orderItem, request)>
+                      <tr><td colspan="8"><hr /></td></tr>
+                      <tr>
+                          <#assign orderItemType = orderItem.getRelatedOne("OrderItemType", false)!>
+                          <#assign productId = orderItem.productId!>
+                          <#if productId?? && productId == "shoppingcart.CommentLine">
+                              <td colspan="8" valign="top">
+                                  <span class="label">&gt;&gt; ${orderItem.itemDescription}</span>
+                              </td>
+                          <#else>
+                              <td valign="top">
+                                  <div>
+                                      <#if orderHeader.statusId = "ORDER_CANCELLED" || orderHeader.statusId = "ORDER_COMPLETED">
+                                      <#if productId??>
+                                      ${orderItem.productId?default("N/A")} - ${orderItem.itemDescription!}
+                                      <#elseif orderItemType??>
+                                      ${orderItemType.description} - ${orderItem.itemDescription!}
+                                      <#else>
+                                      ${orderItem.itemDescription!}
+                                      </#if>
+                                      <#else>
+                                      <#if productId??>
+                                      <#assign orderItemName = orderItem.productId?default("N/A")/>
+                                      <#elseif orderItemType??>
+                                      <#assign orderItemName = orderItemType.description/>
+                                      </#if>
+                                      <p>${uiLabelMap.ProductProduct}&nbsp;${orderItemName}</p>
+                                      <#if productId??>
+                                          <#assign product = orderItem.getRelatedOne("Product", true)>
+                                          <#if product.salesDiscontinuationDate?? && Static["org.ofbiz.base.util.UtilDateTime"].nowTimestamp().after(product.salesDiscontinuationDate)>
+                                              <span class="alert">${uiLabelMap.OrderItemDiscontinued}: ${product.salesDiscontinuationDate}</span>
+                                          </#if>
+                                      </#if>
+                                      ${uiLabelMap.CommonDescription}<br />
+                                      <input type="text" size="20" name="idm_${orderItem.orderItemSeqId}" value="${orderItem.itemDescription!}"/>
+                                      </#if>
+                                  </div>
+                                  <#if productId??>
+                                  <div>
+                                      <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.OrderEcommerce}</a>
+                                      <#if orderItemContentWrapper.get("IMAGE_URL", "url")?has_content>
+                                      <a href="<@o...@ofbizUrl>" target="_orderImage" class="buttontext">${uiLabelMap.OrderViewImage}</a>
+                                      </#if>
+                                  </div>
+                                  </#if>
+                              </td>
+
+                              <#-- now show status details per line item -->
+                              <#assign currentItemStatus = orderItem.getRelatedOne("StatusItem", false)>
+                              <td>
+                                  ${uiLabelMap.CommonCurrent}&nbsp;${currentItemStatus.get("description",locale)?default(currentItemStatus.statusId)}<br />
+                                  <#assign orderItemStatuses = orderReadHelper.getOrderItemStatuses(orderItem)>
+                                  <#list orderItemStatuses as orderItemStatus>
+                                  <#assign loopStatusItem = orderItemStatus.getRelatedOne("StatusItem", false)>
+                                  <#if orderItemStatus.statusDatetime?has_content>${orderItemStatus.statusDatetime.toString()}</#if>
+                                  &nbsp;${loopStatusItem.get("description",locale)?default(orderItemStatus.statusId)}<br />
+                                  </#list>
+                                  <#assign returns = orderItem.getRelated("ReturnItem", null, null, false)!>
+                                  <#if returns?has_content>
+                                  <#list returns as returnItem>
+                                  <#assign returnHeader = returnItem.getRelatedOne("ReturnHeader", false)>
+                                  <#if returnHeader.statusId != "RETURN_CANCELLED">
+                                  <div class="alert">
+                                      <span class="label">${uiLabelMap.OrderReturned}</span> ${uiLabelMap.CommonNbr}<a href="<@o...@ofbizUrl>" class="buttontext">${returnItem.returnId}</a>
+                                  </div>
+                                  </#if>
+                                  </#list>
+                                  </#if>
+                              </td>
+                              <td class="align-text" valign="top" nowrap="nowrap">
+                                <#assign shippedQuantity = orderReadHelper.getItemShippedQuantity(orderItem)>
+                                <#assign shipmentReceipts = delegator.findByAnd("ShipmentReceipt", {"orderId" : orderHeader.getString("orderId"), "orderItemSeqId" : orderItem.orderItemSeqId}, null, false)/>
+                                <#assign totalReceived = 0.0>
+                                <#if shipmentReceipts?? && shipmentReceipts?has_content>
+                                  <#list shipmentReceipts as shipmentReceipt>
+                                    <#if shipmentReceipt.quantityAccepted?? && shipmentReceipt.quantityAccepted?has_content>
+                                      <#assign  quantityAccepted = shipmentReceipt.quantityAccepted>
+                                      <#assign totalReceived = quantityAccepted + totalReceived>
+                                    </#if>
+                                    <#if shipmentReceipt.quantityRejected?? && shipmentReceipt.quantityRejected?has_content>
+                                      <#assign  quantityRejected = shipmentReceipt.quantityRejected>
+                                      <#assign totalReceived = quantityRejected + totalReceived>
+                                    </#if>
+                                  </#list>
+                                </#if>
+                                <#if orderHeader.orderTypeId == "PURCHASE_ORDER">
+                                  <#assign remainingQuantity = ((orderItem.quantity?default(0) - orderItem.cancelQuantity?default(0)) - totalReceived?double)>
+                                <#else>
+                                  <#assign remainingQuantity = ((orderItem.quantity?default(0) - orderItem.cancelQuantity?default(0)) - shippedQuantity?double)>
+                                </#if>
+                                  ${uiLabelMap.OrderOrdered}&nbsp;${orderItem.quantity?default(0)?string.number}&nbsp;&nbsp;<br />
+                                  ${uiLabelMap.OrderCancelled}:&nbsp;${orderItem.cancelQuantity?default(0)?string.number}&nbsp;&nbsp;<br />
+                                  ${uiLabelMap.OrderRemaining}:&nbsp;${remainingQuantity}&nbsp;&nbsp;<br />
+                              </td>
+                              <td class="align-text" valign="top" nowrap="nowrap">
+                                  <#-- check for permission to modify price -->
+                                  <#if (allowPriceChange)>
+                                      <input type="text" size="8" name="ipm_${orderItem.orderItemSeqId}" value="<@ofbizAmount amount=orderItem.unitPrice/>"/>
+                                      &nbsp;<input type="checkbox" name="opm_${orderItem.orderItemSeqId}" value="Y"/>
+                                  <#else>
+                                      <div><@ofbizCurrency amount=orderItem.unitPrice isoCode=currencyUomId/> / <@ofbizCurrency amount=orderItem.unitListPrice isoCode=currencyUomId/></div>
+                                  </#if>
+                              </td>
+                              <td class="align-text" valign="top" nowrap="nowrap">
+                                  <@ofbizCurrency amount=Static["org.ofbiz.order.order.OrderReadHelper"].getOrderItemAdjustmentsTotal(orderItem, orderAdjustments, true, false, false) isoCode=currencyUomId/>
+                              </td>
+                              <td class="align-text" valign="top" nowrap="nowrap">
+                                  <#if orderItem.statusId != "ITEM_CANCELLED">
+                                  <@ofbizCurrency amount=Static["org.ofbiz.order.order.OrderReadHelper"].getOrderItemSubTotal(orderItem, orderAdjustments) isoCode=currencyUomId/>
+                                  <#else>
+                                  <@ofbizCurrency amount=0.00 isoCode=currencyUomId/>
+                                  </#if>
+                              </td>
+                              <td>&nbsp;</td>
+                          </#if>
+                      </tr>
+
+                      <#-- now update/cancel reason and comment field -->
+                      <#if orderItem.statusId != "ITEM_CANCELLED" && orderItem.statusId != "ITEM_COMPLETED" && ("Y" != orderItem.isPromo!)>
+                        <tr><td colspan="8"><span class="label">${uiLabelMap.OrderReturnReason}</span>
+                            <select name="irm_${orderItem.orderItemSeqId}">
+                              <option value="">&nbsp;</option>
+                              <#list orderItemChangeReasons as reason>
+                                <option value="${reason.enumId}">${reason.get("description",locale)?default(reason.enumId)}</option>
+                              </#list>
+                            </select>
+                            <span class="label">${uiLabelMap.CommonComments}</span>
+                            <input type="text" name="icm_${orderItem.orderItemSeqId}" value="${orderItem.comments!}" size="30" maxlength="60"/>
+                            <#if (orderHeader.orderTypeId == 'PURCHASE_ORDER')>
+                              <span class="label">${uiLabelMap.OrderEstimatedShipDate}</span>
+                              <@htmlTemplate.renderDateTimeField name="isdm_${orderItem.orderItemSeqId}" value="${orderItem.estimatedShipDate!}" event="" action="" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" size="25" maxlength="30" id="isdm_${orderItem.orderItemSeqId}" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/>
+                              <span class="label">${uiLabelMap.OrderOrderQuoteEstimatedDeliveryDate}</span>
+                              <@htmlTemplate.renderDateTimeField name="iddm_${orderItem.orderItemSeqId}" value="${orderItem.estimatedDeliveryDate!}" event="" action="" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" size="25" maxlength="30" id="iddm_${orderItem.orderItemSeqId}" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/>
+                            </#if>
+                            </td>
+                        </tr>
+                      </#if>
+                      <#-- now show adjustment details per line item -->
+                      <#assign orderItemAdjustments = Static["org.ofbiz.order.order.OrderReadHelper"].getOrderItemAdjustmentList(orderItem, orderAdjustments)>
+                      <#if orderItemAdjustments?? && orderItemAdjustments?has_content>
+                          <#list orderItemAdjustments as orderItemAdjustment>
+                              <#assign adjustmentType = orderItemAdjustment.getRelatedOne("OrderAdjustmentType", true)>
+                              <tr>
+                                  <td class="align-text" colspan="2">
+                                      <span class="label">${uiLabelMap.OrderAdjustment}</span>&nbsp;${adjustmentType.get("description",locale)}&nbsp;
+                                      ${orderItemAdjustment.get("description",locale)!} (${orderItemAdjustment.comments?default("")})
+
+                                      <#if orderItemAdjustment.orderAdjustmentTypeId == "SALES_TAX">
+                                      <#if orderItemAdjustment.primaryGeoId?has_content>
+                                      <#assign primaryGeo = orderItemAdjustment.getRelatedOne("PrimaryGeo", true)/>
+                                      <span class="label">${uiLabelMap.OrderJurisdiction}</span>&nbsp;${primaryGeo.geoName} [${primaryGeo.abbreviation!}]
+                                      <#if orderItemAdjustment.secondaryGeoId?has_content>
+                                      <#assign secondaryGeo = orderItemAdjustment.getRelatedOne("SecondaryGeo", true)/>
+                                      (<span class="label">${uiLabelMap.CommonIn}</span>&nbsp;${secondaryGeo.geoName} [${secondaryGeo.abbreviation!}])
+                                      </#if>
+                                      </#if>
+                                      <#if orderItemAdjustment.sourcePercentage??><span class="label">Rate</span>&nbsp;${orderItemAdjustment.sourcePercentage}</#if>
+                                      <#if orderItemAdjustment.customerReferenceId?has_content><span class="label">Customer Tax ID</span>&nbsp;${orderItemAdjustment.customerReferenceId}</#if>
+                                      <#if orderItemAdjustment.exemptAmount??><span class="label">Exempt Amount</span>&nbsp;${orderItemAdjustment.exemptAmount}</#if>
+                                      </#if>
+                                  </td>
+                                  <td>&nbsp;</td>
+                                  <td>&nbsp;</td>
+                                  <td class="align-text">
+                                      <@ofbizCurrency amount=Static["org.ofbiz.order.order.OrderReadHelper"].calcItemAdjustment(orderItemAdjustment, orderItem) isoCode=currencyUomId/>
+                                  </td>
+                                  <td colspan="3">&nbsp;</td>
+                              </tr>
+                          </#list>
+                      </#if>
+
+                      <#-- now show ship group info per line item -->
+                      <#assign orderItemShipGroupAssocs = orderItem.getRelated("OrderItemShipGroupAssoc", null, null, false)!>
+                      <#if orderItemShipGroupAssocs?has_content>
+                          <tr><td colspan="8">&nbsp;</td></tr>
+                          <#list orderItemShipGroupAssocs as shipGroupAssoc>
+                                <#assign shipGroupQty = shipGroupAssoc.quantity - shipGroupAssoc.cancelQuantity?default(0)>
+                              <#assign shipGroup = shipGroupAssoc.getRelatedOne("OrderItemShipGroup", false)>
+                              <#assign shipGroupAddress = shipGroup.getRelatedOne("PostalAddress", false)!>
+                              <#assign shippedQuantity = orderReadHelper.getItemShipGroupAssocShippedQuantity(orderItem, shipGroup.shipGroupSeqId)>
+                              <#if shipGroupAssoc.quantity != shippedQuantity>
+                                <#assign itemStatusOkay = (orderItem.statusId != "ITEM_CANCELLED" && orderItem.statusId != "ITEM_COMPLETED" && (shipGroupAssoc.cancelQuantity?default(0) < shipGroupAssoc.quantity?default(0)) && ("Y" != orderItem.isPromo!))>
+                                <#assign itemSelectable = (security.hasEntityPermission("ORDERMGR", "_ADMIN", session) && itemStatusOkay) || (security.hasEntityPermission("ORDERMGR", "_UPDATE", session) && itemStatusOkay && orderHeader.statusId != "ORDER_SENT")>
+                                <tr>
+                                    <td class="align-text" colspan="2">
+                                        <span class="label">${uiLabelMap.OrderShipGroup}</span>&nbsp;[${shipGroup.shipGroupSeqId}] ${shipGroupAddress.address1?default("${uiLabelMap.OrderNotShipped}")}
+                                    </td>
+                                    <td align="center">
+                                        <input type="text" name="iqm_${shipGroupAssoc.orderItemSeqId}:${shipGroupAssoc.shipGroupSeqId}" size="6" value="${shipGroupQty?string.number}"/>
+                                        <#if itemSelectable>
+                                            <input type="checkbox" name="selectedItem" value="${orderItem.orderItemSeqId}" />
+                                        </#if>
+                                    </td>
+                                    <td colspan="4">&nbsp;</td>
+                                    <td>
+                                        <#if itemSelectable>
+                                            <a href="javascript:document.updateItemInfo.action='<@o...@ofbizUrl>';document.updateItemInfo.orderItemSeqId.value='${orderItem.orderItemSeqId}';document.updateItemInfo.shipGroupSeqId.value='${shipGroup.shipGroupSeqId}';document.updateItemInfo.submit()" class="buttontext">${uiLabelMap.CommonCancel}</a>
+                                        <#else>
+                                            &nbsp;
+                                        </#if>
+                                    </td>
+                                </tr>
+                              <#else>
+                                <tr>
+                                    <td class="align-text" colspan="2">
+                                        <span class="label">${uiLabelMap.OrderQtyShipped}</span>&nbsp;[${shipGroup.shipGroupSeqId}] ${shipGroupAddress.address1?default("${uiLabelMap.OrderNotShipped}")}
+                                    </td>
+                                    <td align="center">
+                                        ${shippedQuantity?default(0)}<input type="hidden" name="iqm_${shipGroupAssoc.orderItemSeqId}:${shipGroupAssoc.shipGroupSeqId}" size="6" value="${shippedQuantity?string.number}"/>
+                                    </td>
+                                    <td colspan="5">&nbsp;</td>
+                                </tr>
+                              </#if>
+                          </#list>
+                      </#if>
+                    </#if>
+                </#list>
+                <tr>
+                    <td colspan="7">&nbsp;</td>
+                    <td>
+                        <input type="submit" value="${uiLabelMap.OrderUpdateItems}" class="buttontext"/>
+                    </td>
+                </tr>
+                <tr><td colspan="8"><hr /></td></tr>
+            </table>
+            </form>
+        </#if>
+        <#list orderHeaderAdjustments as orderHeaderAdjustment>
+            <#assign adjustmentType = orderHeaderAdjustment.getRelatedOne("OrderAdjustmentType", false)>
+            <#assign adjustmentAmount = Static["org.ofbiz.order.order.OrderReadHelper"].calcOrderAdjustment(orderHeaderAdjustment, orderSubTotal)>
+            <#assign orderAdjustmentId = orderHeaderAdjustment.get("orderAdjustmentId")>
+            <#assign productPromoCodeId = ''>
+            <#if adjustmentType.get("orderAdjustmentTypeId") == "PROMOTION_ADJUSTMENT" && orderHeaderAdjustment.get("productPromoId")?has_content>
+                <#assign productPromo = orderHeaderAdjustment.getRelatedOne("ProductPromo", false)>
+                <#assign productPromoCodes = delegator.findByAnd("ProductPromoCode", {"productPromoId":productPromo.productPromoId}, null, false)>
+                <#assign orderProductPromoCode = ''>
+                <#list productPromoCodes as productPromoCode>
+                    <#if !(orderProductPromoCode?has_content)>
+                        <#assign orderProductPromoCode = delegator.findOne("OrderProductPromoCode", {"productPromoCodeId":productPromoCode.productPromoCodeId, "orderId":orderHeaderAdjustment.orderId}, false)!>
+                    </#if>
+                </#list>
+                <#if orderProductPromoCode?has_content>
+                    <#assign productPromoCodeId = orderProductPromoCode.get("productPromoCodeId")>
+                </#if>
+            </#if>
+            <#if adjustmentAmount != 0>
+                <form name="updateOrderAdjustmentForm${orderAdjustmentId}" method="post" action="<@o...@ofbizUrl>">
+                    <input type="hidden" name="orderAdjustmentId" value="${orderAdjustmentId!}"/>
+                    <input type="hidden" name="orderId" value="${orderId!}"/>
+                    <table class="basic-table" cellspacing="0">
+                        <tr>
+                            <td class="align-text" width="55%">
+                                <span class="label">${adjustmentType.get("description",locale)}</span>&nbsp;${orderHeaderAdjustment.comments!}
+                            </td>
+                            <td nowrap="nowrap" width="30%">
+                                <#if (allowPriceChange)>
+                                    <input type="text" name="description" value="${orderHeaderAdjustment.get("description")!}" size="30" maxlength="60"/>
+                                <#else>
+                                    ${orderHeaderAdjustment.get("description")!}
+                                </#if>
+                            </td>
+                            <td nowrap="nowrap" width="15%">
+                                <#if (allowPriceChange)>
+                                    <input type="text" name="amount" size="6" value="<@ofbizAmount amount=adjustmentAmount/>"/>
+                                    <input class="smallSubmit" type="submit" value="${uiLabelMap.CommonUpdate}"/>
+                                    <a href="javascript:document.deleteOrderAdjustment${orderAdjustmentId}.submit();" class="buttontext">${uiLabelMap.CommonDelete}</a>
+                                <#else>
+                                    <@ofbizAmount amount=adjustmentAmount/>
+                                </#if>
+                            </td>
+                        </tr>
+                    </table>
+                </form>
+                <form name="deleteOrderAdjustment${orderAdjustmentId}" method="post" action="<@o...@ofbizUrl>">
+                    <input type="hidden" name="orderAdjustmentId" value="${orderAdjustmentId!}"/>
+                    <input type="hidden" name="orderId" value="${orderId!}"/>
+                    <#if adjustmentType.get("orderAdjustmentTypeId") == "PROMOTION_ADJUSTMENT">
+                        <input type="hidden" name="productPromoCodeId" value="${productPromoCodeId!}"/>
+                    </#if>
+                </form>
+            </#if>
+        </#list>
+
+        <#-- add new adjustment -->
+        <#if security.hasEntityPermission("ORDERMGR", "_UPDATE", session) && orderHeader.statusId != "ORDER_COMPLETED" && orderHeader.statusId != "ORDER_CANCELLED" && orderHeader.statusId != "ORDER_REJECTED">
+            <form name="addAdjustmentForm" method="post" action="<@o...@ofbizUrl>">
+                <input type="hidden" name="comments" value="Added manually by [${userLogin.userLoginId}]"/>
+                <input type="hidden" name="orderId" value="${orderId!}"/>
+                <table class="basic-table" cellspacing="0">
+                    <tr><td colspan="3"><hr /></td></tr>
+                    <tr>
+                        <td class="align-text" width="55%">
+                            <span class="label">${uiLabelMap.OrderAdjustment}</span>&nbsp;
+                            <select name="orderAdjustmentTypeId">
+                                <#list orderAdjustmentTypes as type>
+                                <option value="${type.orderAdjustmentTypeId}">${type.get("description",locale)?default(type.orderAdjustmentTypeId)}</option>
+                                </#list>
+                            </select>
+                            <select name="shipGroupSeqId">
+                                <option value="_NA_"></option>
+                                <#list shipGroups as shipGroup>
+                                <option value="${shipGroup.shipGroupSeqId}">${uiLabelMap.OrderShipGroup} ${shipGroup.shipGroupSeqId}</option>
+                                </#list>
+                            </select>
+                        </td>
+                        <td width="30%"><input type="text" name="description" value="" size="30" maxlength="60"/></td>
+                        <td width="15%">
+                            <input type="text" name="amount" size="6" value="<@ofbizAmount amount=0.00/>"/>
+                            <input class="smallSubmit" type="submit" value="${uiLabelMap.CommonAdd}"/>
+                        </td>
+                    </tr>
+                </table>
+            </form>
+        </#if>
+
+        <#-- subtotal -->
+        <table class="basic-table" cellspacing="0">
+            <tr><td colspan="4"><hr /></td></tr>
+            <tr class="align-text">
+              <td width="80%"><span class="label">${uiLabelMap.OrderItemsSubTotal}</span></td>
+              <td width="10%" nowrap="nowrap"><@ofbizCurrency amount=orderSubTotal isoCode=currencyUomId/></td>
+              <td width="10%" colspan="2">&nbsp;</td>
+            </tr>
+
+            <#-- other adjustments -->
+            <tr class="align-text">
+              <td><span class="label">${uiLabelMap.OrderTotalOtherOrderAdjustments}</span></td>
+              <td nowrap="nowrap"><@ofbizCurrency amount=otherAdjAmount isoCode=currencyUomId/></td>
+              <td colspan="2">&nbsp;</td>
+            </tr>
+
+            <#-- shipping adjustments -->
+            <tr class="align-text">
+              <td><span class="label">${uiLabelMap.OrderTotalShippingAndHandling}</span></td>
+              <td nowrap="nowrap"><@ofbizCurrency amount=shippingAmount isoCode=currencyUomId/></td>
+              <td colspan="2">&nbsp;</td>
+            </tr>
+
+            <#-- tax adjustments -->
+            <tr class="align-text">
+              <td><span class="label">${uiLabelMap.OrderTotalSalesTax}</span></td>
+              <td nowrap="nowrap"><@ofbizCurrency amount=taxAmount isoCode=currencyUomId/></td>
+              <td colspan="2">&nbsp;</td>
+            </tr>
+
+            <#-- grand total -->
+            <tr class="align-text">
+              <td><span class="label">${uiLabelMap.OrderTotalDue}</span></td>
+              <td nowrap="nowrap"><@ofbizCurrency amount=grandTotal isoCode=currencyUomId/></td>
+              <td colspan="2">&nbsp;</td>
+            </tr>
+        </table>
+    </div>
+</div>
+</#if>

Propchange: ofbiz/trunk/applications/order/template/order/editorderitems.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/order/template/order/editorderitems.ftl
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/order/template/order/editorderitems.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/applications/order/template/order/findOrders.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/template/order/findOrders.ftl?rev=1736868&view=auto
==============================================================================
--- ofbiz/trunk/applications/order/template/order/findOrders.ftl (added)
+++ ofbiz/trunk/applications/order/template/order/findOrders.ftl Mon Mar 28 11:14:22 2016
@@ -0,0 +1,728 @@
+<#--
+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.
+-->
+
+<script language="JavaScript" type="text/javascript">
+<!-- //
+function lookupOrders(click) {
+    orderIdValue = document.lookuporder.orderId.value;
+    if (orderIdValue.length > 1) {
+        document.lookuporder.action = "<@o...@ofbizUrl>";
+        document.lookuporder.method = "get";
+    } else {
+        document.lookuporder.action = "<@o...@ofbizUrl>";
+    }
+
+    if (click) {
+        document.lookuporder.submit();
+    }
+    return true;
+}
+function toggleOrderId(master) {
+    var form = document.massOrderChangeForm;
+    var orders = form.elements.length;
+    for (var i = 0; i < orders; i++) {
+        var element = form.elements[i];
+        if (element.name == "orderIdList") {
+            element.checked = master.checked;
+        }
+    }
+}
+function setServiceName(selection) {
+    document.massOrderChangeForm.action = selection.value;
+}
+function runAction() {
+    var form = document.massOrderChangeForm;
+    form.submit();
+}
+
+function toggleOrderIdList() {
+    var form = document.massOrderChangeForm;
+    var orders = form.elements.length;
+    var isAllSelected = true;
+    for (var i = 0; i < orders; i++) {
+        var element = form.elements[i];
+        if (element.name == "orderIdList" && !element.checked)
+            isAllSelected = false;
+    }
+    jQuery('#checkAllOrders').attr("checked", isAllSelected);
+}
+
+// -->
+
+    function paginateOrderList(viewSize, viewIndex, hideFields) {
+        document.paginationForm.viewSize.value = viewSize;
+        document.paginationForm.viewIndex.value = viewIndex;
+        document.paginationForm.hideFields.value = hideFields;
+        document.paginationForm.submit();
+    }
+
+</script>
+
+<#if security.hasEntityPermission("ORDERMGR", "_VIEW", session)>
+<#if parameters.hideFields?has_content>
+<form name='lookupandhidefields${requestParameters.hideFields?default("Y")}' method="post" action="<@o...@ofbizUrl>">
+  <#if parameters.hideFields?default("N")=='Y'>
+    <input type="hidden" name="hideFields" value="N"/>
+  <#else>
+    <input type='hidden' name='hideFields' value='Y'/>
+  </#if>
+  <input type="hidden" name="viewSize" value="${viewSize}"/>
+  <input type="hidden" name="viewIndex" value="${viewIndex}"/>
+  <input type='hidden' name='correspondingPoId' value='${requestParameters.correspondingPoId!}'/>
+  <input type='hidden' name='internalCode' value='${requestParameters.internalCode!}'/>
+  <input type='hidden' name='productId' value='${requestParameters.productId!}'/>
+  <input type='hidden' name='goodIdentificationTypeId' value='${requestParameters.goodIdentificationTypeId!}'/>
+  <input type='hidden' name='goodIdentificationIdValue' value='${requestParameters.goodIdentificationIdValue!}'/>
+  <input type='hidden' name='inventoryItemId' value='${requestParameters.inventoryItemId!}'/>
+  <input type='hidden' name='serialNumber' value='${requestParameters.serialNumber!}'/>
+  <input type='hidden' name='softIdentifier' value='${requestParameters.softIdentifier!}'/>
+  <input type='hidden' name='partyId' value='${requestParameters.partyId!}'/>
+  <input type='hidden' name='userLoginId' value='${requestParameters.userLoginId!}'/>
+  <input type='hidden' name='billingAccountId' value='${requestParameters.billingAccountId!}'/>
+  <input type='hidden' name='createdBy' value='${requestParameters.createdBy!}'/>
+  <input type='hidden' name='minDate' value='${requestParameters.minDate!}'/>
+  <input type='hidden' name='maxDate' value='${requestParameters.maxDate!}'/>
+  <input type='hidden' name='roleTypeId' value="${requestParameters.roleTypeId!}"/>
+  <input type='hidden' name='orderTypeId' value='${requestParameters.orderTypeId!}'/>
+  <input type='hidden' name='salesChannelEnumId' value='${requestParameters.salesChannelEnumId!}'/>
+  <input type='hidden' name='productStoreId' value='${requestParameters.productStoreId!}'/>
+  <input type='hidden' name='orderWebSiteId' value='${requestParameters.orderWebSiteId!}'/>
+  <input type='hidden' name='orderStatusId' value='${requestParameters.orderStatusId!}'/>
+  <input type='hidden' name='hasBackOrders' value='${requestParameters.hasBackOrders!}'/>
+  <input type='hidden' name='filterInventoryProblems' value='${requestParameters.filterInventoryProblems!}'/>
+  <input type='hidden' name='filterPartiallyReceivedPOs' value='${requestParameters.filterPartiallyReceivedPOs!}'/>
+  <input type='hidden' name='filterPOsOpenPastTheirETA' value='${requestParameters.filterPOsOpenPastTheirETA!}'/>
+  <input type='hidden' name='filterPOsWithRejectedItems' value='${requestParameters.filterPOsWithRejectedItems!}'/>
+  <input type='hidden' name='countryGeoId' value='${requestParameters.countryGeoId!}'/>
+  <input type='hidden' name='includeCountry' value='${requestParameters.includeCountry!}'/>
+  <input type='hidden' name='isViewed' value='${requestParameters.isViewed!}'/>
+  <input type='hidden' name='shipmentMethod' value='${requestParameters.shipmentMethod!}'/>
+  <input type='hidden' name='gatewayAvsResult' value='${requestParameters.gatewayAvsResult!}'/>
+  <input type='hidden' name='gatewayScoreResult' value='${requestParameters.gatewayScoreResult!}'/>
+</form>
+</#if>
+<form method="post" name="lookuporder" id="lookuporder" action="<@o...@ofbizUrl>" onsubmit="javascript:lookupOrders();">
+<input type="hidden" name="lookupFlag" value="Y"/>
+<input type="hidden" name="hideFields" value="Y"/>
+<input type="hidden" name="viewSize" value="${viewSize}"/>
+<input type="hidden" name="viewIndex" value="${viewIndex}"/>
+
+<div id="findOrders" class="screenlet">
+  <div class="screenlet-title-bar">
+    <ul>
+      <li class="h3">${uiLabelMap.OrderFindOrder}</li>
+      <#if requestParameters.hideFields?default("N") == "Y">
+        <li><a href="javascript:document.lookupandhidefields${requestParameters.hideFields}.submit()">${uiLabelMap.CommonShowLookupFields}</a></li>
+      <#else>
+        <#if orderList??><li><a href="javascript:document.lookupandhidefields${requestParameters.hideFields?default("Y")}.submit()">${uiLabelMap.CommonHideFields}</a></li></#if>
+        <li><a href="/partymgr/control/findparty?externalLoginKey=${requestAttributes.externalLoginKey!}">${uiLabelMap.PartyLookupParty}</a></li>
+        <li><a href="javascript:lookupOrders(true);">${uiLabelMap.OrderLookupOrder}</a></li>
+      </#if>
+    </ul>
+    <br class="clear"/>
+  </div>
+  <#if parameters.hideFields?default("N") != "Y">
+    <div class="screenlet-body">
+      <table class="basic-table" cellspacing='0'>
+        <tr>
+          <td align='center' width='100%'>
+            <table class="basic-table" cellspacing='0'>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.OrderOrderId}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'><input type='text' name='orderId'/></td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.OrderOrderName}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'><input type='text' name='orderName'/></td>
+              </tr>
+             <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.OrderExternalId}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'><input type='text' name='externalId'/></td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.OrderCustomerPo}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'><input type='text' name='correspondingPoId' value='${requestParameters.correspondingPoId!}'/></td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.OrderInternalCode}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'><input type='text' name='internalCode' value='${requestParameters.internalCode!}'/></td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.ProductProductId}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'><input type='text' name='productId' value='${requestParameters.productId!}'/></td>
+              </tr>
+              <#if goodIdentificationTypes?has_content>
+              <tr>
+                  <td width='25%' align='right' class='label'>${uiLabelMap.ProductGoodIdentificationType}</td>
+                  <td width='5%'>&nbsp;</td>
+                  <td align='left'>
+                      <select name='goodIdentificationTypeId'>
+                          <#if currentGoodIdentificationType?has_content>
+                              <option value="${currentGoodIdentificationType.goodIdentificationTypeId}">${currentGoodIdentificationType.get("description", locale)}</option>
+                              <option value="${currentGoodIdentificationType.goodIdentificationTypeId}">---</option>
+                          </#if>
+                          <option value="">${uiLabelMap.ProductAnyGoodIdentification}</option>
+                          <#list goodIdentificationTypes as goodIdentificationType>
+                              <option value="${goodIdentificationType.goodIdentificationTypeId}">${goodIdentificationType.get("description", locale)}</option>
+                          </#list>
+                      </select>
+                  </td>
+              </tr>
+              <tr>
+                  <td width='25%' align='right' class='label'>${uiLabelMap.ProductGoodIdentification}</td>
+                  <td width='5%'>&nbsp;</td>
+                  <td align='left'><input type='text' name='goodIdentificationIdValue' value='${requestParameters.goodIdentificationIdValue!}'/></td>
+              </tr>
+              </#if>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.ProductInventoryItemId}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'><input type='text' name='inventoryItemId' value='${requestParameters.inventoryItemId!}'/></td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.ProductSerialNumber}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'><input type='text' name='serialNumber' value='${requestParameters.serialNumber!}'/></td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.ProductSoftIdentifier}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'><input type='text' name='softIdentifier' value='${requestParameters.softIdentifier!}'/></td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.PartyRoleType}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'>
+                  <select name='roleTypeId' id='roleTypeId' multiple="multiple">
+                    <#if currentRole?has_content>
+                    <option value="${currentRole.roleTypeId}">${currentRole.get("description", locale)}</option>
+                    </#if>
+                    <option value="">${uiLabelMap.CommonAnyRoleType}</option>
+                    <#list roleTypes as roleType>
+                      <option value="${roleType.roleTypeId}">${roleType.get("description", locale)}</option>
+                    </#list>
+                  </select>
+                </td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.PartyPartyId}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'>
+                  <@htmlTemplate.lookupField value='${requestParameters.partyId!}' formName="lookuporder" name="partyId" id="partyId" fieldFormName="LookupPartyName"/>
+                </td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.CommonUserLoginId}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'><input type='text' name='userLoginId' value='${requestParameters.userLoginId!}'/></td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.OrderOrderType}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'>
+                  <select name='orderTypeId'>
+                    <#if currentType?has_content>
+                    <option value="${currentType.orderTypeId}">${currentType.get("description", locale)}</option>
+                    <option value="${currentType.orderTypeId}">---</option>
+                    </#if>
+                    <option value="">${uiLabelMap.OrderAnyOrderType}</option>
+                    <#list orderTypes as orderType>
+                      <option value="${orderType.orderTypeId}">${orderType.get("description", locale)}</option>
+                    </#list>
+                  </select>
+                </td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.AccountingBillingAccount}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'><input type='text' name='billingAccountId' value='${requestParameters.billingAccountId!}'/></td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.CommonCreatedBy}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'><input type='text' name='createdBy' value='${requestParameters.createdBy!}'/></td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.OrderSalesChannel}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'>
+                  <select name='salesChannelEnumId'>
+                    <#if currentSalesChannel?has_content>
+                    <option value="${currentSalesChannel.enumId}">${currentSalesChannel.get("description", locale)}</option>
+                    <option value="${currentSalesChannel.enumId}">---</option>
+                    </#if>
+                    <option value="">${uiLabelMap.CommonAnySalesChannel}</option>
+                    <#list salesChannels as channel>
+                      <option value="${channel.enumId}">${channel.get("description", locale)}</option>
+                    </#list>
+                  </select>
+                </td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.ProductProductStore}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'>
+                  <select name='productStoreId'>
+                    <#if currentProductStore?has_content>
+                    <option value="${currentProductStore.productStoreId}">${currentProductStore.storeName!}</option>
+                    <option value="${currentProductStore.productStoreId}">---</option>
+                    </#if>
+                    <option value="">${uiLabelMap.CommonAnyStore}</option>
+                    <#list productStores as store>
+                      <option value="${store.productStoreId}">${store.storeName!}</option>
+                    </#list>
+                  </select>
+                </td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.ProductWebSite}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'>
+                  <select name='orderWebSiteId'>
+                    <#if currentWebSite?has_content>
+                    <option value="${currentWebSite.webSiteId}">${currentWebSite.siteName}</option>
+                    <option value="${currentWebSite.webSiteId}">---</option>
+                    </#if>
+                    <option value="">${uiLabelMap.CommonAnyWebSite}</option>
+                    <#list webSites as webSite>
+                      <option value="${webSite.webSiteId}">${webSite.siteName!}</option>
+                    </#list>
+                  </select>
+                </td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.CommonStatus}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'>
+                  <select name='orderStatusId'>
+                    <#if currentStatus?has_content>
+                    <option value="${currentStatus.statusId}">${currentStatus.get("description", locale)}</option>
+                    <option value="${currentStatus.statusId}">---</option>
+                    </#if>
+                    <option value="">${uiLabelMap.OrderAnyOrderStatus}</option>
+                    <#list orderStatuses as orderStatus>
+                      <option value="${orderStatus.statusId}">${orderStatus.get("description", locale)}</option>
+                    </#list>
+                  </select>
+                </td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.OrderContainsBackOrders}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'>
+                  <select name='hasBackOrders'>
+                    <#if requestParameters.hasBackOrders?has_content>
+                    <option value="Y">${uiLabelMap.OrderBackOrders}</option>
+                    <option value="Y">---</option>
+                    </#if>
+                    <option value="">${uiLabelMap.CommonShowAll}</option>
+                    <option value="Y">${uiLabelMap.CommonOnly}</option>
+                  </select>
+                </td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.OrderSelectShippingMethod}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'>
+                  <select name="shipmentMethod">
+                    <#if currentCarrierShipmentMethod?has_content>
+                      <#assign currentShipmentMethodType = currentCarrierShipmentMethod.getRelatedOne("ShipmentMethodType", false)>
+                      <option value="${currentCarrierShipmentMethod.partyId}@${currentCarrierShipmentMethod.shipmentMethodTypeId}">${currentCarrierShipmentMethod.partyId!} ${currentShipmentMethodType.description!}</option>
+                      <option value="${currentCarrierShipmentMethod.partyId}@${currentCarrierShipmentMethod.shipmentMethodTypeId}">---</option>
+                    </#if>
+                    <option value="">${uiLabelMap.OrderSelectShippingMethod}</option>
+                    <#list carrierShipmentMethods as carrierShipmentMethod>
+                      <#assign shipmentMethodType = carrierShipmentMethod.getRelatedOne("ShipmentMethodType", false)>
+                      <option value="${carrierShipmentMethod.partyId}@${carrierShipmentMethod.shipmentMethodTypeId}">${carrierShipmentMethod.partyId!} ${shipmentMethodType.description!}</option>
+                    </#list>
+                  </select>
+                </td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.OrderViewed}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'>
+                  <select name="isViewed">
+                    <#if requestParameters.isViewed?has_content>
+                      <#assign isViewed = requestParameters.isViewed>
+                      <option value="${isViewed}"><#if "Y" == isViewed>${uiLabelMap.CommonYes}<#elseif "N" == isViewed>${uiLabelMap.CommonNo}</#if></option>
+                    </#if>
+                    <option value=""></option>
+                    <option value="Y">${uiLabelMap.CommonYes}</option>
+                    <option value="N">${uiLabelMap.CommonNo}</option>
+                  </select>
+                </td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.OrderAddressVerification}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'><input type='text' name='gatewayAvsResult' value='${requestParameters.gatewayAvsResult!}'/></td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.OrderScore}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'><input type='text' name='gatewayScoreResult' value='${requestParameters.gatewayScoreResult!}'/></td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.CommonDateFilter}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'>
+                  <table class="basic-table" cellspacing='0'>
+                    <tr>
+                      <td nowrap="nowrap">
+                        <@htmlTemplate.renderDateTimeField name="minDate" event="" action="" value="${requestParameters.minDate!}" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" size="25" maxlength="30" id="minDate1" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/>
+                        <span class='label'>${uiLabelMap.CommonFrom}</span>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td nowrap="nowrap">
+                        <@htmlTemplate.renderDateTimeField name="maxDate" event="" action="" value="${requestParameters.maxDate!}" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" size="25" maxlength="30" id="maxDate1" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/>
+                        <span class='label'>${uiLabelMap.CommonThru}</span>
+                      </td>
+                    </tr>
+                  </table>
+                </td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.OrderFilterOn} ${uiLabelMap.OrderFilterInventoryProblems}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'>
+                  <table class="basic-table" cellspacing='0'>
+                    <tr>
+                      <td nowrap="nowrap">
+                        <input type="checkbox" name="filterInventoryProblems" value="Y"
+                            <#if requestParameters.filterInventoryProblems?default("N") == "Y">checked="checked"</#if> />
+                      </td>
+                    </tr>
+                  </table>
+                </td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.OrderFilterOn} ${uiLabelMap.OrderFilterPOs} ${uiLabelMap.OrderFilterPartiallyReceivedPOs}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'>
+                  <table class="basic-table" cellspacing='0'>
+                    <tr>
+                      <td nowrap="nowrap">
+                        <input type="checkbox" name="filterPartiallyReceivedPOs" value="Y"
+                            <#if requestParameters.filterPartiallyReceivedPOs?default("N") == "Y">checked="checked"</#if> />
+                      </td>
+                    </tr>
+                  </table>
+                </td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.OrderFilterOn} ${uiLabelMap.OrderFilterPOs} ${uiLabelMap.OrderFilterPOsOpenPastTheirETA}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'>
+                  <table class="basic-table" cellspacing='0'>
+                    <tr>
+                      <td nowrap="nowrap">
+                        <input type="checkbox" name="filterPOsOpenPastTheirETA" value="Y"
+                            <#if requestParameters.filterPOsOpenPastTheirETA?default("N") == "Y">checked="checked"</#if> />
+                      </td>
+                    </tr>
+                  </table>
+                </td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.OrderFilterOn} ${uiLabelMap.OrderFilterPOs} ${uiLabelMap.OrderFilterPOsWithRejectedItems}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'>
+                  <table class="basic-table" cellspacing='0'>
+                    <tr>
+                      <td nowrap="nowrap">
+                        <input type="checkbox" name="filterPOsWithRejectedItems" value="Y"
+                            <#if requestParameters.filterPOsWithRejectedItems?default("N") == "Y">checked="checked"</#if> />
+                      </td>
+                    </tr>
+                  </table>
+                </td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.OrderShipToCountry}</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'>
+                  <select name="countryGeoId">
+                    <#if requestParameters.countryGeoId?has_content>
+                        <#assign countryGeoId = requestParameters.countryGeoId>
+                        <#assign geo = delegator.findOne("Geo", Static["org.ofbiz.base.util.UtilMisc"].toMap("geoId", countryGeoId), true)>
+                        <option value="${countryGeoId}">${geo.geoName!}</option>
+                        <option value="${countryGeoId}">---</option>
+                    <#else>
+                        <option value="">---</option>
+                    </#if>
+                    ${screens.render("component://common/widget/CommonScreens.xml#countries")}
+                  </select>
+                  <select name="includeCountry">
+                    <#if requestParameters.includeCountry?has_content>
+                       <#assign includeCountry = requestParameters.includeCountry>
+                       <option value="${includeCountry}"><#if "Y" == includeCountry>${uiLabelMap.OrderOnlyInclude}<#elseif "N" == includeCountry>${uiLabelMap.OrderDoNotInclude}</#if></option>
+                       <option value="${includeCountry}">---</option>
+                    </#if>
+                    <option value="Y">${uiLabelMap.OrderOnlyInclude}</option>
+                    <option value="N">${uiLabelMap.OrderDoNotInclude}</option>
+                  </select>
+                </td>
+              </tr>
+              <tr>
+                <td width='25%' align='right' class='label'>${uiLabelMap.AccountingPaymentStatus}</td>
+                <td width="5%">&nbsp;</td>
+                <td>
+                    <select name="paymentStatusId">
+                        <option value="">${uiLabelMap.CommonAll}</option>
+                        <#list paymentStatusList as paymentStatus>
+                            <option value="${paymentStatus.statusId}">${paymentStatus.get("description", locale)}</option>
+                        </#list>
+                    </select>
+                </td>
+              </tr>
+              <tr><td colspan="3"><hr /></td></tr>
+              <tr>
+                <td width='25%' align='right'>&nbsp;</td>
+                <td width='5%'>&nbsp;</td>
+                <td align='left'>
+                    <input type="hidden" name="showAll" value="Y"/>
+                    <input type='submit' value='${uiLabelMap.CommonFind}'/>
+                </td>
+              </tr>
+            </table>
+          </td>
+        </tr>
+      </table>
+    </div>
+      </#if>
+</div>
+<input type="image" src="<@o...@ofbizContentUrl>" onclick="javascript:lookupOrders(true);"/>
+</form>
+<#if requestParameters.hideFields?default("N") != "Y">
+<script language="JavaScript" type="text/javascript">
+<!--//
+document.lookuporder.orderId.focus();
+//-->
+</script>
+</#if>
+
+<br />
+
+<div id="findOrdersList" class="screenlet">
+  <div class="screenlet-title-bar">
+    <ul>
+      <li class="h3">${uiLabelMap.OrderOrderFound}</li>
+      <#if (orderList?has_content && 0 < orderList?size)>
+        <#if (orderListSize > highIndex)>
+          <li><a href="javascript:paginateOrderList('${viewSize}', '${viewIndex+1}', '${requestParameters.hideFields?default("N")}')">${uiLabelMap.CommonNext}</a></li>
+        <#else>
+          <li><span class="disabled">${uiLabelMap.CommonNext}</span></li>
+        </#if>
+        <#if (orderListSize > 0)>
+          <li><span>${lowIndex} - ${highIndex} ${uiLabelMap.CommonOf} ${orderListSize}</span></li>
+        </#if>
+        <#if (viewIndex > 1)>
+          <li><a href="javascript:paginateOrderList('${viewSize}', '${viewIndex-1}', '${requestParameters.hideFields?default("N")}')">${uiLabelMap.CommonPrevious}</a></li>
+        <#else>
+          <li><span class="disabled">${uiLabelMap.CommonPrevious}</span></li>
+        </#if>
+      </#if>
+    </ul>
+    <br class="clear" />
+  </div>
+  <div class="screenlet-body">
+    <form name="paginationForm" method="post" action="<@o...@ofbizUrl>">
+      <input type="hidden" name="viewSize"/>
+      <input type="hidden" name="viewIndex"/>
+      <input type="hidden" name="hideFields"/>
+      <#if paramIdList?? && paramIdList?has_content>
+        <#list paramIdList as paramIds>
+          <#assign paramId = paramIds.split("=")/>
+          <input type="hidden" name="${paramId[0]}" value="${paramId[1]}"/>
+        </#list>
+      </#if>
+    </form>
+    <form name="massOrderChangeForm" method="post" action="javascript:void(0);">
+      <div>&nbsp;</div>
+      <div align="right">
+        <input type="hidden" name="screenLocation" value="component://order/widget/ordermgr/OrderPrintScreens.xml#OrderPDF"/>
+        <select name="serviceName" onchange="javascript:setServiceName(this);">
+           <option value="javascript:void(0);">&nbsp;</option>
+           <option value="<@o...@ofbizUrl>">${uiLabelMap.OrderApproveOrder}</option>
+           <option value="<@o...@ofbizUrl>">${uiLabelMap.OrderHold}</option>
+           <option value="<@o...@ofbizUrl>">${uiLabelMap.OrderProcessOrder}</option>
+           <option value="<@o...@ofbizUrl>">${uiLabelMap.OrderCancelOrder}</option>
+           <option value="<@o...@ofbizUrl>">${uiLabelMap.OrderCancelRemainingPOItems}</option>
+           <option value="<@o...@ofbizUrl>">${uiLabelMap.OrderRejectOrder}</option>
+           <option value="<@o...@ofbizUrl>">${uiLabelMap.OrderPickOrders}</option>
+           <option value="<@o...@ofbizUrl>">${uiLabelMap.OrderQuickShipEntireOrder}</option>
+           <option value="<@o...@ofbizUrl>">${uiLabelMap.CommonPrint}</option>
+           <option value="<@o...@ofbizUrl>">${uiLabelMap.ContentCreateFile}</option>
+        </select>
+        <select name="printerName">
+           <option value="javascript:void(0);">&nbsp;</option>
+           <#list printers as printer>
+           <option value="${printer}">${printer}</option>
+           </#list>
+        </select>
+        <a href="javascript:runAction();" class="buttontext">${uiLabelMap.OrderRunAction}</a>
+      </div>
+
+      <table class="basic-table hover-bar" cellspacing='0'>
+        <tr class="header-row">
+          <td width="1%">
+            <input type="checkbox" id="checkAllOrders" name="checkAllOrders" value="1" onchange="javascript:toggleOrderId(this);"/>
+          </td>
+          <td width="5%">${uiLabelMap.OrderOrderType}</td>
+          <td width="5%">${uiLabelMap.OrderOrderId}</td>
+          <td width="15%">${uiLabelMap.OrderOrderName}</td>
+          <td width="20%">${uiLabelMap.PartyName}</td>
+          <td width="5%" align="right">${uiLabelMap.OrderSurvey}</td>
+          <td width="5%" align="right">${uiLabelMap.OrderItemsOrdered}</td>
+          <td width="5%" align="right">${uiLabelMap.OrderItemsBackOrdered}</td>
+          <td width="5%" align="right">${uiLabelMap.OrderItemsReturned}</td>
+          <td width="10%" align="right">${uiLabelMap.OrderRemainingSubTotal}</td>
+          <td width="10%" align="right">${uiLabelMap.OrderOrderTotal}</td>
+          <td width="5%">&nbsp;</td>
+            <#if (requestParameters.filterInventoryProblems?default("N") == "Y") || (requestParameters.filterPOsOpenPastTheirETA?default("N") == "Y") || (requestParameters.filterPOsWithRejectedItems?default("N") == "Y") || (requestParameters.filterPartiallyReceivedPOs?default("N") == "Y")>
+              <td width="10%">${uiLabelMap.CommonStatus}</td>
+              <td width="5%">${uiLabelMap.CommonFilter}</td>
+            <#else>
+              <td width="15%">${uiLabelMap.CommonStatus}</td>
+            </#if>
+          <td width="20%">${uiLabelMap.OrderDate}</td>
+          <td width="5%">${uiLabelMap.PartyPartyId}</td>
+          <td width="10%">&nbsp;</td>
+        </tr>
+        <#if orderList?has_content>
+          <#assign alt_row = false>
+          <#list orderList as orderHeader>
+            <#assign orh = Static["org.ofbiz.order.order.OrderReadHelper"].getHelper(orderHeader)>
+            <#assign statusItem = orderHeader.getRelatedOne("StatusItem", true)>
+            <#assign orderType = orderHeader.getRelatedOne("OrderType", true)>
+            <#if orderType.orderTypeId == "PURCHASE_ORDER">
+              <#assign displayParty = orh.getSupplierAgent()!>
+            <#else>
+              <#assign displayParty = orh.getPlacingParty()!>
+            </#if>
+            <#assign partyId = displayParty.partyId?default("_NA_")>
+            <tr valign="middle"<#if alt_row> class="alternate-row"</#if>>
+              <td>
+                 <input type="checkbox" name="orderIdList" value="${orderHeader.orderId}" onchange="javascript:toggleOrderIdList();"/>
+              </td>
+              <td>${orderType.get("description",locale)?default(orderType.orderTypeId?default(""))}</td>
+              <td><a href="<@o...@ofbizUrl>" class='buttontext'>${orderHeader.orderId}</a></td>
+              <#if orderHeader.orderName?has_content>
+                <td><a href="<@o...@ofbizUrl>" class='buttontext'>${orderHeader.orderName}</a></td>
+              <#else>  
+                <td></td>
+              </#if>  
+              <td>
+                <div>
+                  <#if displayParty?has_content>
+                      <#assign displayPartyNameResult = dispatcher.runSync("getPartyNameForDate", Static["org.ofbiz.base.util.UtilMisc"].toMap("partyId", displayParty.partyId, "compareDate", orderHeader.orderDate, "userLogin", userLogin))/>
+                      ${displayPartyNameResult.fullName?default("[${uiLabelMap.OrderPartyNameNotFound}]")}
+                  <#else>
+                    ${uiLabelMap.CommonNA}
+                  </#if>
+                </div>
+                <#--
+                <div>
+                <#if placingParty?has_content>
+                  <#assign partyId = placingParty.partyId>
+                  <#if placingParty.getEntityName() == "Person">
+                    <#if placingParty.lastName??>
+                      ${placingParty.lastName}<#if placingParty.firstName??>, ${placingParty.firstName}</#if>
+                    <#else>
+                      ${uiLabelMap.CommonNA}
+                    </#if>
+                  <#else>
+                    <#if placingParty.groupName??>
+                      ${placingParty.groupName}
+                    <#else>
+                      ${uiLabelMap.CommonNA}
+                    </#if>
+                  </#if>
+                <#else>
+                  ${uiLabelMap.CommonNA}
+                </#if>
+                </div>
+                -->
+              </td>
+              <td align="right">${orh.hasSurvey()?string.number}</td>
+              <td align="right">${orh.getTotalOrderItemsQuantity()?string.number}</td>
+              <td align="right">${orh.getOrderBackorderQuantity()?string.number}</td>
+              <td align="right">${orh.getOrderReturnedQuantity()?string.number}</td>
+              <td align="right"><@ofbizCurrency amount=orderHeader.remainingSubTotal isoCode=orh.getCurrency()/></td>
+              <td align="right"><@ofbizCurrency amount=orderHeader.grandTotal isoCode=orh.getCurrency()/></td>
+
+              <td>&nbsp;</td>
+              <td>${statusItem.get("description",locale)?default(statusItem.statusId?default("N/A"))}</td>
+              </td>
+              <#if (requestParameters.filterInventoryProblems?default("N") == "Y") || (requestParameters.filterPOsOpenPastTheirETA?default("N") == "Y") || (requestParameters.filterPOsWithRejectedItems?default("N") == "Y") || (requestParameters.filterPartiallyReceivedPOs?default("N") == "Y")>
+                  <td>
+                      <#if filterInventoryProblems.contains(orderHeader.orderId)>
+                        Inv&nbsp;
+                      </#if>
+                      <#if filterPOsOpenPastTheirETA.contains(orderHeader.orderId)>
+                        ETA&nbsp;
+                      </#if>
+                      <#if filterPOsWithRejectedItems.contains(orderHeader.orderId)>
+                        Rej&nbsp;
+                      </#if>
+                      <#if filterPartiallyReceivedPOs.contains(orderHeader.orderId)>
+                        Part&nbsp;
+                      </#if>
+                  </td>
+              </#if>
+              <td>${orderHeader.getString("orderDate")}</td>
+              <td>
+                <#if partyId != "_NA_">
+                  <a href="${customerDetailLink}${partyId}" class="buttontext">${partyId}</a>
+                <#else>
+                  ${uiLabelMap.CommonNA}
+                </#if>
+              </td>
+              <td align='right'>
+                <a href="<@o...@ofbizUrl>" class='buttontext'>${uiLabelMap.CommonView}</a>
+              </td>
+            </tr>
+            <#-- toggle the row color -->
+            <#assign alt_row = !alt_row>
+          </#list>
+        <#else>
+          <tr>
+            <td colspan='4'><h3>${uiLabelMap.OrderNoOrderFound}</h3></td>
+          </tr>
+        </#if>
+        <#if lookupErrorMessage??>
+          <tr>
+            <td colspan='4'><h3>${lookupErrorMessage}</h3></td>
+          </tr>
+        </#if>
+      </table>
+    </form>
+  </div>
+</div>
+<#else>
+  <h3>${uiLabelMap.OrderViewPermissionError}</h3>
+</#if>

Propchange: ofbiz/trunk/applications/order/template/order/findOrders.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/order/template/order/findOrders.ftl
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/order/template/order/findOrders.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/applications/order/template/order/orderReportBody.fo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/template/order/orderReportBody.fo.ftl?rev=1736868&view=auto
==============================================================================
--- ofbiz/trunk/applications/order/template/order/orderReportBody.fo.ftl (added)
+++ ofbiz/trunk/applications/order/template/order/orderReportBody.fo.ftl Mon Mar 28 11:14:22 2016
@@ -0,0 +1,217 @@
+<#--
+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.
+-->
+<#escape x as x?xml>
+    <#if orderHeader?has_content>
+        <fo:table table-layout="fixed" border-spacing="3pt">
+            <fo:table-column column-width="3in"/>
+            <fo:table-column column-width="1in"/>
+            <fo:table-column column-width="1in"/>
+            <fo:table-column column-width="1in"/>
+            <fo:table-column column-width="1in"/>
+            <fo:table-header>
+                <fo:table-row>
+                    <fo:table-cell>
+                        <fo:block font-weight="bold">${uiLabelMap.OrderProduct}</fo:block>
+                    </fo:table-cell>
+                    <fo:table-cell><fo:block></fo:block></fo:table-cell>
+                    <fo:table-cell text-align="right">
+                        <fo:block font-weight="bold">${uiLabelMap.OrderQuantity}</fo:block>
+                    </fo:table-cell>
+                    <fo:table-cell text-align="right">
+                        <fo:block font-weight="bold">${uiLabelMap.OrderUnitList}</fo:block>
+                    </fo:table-cell>
+                    <fo:table-cell text-align="right">
+                        <fo:block font-weight="bold">${uiLabelMap.OrderSubTotal}</fo:block>
+                    </fo:table-cell>
+                </fo:table-row>
+            </fo:table-header>
+            <fo:table-body>
+                <#list orderItemList as orderItem>
+                    <#assign orderItemType = orderItem.getRelatedOne("OrderItemType", false)!>
+                    <#assign productId = orderItem.productId!>
+                    <#assign remainingQuantity = (orderItem.quantity?default(0) - orderItem.cancelQuantity?default(0))>
+                    <#assign itemAdjustment = Static["org.ofbiz.order.order.OrderReadHelper"].getOrderItemAdjustmentsTotal(orderItem, orderAdjustments, true, false, false)>
+                    <#assign internalImageUrl = Static["org.ofbiz.product.imagemanagement.ImageManagementHelper"].getInternalImageUrl(request, productId!)!>
+                    <fo:table-row>
+                        <fo:table-cell>
+                            <fo:block>
+                                <#if orderItem.supplierProductId?has_content>
+                                    ${orderItem.supplierProductId} - ${orderItem.itemDescription!}
+                                <#elseif productId??>
+                                    ${orderItem.productId?default("N/A")} - ${orderItem.itemDescription!}
+                                <#elseif orderItemType??>
+                                    ${orderItemType.get("description",locale)} - ${orderItem.itemDescription!}
+                                <#else>
+                                    ${orderItem.itemDescription!}
+                                </#if>
+                            </fo:block>
+                        </fo:table-cell>
+                        <fo:table-cell>
+                            <fo:block>
+                                <#if orderHeader.orderTypeId == "PURCHASE_ORDER">
+                                    <#if internalImageUrl?has_content>
+                                        <fo:external-graphic src="${internalImageUrl}" overflow="hidden" content-width="100"/>
+                                    </#if>
+                                </#if>
+                            </fo:block>
+                        </fo:table-cell>
+                        <fo:table-cell text-align="right">
+                            <fo:block>${remainingQuantity}</fo:block>
+                        </fo:table-cell>
+                        <fo:table-cell text-align="right">
+                            <fo:block><@ofbizCurrency amount=orderItem.unitPrice isoCode=currencyUomId/></fo:block>
+                        </fo:table-cell>
+                        <fo:table-cell text-align="right">
+                            <fo:block>
+                                <#if orderItem.statusId != "ITEM_CANCELLED">
+                                    <@ofbizCurrency amount=Static["org.ofbiz.order.order.OrderReadHelper"].getOrderItemSubTotal(orderItem, orderAdjustments) isoCode=currencyUomId/>
+                                <#else>
+                                    <@ofbizCurrency amount=0.00 isoCode=currencyUomId/>
+                                </#if>
+                            </fo:block>
+                        </fo:table-cell>
+                    </fo:table-row>
+                    <#if itemAdjustment != 0>
+                        <fo:table-row>
+                            <fo:table-cell number-columns-spanned="2">
+                                <fo:block text-indent="0.2in">
+                                    <fo:inline font-style="italic">${uiLabelMap.OrderAdjustments}</fo:inline>
+                                    : <@ofbizCurrency amount=itemAdjustment isoCode=currencyUomId/>
+                                </fo:block>
+                            </fo:table-cell>
+                        </fo:table-row>
+                    </#if>
+                </#list>
+                <#list orderHeaderAdjustments as orderHeaderAdjustment>
+                    <#assign adjustmentType = orderHeaderAdjustment.getRelatedOne("OrderAdjustmentType", false)>
+                    <#assign adjustmentAmount = Static["org.ofbiz.order.order.OrderReadHelper"].calcOrderAdjustment(orderHeaderAdjustment, orderSubTotal)>
+                    <#if adjustmentAmount != 0>
+                        <fo:table-row>
+                            <fo:table-cell><fo:block></fo:block></fo:table-cell>
+                            <fo:table-cell><fo:block></fo:block></fo:table-cell>
+                            <fo:table-cell number-columns-spanned="2">
+                                <fo:block font-weight="bold">
+                                    ${adjustmentType.get("description",locale)} :
+                                    <#if orderHeaderAdjustment.get("description")?has_content>
+                                        (${orderHeaderAdjustment.get("description")!})
+                                    </#if>
+                                </fo:block>
+                            </fo:table-cell>
+                            <fo:table-cell text-align="right">
+                                <fo:block><@ofbizCurrency amount=adjustmentAmount isoCode=currencyUomId/></fo:block>
+                            </fo:table-cell>
+                        </fo:table-row>
+                    </#if>
+                </#list>
+                <#-- summary of order amounts -->
+                <fo:table-row>
+                    <fo:table-cell><fo:block></fo:block></fo:table-cell>
+                    <fo:table-cell><fo:block></fo:block></fo:table-cell>
+                    <fo:table-cell number-columns-spanned="2">
+                        <fo:block font-weight="bold">${uiLabelMap.OrderItemsSubTotal}</fo:block>
+                    </fo:table-cell>
+                    <fo:table-cell text-align="right">
+                        <fo:block><@ofbizCurrency amount=orderSubTotal isoCode=currencyUomId/></fo:block>
+                    </fo:table-cell>
+                </fo:table-row>
+                <#if otherAdjAmount != 0>
+                    <fo:table-row>
+                        <fo:table-cell><fo:block></fo:block></fo:table-cell>
+                        <fo:table-cell><fo:block></fo:block></fo:table-cell>
+                        <fo:table-cell number-columns-spanned="2">
+                            <fo:block font-weight="bold">${uiLabelMap.OrderTotalOtherOrderAdjustments}</fo:block>
+                        </fo:table-cell>
+                        <fo:table-cell text-align="right">
+                            <fo:block><@ofbizCurrency amount=otherAdjAmount isoCode=currencyUomId/></fo:block>
+                        </fo:table-cell>
+                    </fo:table-row>
+                </#if>
+                <#if shippingAmount != 0>
+                    <fo:table-row>
+                        <fo:table-cell><fo:block></fo:block></fo:table-cell>
+                        <fo:table-cell><fo:block></fo:block></fo:table-cell>
+                        <fo:table-cell number-columns-spanned="2">
+                            <fo:block font-weight="bold">${uiLabelMap.OrderTotalShippingAndHandling}</fo:block>
+                        </fo:table-cell>
+                        <fo:table-cell text-align="right">
+                            <fo:block><@ofbizCurrency amount=shippingAmount isoCode=currencyUomId/></fo:block>
+                        </fo:table-cell>
+                    </fo:table-row>
+                </#if>
+                <#if taxAmount != 0>
+                    <fo:table-row>
+                        <fo:table-cell><fo:block></fo:block></fo:table-cell>
+                        <fo:table-cell><fo:block></fo:block></fo:table-cell>
+                        <fo:table-cell number-columns-spanned="2">
+                            <fo:block font-weight="bold">${uiLabelMap.OrderTotalSalesTax}</fo:block>
+                        </fo:table-cell>
+                        <fo:table-cell text-align="right">
+                            <fo:block><@ofbizCurrency amount=taxAmount isoCode=currencyUomId/></fo:block>
+                        </fo:table-cell>
+                    </fo:table-row>
+                </#if>
+                <#if grandTotal != 0>
+                    <fo:table-row>
+                        <fo:table-cell><fo:block></fo:block></fo:table-cell>
+                        <fo:table-cell><fo:block></fo:block></fo:table-cell>
+                        <fo:table-cell number-columns-spanned="2" background-color="#EEEEEE">
+                            <fo:block font-weight="bold">${uiLabelMap.OrderTotalDue}</fo:block>
+                        </fo:table-cell>
+                        <fo:table-cell text-align="right">
+                            <fo:block><@ofbizCurrency amount=grandTotal isoCode=currencyUomId/></fo:block>
+                        </fo:table-cell>
+                    </fo:table-row>
+                </#if>
+                <#-- notes -->
+                <#if orderNotes?has_content>
+                    <#if showNoteHeadingOnPDF>
+                        <fo:table-row>
+                            <fo:table-cell number-columns-spanned="3">
+                                <fo:block font-weight="bold">${uiLabelMap.OrderNotes}</fo:block>
+                                <fo:block>
+                                    <fo:leader leader-length="19cm" leader-pattern="rule"/>
+                                </fo:block>
+                            </fo:table-cell>
+                        </fo:table-row>
+                    </#if>
+                    <#list orderNotes as note>
+                        <#if (note.internalNote?has_content) && (note.internalNote != "Y")>
+                            <fo:table-row>
+                                <fo:table-cell number-columns-spanned="1">
+                                    <fo:block>${note.noteInfo!}</fo:block>
+                                </fo:table-cell>
+                                <fo:table-cell number-columns-spanned="2">
+                                    <fo:block>
+                                    <#if note.noteParty?has_content>
+                                        <#assign notePartyNameResult = dispatcher.runSync("getPartyNameForDate", Static["org.ofbiz.base.util.UtilMisc"].toMap("partyId", note.noteParty, "compareDate", note.noteDateTime, "lastNameFirst", "Y", "userLogin", userLogin))/>
+                                        ${uiLabelMap.CommonBy}: ${notePartyNameResult.fullName?default("${uiLabelMap.OrderPartyNameNotFound}")}
+                                    </#if>
+                                    </fo:block>
+                                </fo:table-cell>
+                                <fo:table-cell number-columns-spanned="1">
+                                    <fo:block>${uiLabelMap.CommonAt}: ${note.noteDateTime?string!}</fo:block>
+                                </fo:table-cell>
+                            </fo:table-row>
+                        </#if>
+                    </#list>
+                </#if>
+            </fo:table-body>
+        </fo:table>
+    </#if>
+</#escape>

Propchange: ofbiz/trunk/applications/order/template/order/orderReportBody.fo.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/order/template/order/orderReportBody.fo.ftl
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/order/template/order/orderReportBody.fo.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain