Author: jacopoc
Date: Wed Oct 9 14:44:53 2013 New Revision: 1530646 URL: http://svn.apache.org/r1530646 Log: Applied fix from trunk for revision: 1530634 === For backward compatibility: when a time period is closed, and a GlAccountHistory record for the same is already present (old mode, before revision 1530273), do not return an error and instead fill the balance fields of the record. Modified: ofbiz/branches/release13.07/ (props changed) ofbiz/branches/release13.07/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml Propchange: ofbiz/branches/release13.07/ ------------------------------------------------------------------------------ Merged /ofbiz/trunk:r1530634 Modified: ofbiz/branches/release13.07/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml?rev=1530646&r1=1530645&r2=1530646&view=diff ============================================================================== --- ofbiz/branches/release13.07/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml (original) +++ ofbiz/branches/release13.07/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml Wed Oct 9 14:44:53 2013 @@ -833,12 +833,22 @@ under the License. <select-field field-name="glAccountId"/> </entity-condition> <iterate list="organizationGlAccounts" entry="organizationGlAccount"> - <make-value entity-name="GlAccountHistory" value-field="glAccountHistory"/> - <set field="glAccountHistory.customTimePeriodId" from-field="customTimePeriod.customTimePeriodId"/> - <set field="glAccountHistory.organizationPartyId" from-field="customTimePeriod.organizationPartyId"/> - <set field="glAccountHistory.glAccountId" from-field="organizationGlAccount.glAccountId"/> - <create-value value-field="glAccountHistory"/> - <call-service service-name="computeAndStoreGlAccountHistoryBalance" in-map-name="glAccountHistory"/> + <entity-one entity-name="GlAccountHistory" value-field="glAccountHistory"> + <field-map field-name="customTimePeriodId" from-field="customTimePeriod.customTimePeriodId"/> + <field-map field-name="organizationPartyId" from-field="customTimePeriod.organizationPartyId"/> + <field-map field-name="glAccountId" from-field="organizationGlAccount.glAccountId"/> + </entity-one> + <if-empty field="glAccountHistory"> + <make-value entity-name="GlAccountHistory" value-field="glAccountHistory"/> + <set field="glAccountHistory.customTimePeriodId" from-field="customTimePeriod.customTimePeriodId"/> + <set field="glAccountHistory.organizationPartyId" from-field="customTimePeriod.organizationPartyId"/> + <set field="glAccountHistory.glAccountId" from-field="organizationGlAccount.glAccountId"/> + <create-value value-field="glAccountHistory"/> + </if-empty> + <set field="inMap.customTimePeriodId" from-field="glAccountHistory.customTimePeriodId"/> + <set field="inMap.organizationPartyId" from-field="glAccountHistory.organizationPartyId"/> + <set field="inMap.glAccountId" from-field="glAccountHistory.glAccountId"/> + <call-service service-name="computeAndStoreGlAccountHistoryBalance" in-map-name="inMap"/> </iterate> <set field="updateCustomTimePeriodInMap.customTimePeriodId" from-field="customTimePeriod.customTimePeriodId"/> |
Free forum by Nabble | Edit this page |