svn commit: r1822393 - in /ofbiz/ofbiz-framework/trunk/applications/product: groovyScripts/facility/inventory/ReceiveInventory.groovy template/inventory/ReceiveInventory.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1822393 - in /ofbiz/ofbiz-framework/trunk/applications/product: groovyScripts/facility/inventory/ReceiveInventory.groovy template/inventory/ReceiveInventory.ftl

Arun Patidar-4
Author: arunpatidar
Date: Sat Jan 27 11:44:05 2018
New Revision: 1822393

URL: http://svn.apache.org/viewvc?rev=1822393&view=rev
Log:
Improved: Completed Service Order Items are being allowed to be received along with finished goods over Approved PO. (OFBIZ-7183)
Thanks Ankush Upadhyay and Swapnil Shah for your contribution.

Modified:
    ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/facility/inventory/ReceiveInventory.groovy
    ofbiz/ofbiz-framework/trunk/applications/product/template/inventory/ReceiveInventory.ftl

Modified: ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/facility/inventory/ReceiveInventory.groovy
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/facility/inventory/ReceiveInventory.groovy?rev=1822393&r1=1822392&r2=1822393&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/facility/inventory/ReceiveInventory.groovy (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/facility/inventory/ReceiveInventory.groovy Sat Jan 27 11:44:05 2018
@@ -130,7 +130,7 @@ if (purchaseOrder) {
     } else {
         purchaseOrderItems = purchaseOrder.getRelated("OrderItem", null, null, false)
     }
-    purchaseOrderItems = EntityUtil.filterByAnd(purchaseOrderItems, [EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ITEM_CANCELLED")])
+    purchaseOrderItems = EntityUtil.filterByAnd(purchaseOrderItems, [EntityCondition.makeCondition("statusId", EntityOperator.NOT_IN, ["ITEM_CANCELLED", "ITEM_COMPLETED"])])
 }
 // convert the unit prices to that of the facility owner's currency
 orderCurrencyUnitPriceMap = [:]

Modified: ofbiz/ofbiz-framework/trunk/applications/product/template/inventory/ReceiveInventory.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/template/inventory/ReceiveInventory.ftl?rev=1822393&r1=1822392&r2=1822393&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/template/inventory/ReceiveInventory.ftl (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/template/inventory/ReceiveInventory.ftl Sat Jan 27 11:44:05 2018
@@ -373,7 +373,12 @@ under the License.
                   </td>
                 </tr>
                 <#list purchaseOrderItems as orderItem>
-                  <#assign defaultQuantity = orderItem.quantity - receivedQuantities[orderItem.orderItemSeqId]?double/>
+                    <#if orderItem.cancelQuantity?has_content>
+                      <#assign cancelQuantity = orderItem.cancelQuantity>
+                    <#else>
+                      <#assign cancelQuantity = 0>
+                    </#if>
+                  <#assign defaultQuantity = orderItem.quantity - cancelQuantity - receivedQuantities[orderItem.orderItemSeqId]?double/>
                   <#assign itemCost = orderItem.unitPrice?default(0)/>
                   <#assign salesOrderItem = salesOrderItems[orderItem.orderItemSeqId]!/>
                   <#if shipment?has_content>