You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2009/06/17 13:00:14 UTC

svn commit: r785551 - in /ofbiz/trunk/applications/product/webapp/facility: WEB-INF/actions/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy shipment/ReceiveInventoryAgainstPurchaseOrder.ftl

Author: ashish
Date: Wed Jun 17 11:00:13 2009
New Revision: 785551

URL: http://svn.apache.org/viewvc?rev=785551&view=rev
Log:
Applied patch from jira issue OFBIZ-2621 (Bug in Facility Manager > Shipments > Receive Against PO screen).
Thanks Mridul for the contribution.

Modified:
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy
    ofbiz/trunk/applications/product/webapp/facility/shipment/ReceiveInventoryAgainstPurchaseOrder.ftl

Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy?rev=785551&r1=785550&r2=785551&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy Wed Jun 17 11:00:13 2009
@@ -171,7 +171,7 @@
     // Retrieve the backordered quantity
     // TODO: limit to a facility? The shipment destination facility is not necessarily the same facility as the inventory
     conditions = [EntityCondition.makeCondition("productId", EntityOperator.EQUALS, product.productId),
-                  EntityCondition.makeCondition("availableToPromiseTotal", EntityOperator.LESS_THAN, new Double(0))];
+                  EntityCondition.makeCondition("availableToPromiseTotal", EntityOperator.LESS_THAN, BigDecimal.ZERO)];
     negativeInventoryItems = delegator.findList("InventoryItem",  EntityCondition.makeCondition(conditions, EntityOperator.AND), null, null, null, false);
     backOrderedQuantity = 0;
     negativeInventoryItems.each { negativeInventoryItem ->

Modified: ofbiz/trunk/applications/product/webapp/facility/shipment/ReceiveInventoryAgainstPurchaseOrder.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/shipment/ReceiveInventoryAgainstPurchaseOrder.ftl?rev=785551&r1=785550&r2=785551&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/shipment/ReceiveInventoryAgainstPurchaseOrder.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/facility/shipment/ReceiveInventoryAgainstPurchaseOrder.ftl Wed Jun 17 11:00:13 2009
@@ -40,21 +40,30 @@
         <br class="clear"/>
     </div>
     <div class="screenlet-body">
-    <div class="errorMessage">
-        <#if ! isPurchaseShipment>
+    
+    <#if ! isPurchaseShipment>
+        <div class="errorMessage">
             <#assign uiLabelWithVar=uiLabelMap.ProductErrorShipmentNotPurchaseShipment?interpret><@uiLabelWithVar/>
-        <#elseif orderId?has_content && !orderHeader?exists>
+        </div>
+    <#elseif orderId?has_content && !orderHeader?exists>
+        <div class="errorMessage">
             <#assign uiLabelWithVar=uiLabelMap.ProductErrorOrderIdNotFound?interpret><@uiLabelWithVar/>
-        <#elseif orderHeader?exists && orderHeader.orderTypeId != "PURCHASE_ORDER">
+        </div>
+    <#elseif orderHeader?exists && orderHeader.orderTypeId != "PURCHASE_ORDER">
+        <div class="errorMessage">
             <#assign uiLabelWithVar=uiLabelMap.ProductErrorOrderNotPurchaseOrder?interpret><@uiLabelWithVar/>
-        <#elseif ProductReceiveInventoryAgainstPurchaseOrderProductNotFound?exists>
+        </div>
+    <#elseif ProductReceiveInventoryAgainstPurchaseOrderProductNotFound?exists>
+        <div class="errorMessage">
             <#assign uiLabelWithVar=uiLabelMap.ProductReceiveInventoryAgainstPurchaseOrderProductNotFound?interpret><@uiLabelWithVar/>
             <script type="text/javascript">window.onload=function(){alert('<@uiLabelWithVar/>')};</script>
-        <#elseif ProductReceiveInventoryAgainstPurchaseOrderQuantityExceedsAvailableToReceive?exists>
+        </div>
+    <#elseif ProductReceiveInventoryAgainstPurchaseOrderQuantityExceedsAvailableToReceive?exists>
+        <div class="errorMessage">
             <#assign uiLabelWithVar=uiLabelMap.ProductReceiveInventoryAgainstPurchaseOrderQuantityExceedsAvailableToReceive?interpret><@uiLabelWithVar/>
             <script type="text/javascript">window.onload=function(){alert('<@uiLabelWithVar/>')};</script>
-        </#if>
-    </div>
+        </div>
+    </#if>
     <#if ProductReceiveInventoryAgainstPurchaseOrderQuantityGoesToBackOrder?exists>
         <div class="errorMessage" style="color:green">
             <#assign uiLabelWithVar=uiLabelMap.ProductReceiveInventoryAgainstPurchaseOrderQuantityGoesToBackOrder?interpret><@uiLabelWithVar/>