You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by de...@apache.org on 2017/10/17 11:16:02 UTC
svn commit: r1812385 - in /ofbiz/ofbiz-framework/trunk/applications/product:
config/ groovyScripts/catalog/product/ minilang/product/inventory/
servicedef/ template/product/
Author: deepak
Date: Tue Oct 17 11:16:02 2017
New Revision: 1812385
URL: http://svn.apache.org/viewvc?rev=1812385&view=rev
Log:
Improved: While fetching product inventory, it should also return accounting quantity as well. Applied patch from jira issue (While fetching product inventory, it should also return accounting quantity as well)
Thanks Suraj Khurana for your contribution.
Modified:
ofbiz/ofbiz-framework/trunk/applications/product/config/ProductUiLabels.xml
ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/product/EditProductInventoryItems.groovy
ofbiz/ofbiz-framework/trunk/applications/product/minilang/product/inventory/InventoryServices.xml
ofbiz/ofbiz-framework/trunk/applications/product/servicedef/services_facility.xml
ofbiz/ofbiz-framework/trunk/applications/product/template/product/ProductInventorySummary.ftl
Modified: ofbiz/ofbiz-framework/trunk/applications/product/config/ProductUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/config/ProductUiLabels.xml?rev=1812385&r1=1812384&r2=1812385&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/config/ProductUiLabels.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/config/ProductUiLabels.xml Tue Oct 17 11:16:02 2017
@@ -13392,6 +13392,9 @@
<value xml:lang="zh">é常åºè¯¥å¨éè´§åæ¹å</value>
<value xml:lang="zh-TW">é常æ該å¨é貨åæ ¸å</value>
</property>
+ <property key="ProductAqt">
+ <value xml:lang="en">AQT</value>
+ </property>
<property key="ProductArea">
<value xml:lang="de">Fläche</value>
<value xml:lang="en">Area</value>
Modified: ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/product/EditProductInventoryItems.groovy
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/product/EditProductInventoryItems.groovy?rev=1812385&r1=1812384&r2=1812385&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/product/EditProductInventoryItems.groovy (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/product/EditProductInventoryItems.groovy Tue Oct 17 11:16:02 2017
@@ -43,6 +43,7 @@ if (product) {
variantInventorySummary = [productId : variant.productIdTo,
availableToPromiseTotal : inventoryAvailable.availableToPromiseTotal,
+ accountingQuantityTotal : inventoryAvailable.accountingQuantityTotal,
quantityOnHandTotal : inventoryAvailable.quantityOnHandTotal]
//add the applicable features to the map
@@ -86,6 +87,7 @@ if (product) {
quantitySummary.facilityId = facility.facilityId
quantitySummary.totalQuantityOnHand = resultOutput.quantityOnHandTotal
quantitySummary.totalAvailableToPromise = resultOutput.availableToPromiseTotal
+ quantitySummary.accountingQuantityTotal = resultOutput.accountingQuantityTotal
// if the product is a MARKETING_PKG_AUTO/PICK, then also get the quantity which can be produced from components
if (isMarketingPackage) {
Modified: ofbiz/ofbiz-framework/trunk/applications/product/minilang/product/inventory/InventoryServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/minilang/product/inventory/InventoryServices.xml?rev=1812385&r1=1812384&r2=1812385&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/minilang/product/inventory/InventoryServices.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/minilang/product/inventory/InventoryServices.xml Tue Oct 17 11:16:02 2017
@@ -628,6 +628,8 @@ under the License.
<set field="parameters.availableToPromiseTotal" value="0" type="BigDecimal"/>
<set field="parameters.quantityOnHandTotal" value="0" type="BigDecimal"/>
+ <set field="parameters.accountingQuantityTotal" value="0" type="BigDecimal"/>
+
<iterate list="inventoryItems" entry="inventoryItem">
<!-- NOTE: this code no longer distinguishes between serialized and non-serialized because both now have availableToPromiseTotal and quantityOnHandTotal populated (for serialized are based on status, non-serialized are based on InventoryItemDetail) -->
<if>
@@ -651,12 +653,14 @@ under the License.
<then>
<set field="parameters.quantityOnHandTotal" value="${parameters.quantityOnHandTotal + inventoryItem.quantityOnHandTotal}" type="BigDecimal"/>
<set field="parameters.availableToPromiseTotal" value="${parameters.availableToPromiseTotal + inventoryItem.availableToPromiseTotal}" type="BigDecimal"/>
+ <set field="parameters.accountingQuantityTotal" value="${parameters.accountingQuantityTotal + inventoryItem.accountingQuantityTotal}" type="BigDecimal"/>
</then>
</if>
</iterate>
<field-to-result field="parameters.availableToPromiseTotal" result-name="availableToPromiseTotal"/>
<field-to-result field="parameters.quantityOnHandTotal" result-name="quantityOnHandTotal"/>
+ <field-to-result field="parameters.accountingQuantityTotal" result-name="accountingQuantityTotal"/>
</simple-method>
<simple-method method-name="countProductInventoryOnHand" short-description="Count Inventory On Hand for a Product constrained by a facilityId at a given date." use-transaction="false">
Modified: ofbiz/ofbiz-framework/trunk/applications/product/servicedef/services_facility.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/servicedef/services_facility.xml?rev=1812385&r1=1812384&r2=1812385&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/servicedef/services_facility.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/servicedef/services_facility.xml Tue Oct 17 11:16:02 2017
@@ -189,6 +189,7 @@ under the License.
<attribute name="statusId" type="String" mode="IN" optional="true"/>
<attribute name="quantityOnHandTotal" type="BigDecimal" mode="OUT" optional="false"/>
<attribute name="availableToPromiseTotal" type="BigDecimal" mode="OUT" optional="false"/>
+ <attribute name="accountingQuantityTotal" type="BigDecimal" mode="OUT" optional="false"/>
<attribute name="useCache" type="Boolean" mode="IN" optional="true"/>
</service>
<service name="getInventoryAvailableByFacility" engine="simple"
@@ -208,6 +209,7 @@ under the License.
<attribute name="lotId" mode="IN" type="String" optional="true"/>
<attribute name="quantityOnHandTotal" type="BigDecimal" mode="OUT" optional="false"/>
<attribute name="availableToPromiseTotal" type="BigDecimal" mode="OUT" optional="false"/>
+ <attribute name="accountingQuantityTotal" type="BigDecimal" mode="OUT" optional="false"/>
<attribute name="useCache" type="Boolean" mode="IN" optional="true"/>
</service>
<service name="getInventoryAvailableByLocation" engine="simple"
@@ -231,6 +233,7 @@ under the License.
<attribute name="statusId" type="String" mode="IN" optional="true"/>
<attribute name="quantityOnHandTotal" type="BigDecimal" mode="OUT" optional="false"/>
<attribute name="availableToPromiseTotal" type="BigDecimal" mode="OUT" optional="false"/>
+ <attribute name="accountingQuantityTotal" type="BigDecimal" mode="OUT" optional="false"/>
<attribute name="useCache" type="Boolean" mode="IN" optional="true"/>
</service>
<service name="getInventoryAvailableByContainer" engine="simple"
@@ -249,6 +252,7 @@ under the License.
<attribute name="statusId" type="String" mode="IN" optional="true"/>
<attribute name="quantityOnHandTotal" type="BigDecimal" mode="OUT" optional="false"/>
<attribute name="availableToPromiseTotal" type="BigDecimal" mode="OUT" optional="false"/>
+ <attribute name="accountingQuantityTotal" type="BigDecimal" mode="OUT" optional="false"/>
</service>
<service name="getInventoryAvailableByItem" engine="simple"
location="component://product/minilang/product/inventory/InventoryServices.xml" invoke="getProductInventoryAvailable" auth="false" use-transaction="false">
@@ -260,6 +264,7 @@ under the License.
</attribute>
<attribute name="quantityOnHandTotal" type="BigDecimal" mode="OUT" optional="false"/>
<attribute name="availableToPromiseTotal" type="BigDecimal" mode="OUT" optional="false"/>
+ <attribute name="accountingQuantityTotal" type="BigDecimal" mode="OUT" optional="false"/>
<attribute name="useCache" type="Boolean" mode="IN" optional="true"/>
</service>
<service name="getProductInventoryAvailableFromAssocProducts" engine="java"
@@ -294,6 +299,7 @@ under the License.
<attribute name="statusId" type="String" mode="IN" optional="true"/>
<attribute name="quantityOnHandTotal" type="BigDecimal" mode="OUT" optional="false"/>
<attribute name="availableToPromiseTotal" type="BigDecimal" mode="OUT" optional="false"/>
+ <attribute name="accountingQuantityTotal" type="BigDecimal" mode="OUT" optional="false"/>
<attribute name="useCache" type="Boolean" mode="IN" optional="true"/>
</service>
<service name="countProductInventoryOnHand" engine="simple"
Modified: ofbiz/ofbiz-framework/trunk/applications/product/template/product/ProductInventorySummary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/template/product/ProductInventorySummary.ftl?rev=1812385&r1=1812384&r2=1812385&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/template/product/ProductInventorySummary.ftl (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/template/product/ProductInventorySummary.ftl Tue Oct 17 11:16:02 2017
@@ -32,6 +32,7 @@ under the License.
<td><b>${uiLabelMap.ProductFacility}</b></td>
<td><b>${uiLabelMap.ProductAtp}</b></td>
<td><b>${uiLabelMap.ProductQoh}</b></td>
+ <td><b>${uiLabelMap.ProductAqt}</b></td>
<#if "true" == isMarketingPackage>
<td><b>${uiLabelMap.ProductMarketingPackageATP}</b></td>
<td><b>${uiLabelMap.ProductMarketingPackageQOH}</b></td>
@@ -48,6 +49,7 @@ under the License.
<#assign manufacturingInQuantitySummary = manufacturingInQuantitySummaryByFacility.get(facilityId)!>
<#assign manufacturingOutQuantitySummary = manufacturingOutQuantitySummaryByFacility.get(facilityId)!>
<#assign totalQuantityOnHand = quantitySummary.totalQuantityOnHand!>
+ <#assign accountingQuantityTotal = quantitySummary.accountingQuantityTotal!>
<#assign totalAvailableToPromise = quantitySummary.totalAvailableToPromise!>
<#assign mktgPkgATP = quantitySummary.mktgPkgATP!>
<#assign mktgPkgQOH = quantitySummary.mktgPkgQOH!>
@@ -61,6 +63,7 @@ under the License.
<a href="/facility/control/ReceiveInventory?facilityId=${facilityId}&productId=${productId}&externLoginKey=${externalLoginKey}" class="buttontext">${uiLabelMap.ProductInventoryReceive}</a></td>
<td><#if totalAvailableToPromise??>${totalAvailableToPromise}<#else> </#if></td>
<td><#if totalQuantityOnHand??>${totalQuantityOnHand}<#else> </#if></td>
+ <td><#if accountingQuantityTotal??>${accountingQuantityTotal}<#else> </#if></td>
<#if "true" == isMarketingPackage>
<td><#if mktgPkgATP??>${mktgPkgATP}<#else> </#if></td>
<td><#if mktgPkgQOH??>${mktgPkgQOH}<#else> </#if></td>