svn commit: r795030 - /ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml

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

svn commit: r795030 - /ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml

apatel-2
Author: apatel
Date: Fri Jul 17 10:23:56 2009
New Revision: 795030

URL: http://svn.apache.org/viewvc?rev=795030&view=rev
Log:
Minor code improvements, now using UEL. Thanks Rishi for working on it.

Modified:
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml?rev=795030&r1=795029&r2=795030&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml Fri Jul 17 10:23:56 2009
@@ -391,19 +391,10 @@
                 <add-error><fail-property resource="AccountingUiLabels" property="AccountingPaymentAlreadyAssociatedToFinAccountError"/></add-error>
             </if-not-empty>
             <check-errors/>
-            <if>
-                <condition>
-                    <not>
-                        <or>
-                            <if-compare field="payment.statusId" operator="equals" value="PMNT_SENT"/>
-                            <if-compare field="payment.statusId" operator="equals" value="PMNT_RECEIVED"/>
-                        </or>
-                    </not>
-                </condition>
-                <then>
-                    <add-error><fail-property resource="AccountingUiLabels" property="AccountingPaymentStatusIsNotReceivedOrSentError"/></add-error>
-                </then>
-            </if>
+            <set field="isValidStatus" value="${payment.statusId == 'PMNT_SENT' @or payment.statusId == 'PMNT_RECEIVED'}" type="Boolean"/>
+            <if-compare field="isValidStatus" operator="equals" value="false">
+                <add-error><fail-property resource="AccountingUiLabels" property="AccountingPaymentStatusIsNotReceivedOrSentError"/></add-error>
+            </if-compare>
             <check-errors/>
         </iterate>
         <if-compare field="parameters.groupInOneTransaction" operator="equals" value="Y">