Author: ashish
Date: Sat May 21 12:16:46 2016
New Revision: 1744923
URL: http://svn.apache.org/viewvc?rev=1744923&view=rev
Log:
Applied fix from trunk r1744919.
===============================================
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/branches/release14.12/applications/product/servicedef/services_facility.xml
ofbiz/branches/release14.12/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java
ofbiz/branches/release14.12/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.groovy
ofbiz/branches/release14.12/applications/product/widget/facility/FacilityForms.xml
Modified:
ofbiz/branches/release14.12/applications/product/servicedef/services_facility.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/product/servicedef/services_facility.xml?rev=1744923&r1=1744922&r2=1744923&view=diff
==============================================================================
---
ofbiz/branches/release14.12/applications/product/servicedef/services_facility.xml
(original)
+++
ofbiz/branches/release14.12/applications/product/servicedef/services_facility.xml
Sat May 21 12:16:46 2016
@@ -259,6 +259,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/branches/release14.12/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java?rev=1744923&r1=1744922&r2=1744923&view=diff
==============================================================================
---
ofbiz/branches/release14.12/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java
(original)
+++
ofbiz/branches/release14.12/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java
Sat May 21 12:16:46 2016
@@ -888,7 +888,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");
@@ -905,7 +904,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/branches/release14.12/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.groovy?rev=1744923&r1=1744922&r2=1744923&view=diff
==============================================================================
---
ofbiz/branches/release14.12/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.groovy
(original)
+++
ofbiz/branches/release14.12/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.groovy
Sat May 21 12:16:46 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/branches/release14.12/applications/product/widget/facility/FacilityForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/product/widget/facility/FacilityForms.xml?rev=1744923&r1=1744922&r2=1744923&view=diff
==============================================================================
---
ofbiz/branches/release14.12/applications/product/widget/facility/FacilityForms.xml
(original)
+++
ofbiz/branches/release14.12/applications/product/widget/facility/FacilityForms.xml
Sat May 21 12:16:46 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="${uiLabelMap.ProductQuantityUomId}">
+ <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>