You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2014/11/15 10:34:01 UTC

svn commit: r1639852 - /ofbiz/branches/release12.04/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml

Author: ashish
Date: Sat Nov 15 09:34:01 2014
New Revision: 1639852

URL: http://svn.apache.org/r1639852
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/release12.04/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml

Modified: ofbiz/branches/release12.04/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml?rev=1639852&r1=1639851&r2=1639852&view=diff
==============================================================================
--- ofbiz/branches/release12.04/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml (original)
+++ ofbiz/branches/release12.04/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml Sat Nov 15 09:34:01 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"/>