You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by pa...@apache.org on 2020/04/25 17:35:38 UTC

[ofbiz-framework] branch trunk updated: Improved: Proper User friendly message should visible at Create Inventory Transfer screen (OFBIZ-10366)

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

pawan 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 db2c301  Improved: Proper User friendly message should visible at Create Inventory Transfer screen (OFBIZ-10366)
db2c301 is described below

commit db2c301c7e2029321a28a9e7ca5cd97e2ab036a6
Author: Pawan Verma <pa...@hotwaxsystems.com>
AuthorDate: Sat Apr 25 23:04:04 2020 +0530

    Improved: Proper User friendly message should visible at Create Inventory Transfer screen
    (OFBIZ-10366)
    
    Thanks: Ritesh Kumar for your contribution and Pierre Smits for the review.
---
 applications/product/config/ProductUiLabels.xml               |  3 +++
 .../product/minilang/product/inventory/InventoryServices.xml  | 11 +----------
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/applications/product/config/ProductUiLabels.xml b/applications/product/config/ProductUiLabels.xml
index 421353b..77cc452 100644
--- a/applications/product/config/ProductUiLabels.xml
+++ b/applications/product/config/ProductUiLabels.xml
@@ -20105,6 +20105,9 @@
         <value xml:lang="zh">输入、操作符和数值</value>
         <value xml:lang="zh-TW">輸入、運算子作和數值</value>
     </property>
+    <property key="ProductInventoryATPNotAvailable">
+        <value xml:lang="en">Requested quantity [${xferQty}] could not be transferred because [${unavailableQuantity}] units of inventory is unavailable.</value>
+    </property>
     <property key="ProductOperator">
         <value xml:lang="de">Operator</value>
         <value xml:lang="en">Operator</value>
diff --git a/applications/product/minilang/product/inventory/InventoryServices.xml b/applications/product/minilang/product/inventory/InventoryServices.xml
index 64a01d5..ee469e8 100644
--- a/applications/product/minilang/product/inventory/InventoryServices.xml
+++ b/applications/product/minilang/product/inventory/InventoryServices.xml
@@ -1115,13 +1115,7 @@ under the License.
 	                            <set field="inputMap.xferQty" from-field="quantityNotTransferred"/>
 	                        </else>
 	                        </if-compare-field>
-	                        <add-error>
-	                           <fail-message message="inputMap = ${inputMap}"/>
-	                        </add-error>
 	                        <call-service service-name="createInventoryTransfer" in-map-name="inputMap"/>
-	                        <add-error>
-	                           <fail-message message="quantityNotTransferred = ${quantityNotTransferred}"/>
-	                        </add-error>
 	                        <calculate field="quantityNotTransferred">
 	                            <calcop operator="subtract" field="quantityNotTransferred">
 	                                <calcop operator="get" field="inputMap.xferQty"/>
@@ -1142,10 +1136,7 @@ under the License.
         <field-to-result field="quantityNotTransferred"/>
         <if-compare operator="greater" value="0" field="quantityNotTransferred">
             <add-error>
-                <fail-property resource="ProductUiLabels" property="FormFieldTitle_quantityNotAvailable"/>
-            </add-error>
-            <add-error> 
-                <fail-message message="${quantityNotTransferred}"/>
+                <fail-message message="${groovy: import org.apache.ofbiz.base.util.UtilProperties; return (UtilProperties.getMessage('ProductUiLabels', 'ProductInventoryATPNotAvailable', ['unavailableQuantity' : quantityNotTransferred, 'xferQty': parameters.quantity], locale))}"/>
             </add-error>
             <check-errors/>
         </if-compare>