[ofbiz-framework] branch trunk updated: Fixed: Updated hard coded values of location types and used all available location enums instead (OFBIZ-6042)

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

[ofbiz-framework] branch trunk updated: Fixed: Updated hard coded values of location types and used all available location enums instead (OFBIZ-6042)

jleroux@apache.org
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 2c85c8e  Fixed: Updated hard coded values of location types and used all available location enums instead (OFBIZ-6042)
2c85c8e is described below

commit 2c85c8e43b63b0522f69b7078eec48f3e50824d5
Author: Jacques Le Roux <[hidden email]>
AuthorDate: Thu Jun 25 11:00:31 2020 +0200

    Fixed: Updated hard coded values of location types and used all available location enums instead (OFBIZ-6042)
   
    Fixes a typo
---
 .../product/inventory/InventoryServices.xml        | 78 +++++++++++-----------
 1 file changed, 39 insertions(+), 39 deletions(-)

diff --git a/applications/product/minilang/product/inventory/InventoryServices.xml b/applications/product/minilang/product/inventory/InventoryServices.xml
index 8805fc9..2f1ad23 100644
--- a/applications/product/minilang/product/inventory/InventoryServices.xml
+++ b/applications/product/minilang/product/inventory/InventoryServices.xml
@@ -302,7 +302,7 @@ under the License.
         </if-not-empty>
         <set field="oldUnitCost" from-field="lookedUpValue.unitCost"/>
         <if-not-empty field="parameters.lotId">
-         <!-- Check if the lot already exists -->
+            <!-- Check if the lot already exists -->
             <entity-and entity-name="Lot" list="lotList">
                   <field-map field-name="lotId" from-field="parameters.lotId" />
             </entity-and>
@@ -1080,7 +1080,7 @@ under the License.
                 <set field="locationTypeMap.enumTypeId" value="FACLOC_TYPE"/>
                 <find-by-and entity-name="Enumeration" list="locationTypeEnums" map="locationTypeMap"/>
                 <set field="locationTypeEnumIds" value="${groovy: return org.apache.ofbiz.entity.util.EntityUtil.getFieldListFromEntityList(locationTypeEnums, 'enumId', true);}" type="List"/>
-                <set field="nothing" value="${groovy: locationTypeEnumIds.add(null)" type="List"/>
+                <set field="nothing" value="${groovy: locationTypeEnumIds.add(null)}" type="List"/>
                 <iterate list="locationTypeEnumIds" entry="locationTypeEnumId">
                     <find-by-and entity-name="InventoryItemAndLocation" map="lookupFieldMap" list="inventoryItemAndLocations" use-iterator="true" order-by-list="orderByList"/>
                     <entity-condition entity-name="InventoryItemAndLocation" list="inventoryItemAndLocations">
@@ -1093,43 +1093,43 @@ under the License.
                         </condition-list>
                         <order-by field-name="${orderByString}"/>
                     </entity-condition>
-                <!-- first transfer InventoryItems in FLT_PICKLOC type locations, then FLT_BULK locations, then InventoryItems with no locations -->
-                <iterate list="inventoryItemAndLocations" entry="inventoryItemAndLocation">
-                    <clear-field field="inputMap"/>
-                    <set field="inputMap.inventoryItemId" from-field="inventoryItemAndLocation.inventoryItemId"/>
-                    <set field="inputMap.locationSeqId" from-field="inventoryItemAndLocation.locationSeqId"/>
-                    <if-empty field="parameters.statusId">
-                       <set field="inputMap.statusId" value="IXF_REQUESTED"/>
-                    <else>
-                       <set field="inputMap.statusId" value="${parameters.statusId}"/>
-                    </else>
-                    </if-empty>
-                    <set field="inputMap.facilityId" from-field="parameters.facilityId"/>
-                    <set field="inputMap.facilityIdTo" from-field="parameters.facilityIdTo"/>
-                    <set field="inputMap.locationSeqIdTo" from-field="parameters.locationSeqIdTo"/>
-                    <set field="inputMap.sendDate" from-field="parameters.sendDate"/>
-                    <!-- TODO: inventory transfers for serialized items are not yet implemented -->
-                    <if-compare field="inventoryItemAndLocation.inventoryItemTypeId" operator="equals" value="NON_SERIAL_INV_ITEM">
-                        <if-compare-field field="quantityNotTransferred" to-field="inventoryItemAndLocation.availableToPromiseTotal" operator="greater" type="BigDecimal">
-                            <set field="inputMap.xferQty" from-field="inventoryItemAndLocation.availableToPromiseTotal"/>
-                        <else>
-                            <set field="inputMap.xferQty" from-field="quantityNotTransferred"/>
-                        </else>
-                        </if-compare-field>
-                        <call-service service-name="createInventoryTransfer" in-map-name="inputMap"/>
-                        <calculate field="quantityNotTransferred">
-                            <calcop operator="subtract" field="quantityNotTransferred">
-                                <calcop operator="get" field="inputMap.xferQty"/>
-                            </calcop>
-                        </calculate>
-                    </if-compare>
-                    <if-compare operator="equals" value="0" field="quantityNotTransferred">
-                       <break/>
-                    </if-compare>
-                </iterate>
-                <if-compare operator="equals" value="0" field="quantityNotTransferred">
-                    <break/>
-                </if-compare>
+                    <!-- first transfer InventoryItems in FLT_PICKLOC type locations, then FLT_BULK locations, then InventoryItems with no locations -->
+                    <iterate list="inventoryItemAndLocations" entry="inventoryItemAndLocation">
+                        <clear-field field="inputMap"/>
+                        <set field="inputMap.inventoryItemId" from-field="inventoryItemAndLocation.inventoryItemId"/>
+                        <set field="inputMap.locationSeqId" from-field="inventoryItemAndLocation.locationSeqId"/>
+                        <if-empty field="parameters.statusId">
+                           <set field="inputMap.statusId" value="IXF_REQUESTED"/>
+                        <else>
+                           <set field="inputMap.statusId" value="${parameters.statusId}"/>
+                        </else>
+                        </if-empty>
+                        <set field="inputMap.facilityId" from-field="parameters.facilityId"/>
+                        <set field="inputMap.facilityIdTo" from-field="parameters.facilityIdTo"/>
+                        <set field="inputMap.locationSeqIdTo" from-field="parameters.locationSeqIdTo"/>
+                        <set field="inputMap.sendDate" from-field="parameters.sendDate"/>
+                        <!-- TODO: inventory transfers for serialized items are not yet implemented -->
+                        <if-compare field="inventoryItemAndLocation.inventoryItemTypeId" operator="equals" value="NON_SERIAL_INV_ITEM">
+                            <if-compare-field field="quantityNotTransferred" to-field="inventoryItemAndLocation.availableToPromiseTotal" operator="greater" type="BigDecimal">
+                                <set field="inputMap.xferQty" from-field="inventoryItemAndLocation.availableToPromiseTotal"/>
+                            <else>
+                                <set field="inputMap.xferQty" from-field="quantityNotTransferred"/>
+                            </else>
+                            </if-compare-field>
+                            <call-service service-name="createInventoryTransfer" in-map-name="inputMap"/>
+                            <calculate field="quantityNotTransferred">
+                                <calcop operator="subtract" field="quantityNotTransferred">
+                                    <calcop operator="get" field="inputMap.xferQty"/>
+                                </calcop>
+                            </calculate>
+                        </if-compare>
+                        <if-compare operator="equals" value="0" field="quantityNotTransferred">
+                           <break/>
+                        </if-compare>
+                    </iterate>
+                    <if-compare operator="equals" value="0" field="quantityNotTransferred">
+                        <break/>
+                    </if-compare>
                 </iterate>
             </else>
         </if-compare>