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 2013/12/11 21:48:31 UTC

svn commit: r1550255 - /ofbiz/trunk/applications/order/webapp/ordermgr/order/editorderitems.ftl

Author: jleroux
Date: Wed Dec 11 20:48:30 2013
New Revision: 1550255

URL: http://svn.apache.org/r1550255
Log:
A patch from Christian Carlow for "Cancelled ship groups show incorrect quantities on edit order items page" https://issues.apache.org/jira/browse/OFBIZ-5405

Cancelled ship groups show incorrect quantities on the edit order items page.  I cancelled a ship group with a quantity of 2 for an order item but the quantity was still set to 2 when entering edit mode again.  Because its not set to 0 or blank, all cancelled ship groups must manually be set to one of those values in order for the quantity not to be added back after updating the order items.

This patch resolves the problem. It calculates the ship group quantity with OrderItemShipGroupAssoc.quantity - OrderItemShipGroupAssoc.cancelQuantity in editorderitems.ftl


Modified:
    ofbiz/trunk/applications/order/webapp/ordermgr/order/editorderitems.ftl

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/order/editorderitems.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/editorderitems.ftl?rev=1550255&r1=1550254&r2=1550255&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/editorderitems.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/editorderitems.ftl Wed Dec 11 20:48:30 2013
@@ -242,6 +242,7 @@ under the License.
                       <#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)?if_exists>
                               <tr>
@@ -249,7 +250,7 @@ under the License.
                                       <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="${shipGroupAssoc.quantity?string.number}"/>
+                                      <input type="text" name="iqm_${shipGroupAssoc.orderItemSeqId}:${shipGroupAssoc.shipGroupSeqId}" size="6" value="${shipGroupQty?string.number}"/>
                                   </td>
                                   <td colspan="4">&nbsp;</td>
                                   <td>