svn commit: r1744919 - in /ofbiz/trunk/applications/product: servicedef/ src/org/ofbiz/product/inventory/ webapp/facility/WEB-INF/actions/facility/ widget/facility/

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

svn commit: r1744919 - in /ofbiz/trunk/applications/product: servicedef/ src/org/ofbiz/product/inventory/ webapp/facility/WEB-INF/actions/facility/ widget/facility/

ashish-18
Author: ashish
Date: Sat May 21 12:05:57 2016
New Revision: 1744919

URL: http://svn.apache.org/viewvc?rev=1744919&view=rev
Log:
Applied patch from jira issue - OFBIZ-5291 - show quantityUom in InventoryByProduct.
Thanks Pierre for creating the issue and Thanks Yashwant for providing the patch.

Modified:
    ofbiz/trunk/applications/product/servicedef/services_facility.xml
    ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.groovy
    ofbiz/trunk/applications/product/widget/facility/FacilityForms.xml

Modified: ofbiz/trunk/applications/product/servicedef/services_facility.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_facility.xml?rev=1744919&r1=1744918&r2=1744919&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/servicedef/services_facility.xml (original)
+++ ofbiz/trunk/applications/product/servicedef/services_facility.xml Sat May 21 12:05:57 2016
@@ -258,6 +258,7 @@ under the License.
         <attribute name="productId" type="String" mode="IN" optional="false"/>
         <attribute name="minimumStock" mode="IN" type="BigDecimal" optional="true"/>
         <attribute name="statusId" type="String" mode="IN" optional="true"/>
+        <attribute name="quantityUomId" type="String" mode="OUT" optional="true"/>
         <attribute name="totalQuantityOnHand" mode="OUT" type="BigDecimal" optional="true"/>
         <attribute name="totalAvailableToPromise" mode="OUT" type="BigDecimal" optional="true"/>
         <attribute name="quantityOnOrder" mode="OUT" type="BigDecimal" optional="true"/>

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java?rev=1744919&r1=1744918&r2=1744919&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java Sat May 21 12:05:57 2016
@@ -886,7 +886,6 @@ public class InventoryServices {
         }
         // filter for quantities
         minimumStock = minimumStock != null ? minimumStock : BigDecimal.ZERO;
-
         BigDecimal quantityOnHandTotal = BigDecimal.ZERO;
         if (resultOutput.get("quantityOnHandTotal") != null) {
             quantityOnHandTotal = (BigDecimal)resultOutput.get("quantityOnHandTotal");
@@ -903,7 +902,7 @@ public class InventoryServices {
         result.put("totalQuantityOnHand", resultOutput.get("quantityOnHandTotal"));
         result.put("totalAvailableToPromise", resultOutput.get("availableToPromiseTotal"));
         result.put("quantityOnOrder", quantityOnOrder);
-
+        result.put("quantityUomId", product.getString("quantityUomId"));
         result.put("offsetQOHQtyAvailable", offsetQOHQtyAvailable);
         result.put("offsetATPQtyAvailable", offsetATPQtyAvailable);
 

Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.groovy?rev=1744919&r1=1744918&r2=1744919&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.groovy Sat May 21 12:05:57 2016
@@ -171,7 +171,7 @@ if (action) {
         oneInventory.minimumStock = minimumStock;
         oneInventory.reorderQuantity = oneProd.reorderQuantity;
         oneInventory.daysToShip = oneProd.daysToShip;
-
+        
         resultMap =runService('getProductInventoryAndFacilitySummary', [productId : oneProd.productId, minimumStock : minimumStock, facilityId : oneProd.facilityId, checkTime : checkTime, statusId : statusId]);
         if (resultMap) {
             oneInventory.totalAvailableToPromise = resultMap.totalAvailableToPromise;
@@ -179,6 +179,7 @@ if (action) {
             oneInventory.quantityOnOrder = resultMap.quantityOnOrder;
             oneInventory.offsetQOHQtyAvailable = resultMap.offsetQOHQtyAvailable;
             oneInventory.offsetATPQtyAvailable = resultMap.offsetATPQtyAvailable;
+            oneInventory.quantityUom = resultMap.quantityUomId;
             oneInventory.usageQuantity = resultMap.usageQuantity;
             oneInventory.defaultPrice = resultMap.defaultPrice;
             oneInventory.listPrice = resultMap.listPrice;

Modified: ofbiz/trunk/applications/product/widget/facility/FacilityForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/FacilityForms.xml?rev=1744919&r1=1744918&r2=1744919&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/facility/FacilityForms.xml (original)
+++ ofbiz/trunk/applications/product/widget/facility/FacilityForms.xml Sat May 21 12:05:57 2016
@@ -468,6 +468,9 @@ under the License.
         <field name="daysToShip" title="${uiLabelMap.ProductDaysToShip}"><display/></field>
         <field name="offsetQOHQtyAvailable" title="${uiLabelMap.ProductQtyOffsetQOH}"><display/></field>
         <field name="offsetATPQtyAvailable" title="${uiLabelMap.ProductQtyOffsetATP}"><display/></field>
+        <field name="quantityUom" title="Quantity Uom">
+            <display-entity entity-name="Uom" key-field-name="uomId" description="${abbreviation}"/>
+        </field>
         <field name="usageQuantity" title="${uiLabelMap.ProductUsage}"><display/></field>
         <field name="defaultPrice" title="${uiLabelMap.ProductDefaultPrice}"><display/></field>
         <field name="listPrice" title="${uiLabelMap.ProductListPrice}"><display/></field>