svn commit: r1658666 - in /ofbiz/branches/release14.12: ./ applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml

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

svn commit: r1658666 - in /ofbiz/branches/release14.12: ./ applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml

jacopoc
Author: jacopoc
Date: Tue Feb 10 10:54:18 2015
New Revision: 1658666

URL: http://svn.apache.org/r1658666
Log:
Applied fix from trunk for revision: 1658662
===

Completed support to foreign exchange rate gain/losses when a purchase invoice is posted at a different time of the receipt.


Modified:
    ofbiz/branches/release14.12/   (props changed)
    ofbiz/branches/release14.12/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml

Propchange: ofbiz/branches/release14.12/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 10 10:54:18 2015
@@ -8,4 +8,4 @@
 /ofbiz/branches/json-integration-refactoring:1634077-1635900
 /ofbiz/branches/multitenant20100310:921280-927264
 /ofbiz/branches/release13.07:1547657
-/ofbiz/trunk:1649393,1649742,1650240,1650583,1650642,1650678,1650882,1650887,1650938,1651593,1652361,1652706,1652725,1652731,1652739,1653248,1653456,1654175,1654273,1654509,1655046,1655668,1655979,1656185,1656198,1656445,1656983,1657323,1657714,1657790,1658364
+/ofbiz/trunk:1649393,1649742,1650240,1650583,1650642,1650678,1650882,1650887,1650938,1651593,1652361,1652706,1652725,1652731,1652739,1653248,1653456,1654175,1654273,1654509,1655046,1655668,1655979,1656185,1656198,1656445,1656983,1657323,1657714,1657790,1658364,1658662

Modified: ofbiz/branches/release14.12/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml?rev=1658666&r1=1658665&r2=1658666&view=diff
==============================================================================
--- ofbiz/branches/release14.12/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml (original)
+++ ofbiz/branches/release14.12/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml Tue Feb 10 10:54:18 2015
@@ -321,6 +321,7 @@ under the License.
     <simple-method method-name="createAcctgTransAndEntries" short-description="Verifies and posts a set of AcctgTransEntries">
         <!-- retrieve ledger rounding properties -->
         <call-simple-method method-name="getGlArithmeticSettingsInline"/>
+        <set-service-fields service-name="createAcctgTrans" map="parameters" to-map="createAcctgTransParams"/>
 
         <!-- first loop through and make sure all the entries are valid  -->
         <iterate list="parameters.acctgTransEntries" entry="acctgTransEntry">
@@ -352,7 +353,10 @@ under the License.
                                 <set field="convertUomInMap.originalValue" from-field="acctgTransEntry.origAmount"/>
                                 <set field="convertUomInMap.uomId" from-field="acctgTransEntry.origCurrencyUomId"/>
                                 <set field="convertUomInMap.uomIdTo" from-field="acctgTransEntry.currencyUomId"/>
-                                <!-- TODO: set the optional asOfDate input parameter -->
+                                <if-not-empty field="createAcctgTransParams.transactionDate">
+                                    <!-- set the optional asOfDate input parameter -->
+                                    <set field="convertUomInMap.asOfDate" from-field="createAcctgTransParams.transactionDate"/>
+                                </if-not-empty>
                                 <call-service service-name="convertUom" in-map-name="convertUomInMap">
                                     <result-to-field result-name="convertedValue" field="acctgTransEntry.amount"/>
                                 </call-service>
@@ -397,7 +401,6 @@ under the License.
 
         <if-not-empty field="normalizedAcctgTransEntries">
             <!-- now do the posting. First, create the AcctgTrans entity -->
-            <set-service-fields service-name="createAcctgTrans" map="parameters" to-map="createAcctgTransParams"/>
             <if-empty field="createAcctgTransParams.transactionDate">
                 <now-timestamp field="createAcctgTransParams.transactionDate"/>
             </if-empty>
@@ -2171,6 +2174,7 @@ under the License.
             <set field="createAcctgTransAndEntriesInMap.invoiceId" from-field="invoice.invoiceId"/>
             <set field="createAcctgTransAndEntriesInMap.partyId" from-field="invoice.partyIdFrom"/>
             <set field="createAcctgTransAndEntriesInMap.roleTypeId" value="BILL_FROM_VENDOR"/>
+            <set field="createAcctgTransAndEntriesInMap.transactionDate" from-field="invoice.invoiceDate"/>
             <set field="createAcctgTransAndEntriesInMap.acctgTransEntries" from-field="acctgTransEntries"/>
             <call-service service-name="createAcctgTransAndEntries" in-map-name="createAcctgTransAndEntriesInMap">
                 <result-to-field result-name="acctgTransId"/>