Comments Inline :-
Hans Bakker wrote:
Are you sure this is correct?
In the original comparison there is a 'not' around the 'or' which i do
not see in the UEL....
I also do not see much advantages in these kind of changes they only can
create problems....
Regards,
Hans
On Fri, 2009-07-17 at 10:23 +0000, apa...@apache.org wrote:
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">
false check is used for <not> tag
+ <add-error><fail-property resource="AccountingUiLabels"
property="AccountingPaymentStatusIsNotReceivedOrSentError"/></add-error>
+ </if-compare>
<check-errors/>
</iterate>
<if-compare field="parameters.groupInOneTransaction" operator="equals"
value="Y">
Rishi & Anil,
This seems very good use of UEL to me.
Hans ,
Can you please clarify how this creates problem.
Thanks And Regards
--
Chirag Manocha