Author: jacopoc
Date: Tue Feb 10 10:44:02 2015 New Revision: 1658662 URL: http://svn.apache.org/r1658662 Log: Completed support to foreign exchange rate gain/losses when a purchase invoice is posted at a different time of the receipt. Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml?rev=1658662&r1=1658661&r2=1658662&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml (original) +++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml Tue Feb 10 10:44:02 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"/> |
Free forum by Nabble | Edit this page |