Author: ashish
Date: Sat Nov 15 09:18:39 2014
New Revision: 1639848

URL: http://svn.apache.org/r1639848
Log:
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/trunk/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml

Modified: 
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml?rev=1639848&r1=1639847&r2=1639848&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml
 (original)
+++ 
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml
 Sat Nov 15 09:18:39 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