This is an automated email from the ASF dual-hosted git repository.

mbrohl 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 6348424361 Fixed: Convert InventoryServices.xml mini lang to groovy 
(OFBIZ-12174)
6348424361 is described below

commit 634842436167a4c399d2d98162ad211f3a4fcc45
Author: Cheng Hu Shan <cheng-hu.s...@ecomify.de>
AuthorDate: Thu Jul 27 16:37:39 2023 +0200

    Fixed: Convert InventoryServices.xml mini lang to groovy (OFBIZ-12174)
---
 .../ofbiz/product/product/inventory/InventoryServicesScript.groovy    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/applications/product/src/main/groovy/org/apache/ofbiz/product/product/inventory/InventoryServicesScript.groovy
 
b/applications/product/src/main/groovy/org/apache/ofbiz/product/product/inventory/InventoryServicesScript.groovy
index 590ae0d1c4..059ec9a55f 100644
--- 
a/applications/product/src/main/groovy/org/apache/ofbiz/product/product/inventory/InventoryServicesScript.groovy
+++ 
b/applications/product/src/main/groovy/org/apache/ofbiz/product/product/inventory/InventoryServicesScript.groovy
@@ -139,7 +139,9 @@ Map createInventoryItem() {
         Map partyAccountingPreferencesCallMap = [organizationPartyId: 
inventoryItem.ownerPartyId]
         Map serviceResult = run service: 'getPartyAccountingPreferences', 
with: partyAccountingPreferencesCallMap
         Map accPref = serviceResult.partyAccountingPreference
-        inventoryItem.currencyUomId = accPref.baseCurrencyUomId
+        if (accPref) {
+            inventoryItem.currencyUomId = accPref.baseCurrencyUomId
+        }
         inventoryItem.currencyUomId = inventoryItem.currencyUomId ?: 
UtilProperties.getPropertyValue('general.properties', 'currency.uom.id.default')
 
         // if inventoryItem's currencyUomId is still empty, return an error 
message

Reply via email to