svn commit: r1870210 - in /ofbiz/branches/release16.11/applications/order: config/OrderErrorUiLabels.xml minilang/order/OrderReturnServices.xml

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

svn commit: r1870210 - in /ofbiz/branches/release16.11/applications/order: config/OrderErrorUiLabels.xml minilang/order/OrderReturnServices.xml

Pawan Verma-2
Author: pawan
Date: Sat Nov 23 05:49:55 2019
New Revision: 1870210

URL: http://svn.apache.org/viewvc?rev=1870210&view=rev
Log:
Fixed: Error while CSR creates a return
(OFBIZ-11068)

Added check to validate Payment Method passed from UI while creating return. If not available in system, throw an error.

Thanks: Dikpal Kanungo for report and Rohit Hukkeri for the patch.

Modified:
    ofbiz/branches/release16.11/applications/order/config/OrderErrorUiLabels.xml
    ofbiz/branches/release16.11/applications/order/minilang/order/OrderReturnServices.xml

Modified: ofbiz/branches/release16.11/applications/order/config/OrderErrorUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/applications/order/config/OrderErrorUiLabels.xml?rev=1870210&r1=1870209&r2=1870210&view=diff
==============================================================================
--- ofbiz/branches/release16.11/applications/order/config/OrderErrorUiLabels.xml (original)
+++ ofbiz/branches/release16.11/applications/order/config/OrderErrorUiLabels.xml Sat Nov 23 05:49:55 2019
@@ -3422,6 +3422,9 @@
         <value xml:lang="vi">Lỗi xảy ra: giá trị trả về phải là đơn vị (party) với vai trò nhà cung cấp (supplier)</value>
         <value xml:lang="zh">错误:退货必须是到有供货商角色的会员</value>
     </property>
+    <property key="OrderReturnRequestPaymentMethodId">
+        <value xml:lang="en">Invalid paymentMethodId; can not locate Payment Method.</value>
+    </property>
     <property key="OrderReturnTotalCannotLessThanZero">
         <value xml:lang="ar">إجمالي المسترجع [${returnTotalAmount}] لا يمكن أن يكون أقل من صفر</value>
         <value xml:lang="de">Der Gesamtbetrag der Retoure [${returnTotalAmount}] kann nicht kleiner Null sein.</value>

Modified: ofbiz/branches/release16.11/applications/order/minilang/order/OrderReturnServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/applications/order/minilang/order/OrderReturnServices.xml?rev=1870210&r1=1870209&r2=1870210&view=diff
==============================================================================
--- ofbiz/branches/release16.11/applications/order/minilang/order/OrderReturnServices.xml (original)
+++ ofbiz/branches/release16.11/applications/order/minilang/order/OrderReturnServices.xml Sat Nov 23 05:49:55 2019
@@ -71,6 +71,16 @@ under the License.
             </if-compare>
          </else>
         </if-empty>
+        <if-not-empty field="parameters.paymentMethodId">
+            <entity-one entity-name="PaymentMethod" value-field="paymentMethod" use-cache="true" auto-field-map="false">
+                <field-map field-name="paymentMethodId" from-field="parameters.paymentMethodId"/>
+            </entity-one>
+            <if-empty field="paymentMethod">
+                <add-error>
+                    <fail-property resource="OrderErrorUiLabels" property="OrderReturnRequestPaymentMethodId"/>
+                </add-error>
+            </if-empty>
+        </if-not-empty>
         <check-errors/>
 
         <!-- check the needs (auto) inventory receive flag (default to N, meaning that return won't automatically be considered Received when Accepted) -->