Author: jleroux
Date: Mon May 23 20:56:20 2016
New Revision: 1745272
URL:
http://svn.apache.org/viewvc?rev=1745272&view=revLog:
A patch from Akash Jain for "Remaining quantity should be ZERO for completed order items"
https://issues.apache.org/jira/browse/OFBIZ-7093There are the steps:
-- Initiate sales order.
-- Add service product (ex. sv-1000) in the cart
-- Place order and mark approved.
-- Order item of service product will be completed but Remaining quantity still ONE (attaching screen-shot).
Expected Result:
-- Order item of service product should be completed (working)
-- Remaining quantity should be ZERO (need to fix)
Modified:
ofbiz/trunk/applications/order/template/order/OrderItems.ftl
Modified: ofbiz/trunk/applications/order/template/order/OrderItems.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/template/order/OrderItems.ftl?rev=1745272&r1=1745271&r2=1745272&view=diff==============================================================================
--- ofbiz/trunk/applications/order/template/order/OrderItems.ftl (original)
+++ ofbiz/trunk/applications/order/template/order/OrderItems.ftl Mon May 23 20:56:20 2016
@@ -242,6 +242,10 @@ under the License.
</#if>
</#list>
</#if>
+ <#if product.productTypeId == "SERVICE" && currentItemStatus.statusId == "ITEM_COMPLETED">
+ <#assign shippedQuantity = orderItem.quantity?default(0)/>
+ <#assign totalReceived = orderItem.quantity?default(0)>
+ </#if>
<#if orderHeader.orderTypeId == "PURCHASE_ORDER">
<#assign remainingQuantity = ((orderItem.quantity?default(0) - orderItem.cancelQuantity?default(0)) - totalReceived?double)>
<#else>