Author: ashish
Date: Sat Nov 15 09:23:04 2014
New Revision: 1639851

URL: http://svn.apache.org/r1639851
Log:
Applied bug fix from trunk r1639848.
Applied patch from jira issue - OFBIZ-5630 - service updateFxConversion doesn't 
set thruDate properly.
==========================================================================================
When updating an existing foreign currency exchange rate in accounting the 
service creates a new exchange rate and sets the thruDate of the old rate.
But in stead of taking the fromDate of the new exchange rate as a starting 
point for the thruDate of the expired exchange rate it uses nowTimeStamp.
==========================================================================================
Thanks Pierre for reporting the issue. Thanks Pranay for providing the fix.

Modified:
    
ofbiz/branches/release13.07/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml

Modified: 
ofbiz/branches/release13.07/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml?rev=1639851&r1=1639850&r2=1639851&view=diff
==============================================================================
--- 
ofbiz/branches/release13.07/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml
 (original)
+++ 
ofbiz/branches/release13.07/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml
 Sat Nov 15 09:23:04 2014
@@ -122,7 +122,12 @@ under the License.
 
         <!-- expire all of them -->
         <iterate list="uomConversions" entry="uomConversion">
-            <set from-field="nowTimestamp" field="uomConversion.thruDate"/>
+            <if-empty field="parameters.fromDate">
+                <set from-field="nowTimestamp" field="uomConversion.thruDate"/>
+            <else>
+                <set from-field="parameters.fromDate" 
field="uomConversion.thruDate"/>
+            </else>
+            </if-empty>
         </iterate>
         <store-list list="uomConversions"/>
 


Reply via email to