Author: ashish
Date: Tue Aug 25 13:47:13 2009 New Revision: 807628 URL: http://svn.apache.org/viewvc?rev=807628&view=rev Log: Following things are covered in this patch: 1) Reconciliation does not processed if Reconciliation Id does not exists. 2) Create GlReconciliation entries for Adjustments. Thanks Parimal and Sumit for the contribution. Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml?rev=807628&r1=807627&r2=807628&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml (original) +++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml Tue Aug 25 13:47:13 2009 @@ -7998,6 +7998,10 @@ <value xml:lang="en">Reconciliation</value> <value xml:lang="hi_IN">मिलाप</value> </property> + <property key="AccountingReconciliationError"> + <value xml:lang="en">Can not Reconcile finAccountTrans [${finAccountTrans.finAccountTransId}], glReconciliationId not exist</value> + <value xml:lang="hi_IN">finAccountTrans [${finAccountTrans.finAccountTransId}] à¤à¤¾ पà¥à¤¨à¤°à¥à¤®à¤¿à¤²à¤¾à¤¨ नहà¥à¤ à¤à¤° सà¤à¤¤à¥, glReconciliationId मà¥à¤à¥à¤¦ नहà¥à¤ हà¥</value> + </property> <property key="AccountingReferenceNumber"> <value xml:lang="ar">رÙ٠اÙ٠رجع</value> <value xml:lang="en">Reference Number</value> Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml?rev=807628&r1=807627&r2=807628&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml (original) +++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml Tue Aug 25 13:47:13 2009 @@ -654,37 +654,29 @@ <if-not-empty field="finAccountTrans.glReconciliationId"> <get-related-one relation-name="GlReconciliation" value-field="finAccountTrans" to-value-field="glReconciliation"/> <set-service-fields service-name="updateGlReconciliation" map="glReconciliation" to-map="updateGlReconciliationMap"/> - </if-not-empty> <if-compare field="finAccountTrans.finAccountTransTypeId" operator="equals" value="ADJUSTMENT"> <set-service-fields service-name="reconcileAdjustmentFinAcctgTrans" map="parameters" to-map="reconcileAdjustmentFinAcctgTransMap"/> <set field="reconcileAdjustmentFinAcctgTransMap.finAccountTrans" from-field="finAccountTrans"/> <set field="reconcileAdjustmentFinAcctgTransMap.organizationPartyId" from-field="parameters.organizationPartyId"/> <call-service service-name="reconcileAdjustmentFinAcctgTrans" in-map-name="reconcileAdjustmentFinAcctgTransMap"/> - <if-not-empty field="finAccountTrans.glReconciliationId"> <set field="updateGlReconciliationMap.reconciledBalance" value="${glReconciliation.reconciledBalance + finAccountTrans.amount}"/> - </if-not-empty> </if-compare> <if-compare field="finAccountTrans.finAccountTransTypeId" operator="equals" value="DEPOSIT"> <set-service-fields service-name="reconcileDepositFinAcctgTrans" map="parameters" to-map="reconcileDepositFinAcctgTransMap"/> <set field="reconcileDepositFinAcctgTransMap.finAccountTrans" from-field="finAccountTrans"/> <call-service service-name="reconcileDepositFinAcctgTrans" in-map-name="reconcileDepositFinAcctgTransMap"/> - <if-not-empty field="finAccountTrans.glReconciliationId"> <set field="updateGlReconciliationMap.reconciledBalance" value="${glReconciliation.reconciledBalance + finAccountTrans.amount}"/> - </if-not-empty> </if-compare> <if-compare field="finAccountTrans.finAccountTransTypeId" operator="equals" value="WITHDRAWAL"> <set-service-fields service-name="reconcileWithdrawalFinAcctgTrans" map="parameters" to-map="reconcileWithdrawalFinAcctgTransMap"/> <set field="reconcileWithdrawalFinAcctgTransMap.finAccountTrans" from-field="finAccountTrans"/> <call-service service-name="reconcileWithdrawalFinAcctgTrans" in-map-name="reconcileWithdrawalFinAcctgTransMap"/> - <if-not-empty field="finAccountTrans.glReconciliationId"> <set field="updateGlReconciliationMap.reconciledBalance" value="${glReconciliation.reconciledBalance - finAccountTrans.amount}"/> - </if-not-empty> </if-compare> <set-service-fields service-name="setFinAccountTransStatus" map="finAccountTrans" to-map="setFinAccountTransStatusMap"/> <set field="setFinAccountTransStatusMap.statusId" value="FINACT_TRNS_APPROVED"/> <call-service service-name="setFinAccountTransStatus" in-map-name="setFinAccountTransStatusMap"/> - <if-not-empty field="finAccountTrans.glReconciliationId"> <set field="isGlReconciliationReconciledMap.glReconciliationId" from-field="finAccountTrans.glReconciliationId"/> <call-service service-name="isGlReconciliationReconciled" in-map-name="isGlReconciliationReconciledMap"> <result-to-field result-name="isReconciled"/> @@ -695,6 +687,10 @@ </if-empty> </if-compare> <call-service service-name="updateGlReconciliation" in-map-name="updateGlReconciliationMap"/> + <else> + <add-error><fail-property resource="AccountingUiLabels" property="AccountingReconciliationError"/></add-error> + <check-errors/> + </else> </if-not-empty> </simple-method> @@ -712,6 +708,10 @@ </if-compare> <get-related relation-name="AcctgTransEntry" list="acctgTransEntries" value-field="acctgTrans"/> <iterate list="acctgTransEntries" entry="acctgTransEntry"> + <set-service-fields service-name="createGlReconciliationEntry" map="acctgTransEntry" to-map="createGlReconciliationEntryMap"/> + <set field="createGlReconciliationEntryMap.glReconciliationId" from-field="finAccountTrans.glReconciliationId"/> + <set field="createGlReconciliationEntryMap.reconciledAmount" from-field="acctgTransEntry.amount"/> + <call-service service-name="createGlReconciliationEntry" in-map-name="createGlReconciliationEntryMap"/> <set-service-fields service-name="updateAcctgTransEntry" map="acctgTransEntry" to-map="updateAcctgTransEntryMap"/> <set field="updateAcctgTransEntryMap.reconcileStatusId" value="AES_RECONCILED"/> <call-service service-name="updateAcctgTransEntry" in-map-name="updateAcctgTransEntryMap"/> |
Free forum by Nabble | Edit this page |