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) -->