Author: jacopoc
Date: Wed Feb 6 22:31:25 2008
New Revision: 619287
URL:
http://svn.apache.org/viewvc?rev=619287&view=revLog:
When closing a financial time period set the transaction date of the adjustments 1 second before the end of the period, so that it is included in the old period.
Makes use of the new set-calendar operation; needs more tests.
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=619287&r1=619286&r2=619287&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 Wed Feb 6 22:31:25 2008
@@ -751,7 +751,8 @@
<set field="createAcctgTransAndEntriesInMap.glFiscalTypeId" value="ACTUAL"/>
<set field="createAcctgTransAndEntriesInMap.acctgTransTypeId" value="PERIOD_CLOSING"/>
- <set field="createAcctgTransAndEntriesInMap.transactionDate" from-field="customTimePeriod.thruDate"/> <!-- FIXME -->
+ <!-- Set the transaction date 1 second before the end of the period, so that it is included in the old period -->
+ <set-calendar field="createAcctgTransAndEntriesInMap.transactionDate" from-field="customTimePeriod.thruDate" seconds="-1"/>
<set field="createAcctgTransAndEntriesInMap.acctgTransEntries" from-field="acctgTransEntries"/>
<call-service service-name="createAcctgTransAndEntries" in-map-name="createAcctgTransAndEntriesInMap">
<result-to-field result-name="acctgTransId"/>