Author: ashish
Date: Mon Aug 24 09:00:47 2009 New Revision: 807134 URL: http://svn.apache.org/viewvc?rev=807134&view=rev Log: Applied patch from jira issue: OFBIZ-2839 (Add ability to Cancel a Reconciliation). Thanks Parimal & Sumit for the contribution. Thanks Eva and Vince for requirements definition. Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml?rev=807134&r1=807133&r2=807134&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml (original) +++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml Mon Aug 24 09:00:47 2009 @@ -1665,6 +1665,10 @@ <value xml:lang="th">à¹à¸à¸¢à¸§à¸±à¸à¸à¸µà¹</value> <value xml:lang="zh">ææ¥æ</value> </property> + <property key="AccountingCancelBankReconciliation"> + <value xml:lang="en">Cancel Bank Reconciliation</value> + <value xml:lang="hi_IN">बà¥à¤¨à¥à¤ पà¥à¤¨à¤°à¥à¤®à¤¿à¤²à¤¾à¤¨ रदà¥à¤¦ à¤à¤°à¥à¤</value> + </property> <property key="AccountingCancelBatchPayments"> <value xml:lang="en">Cancel Batch Payments</value> <value xml:lang="hi_IN">à¤à¥à¤à¤¤à¤¾à¤¨ à¤à¤¾ बà¥à¤ रदà¥à¤¦ à¤à¤°à¥</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=807134&r1=807133&r2=807134&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 Mon Aug 24 09:00:47 2009 @@ -1002,4 +1002,17 @@ </if-not-empty> <field-to-result field="isReconciled"/> </simple-method> + + <simple-method method-name="cancelBankReconciliation" short-description="Cancel bank reconciliation."> + <entity-and entity-name="FinAccountTrans" list="finAccountTransList"> + <field-map field-name="glReconciliationId" from-field="parameters.glReconciliationId"/> + <field-map field-name="statusId" value="FINACT_TRNS_CREATED"/> + </entity-and> + <if-not-empty field="finAccountTransList"> + <iterate list="finAccountTransList" entry="finAccountTrans"> + <set field="removeFinAccountTransFromReconciliationMap.finAccountTransId" from-field="finAccountTrans.finAccountTransId"/> + <call-service service-name="removeFinAccountTransFromReconciliation" in-map-name="removeFinAccountTransFromReconciliationMap"/> + </iterate> + </if-not-empty> + </simple-method> </simple-methods> Modified: ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml?rev=807134&r1=807133&r2=807134&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml (original) +++ ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml Mon Aug 24 09:00:47 2009 @@ -510,4 +510,10 @@ <attribute name="glReconciliationId" type="String" mode="IN" optional="false"/> <attribute name="isReconciled" type="Boolean" mode="OUT" optional="false"/> </service> + + <service name="cancelBankReconciliation" engine="simple" + location="component://accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml" invoke="cancelBankReconciliation"> + <description>Cancel bank reconciliation.</description> + <attribute name="glReconciliationId" type="String" mode="IN" optional="false"/> + </service> </services> Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml?rev=807134&r1=807133&r2=807134&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Mon Aug 24 09:00:47 2009 @@ -1993,6 +1993,12 @@ <response name="success" type="view" value="ViewGlReconciliationWithTransaction"/> <response name="error" type="view" value="ViewGlReconciliationWithTransaction"/> </request-map> + <request-map uri="cancelBankReconciliation"> + <security https="true" auth="true"/> + <event type="service" invoke="cancelBankReconciliation"/> + <response name="success" type="view" value="ViewGlReconciliationWithTransaction"/> + <response name="error" type="view" value="ViewGlReconciliationWithTransaction"/> + </request-map> <!-- Fin Account Authority--> <request-map uri="EditFinAccountAuths"> <security https="true" auth="true"/> Modified: ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl?rev=807134&r1=807133&r2=807134&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/GlReconciledFinAccountTrans.ftl Mon Aug 24 09:00:47 2009 @@ -31,6 +31,10 @@ </div> <div class="screenlet-body"> <a href="<@ofbizUrl>EditFinAccountReconciliations?finAccountId=${finAccountId}&glReconciliationId=${glReconciliationId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonEdit}</a> + <#assign finAcctTransCondList = delegator.findByAnd("FinAccountTrans", {"glReconciliationId" : glReconciliationId, "statusId" : "FINACT_TRNS_CREATED"})> + <#if finAcctTransCondList?has_content> + <a href="javascript:document.CancelBankReconciliationForm.submit();" class="buttontext">${uiLabelMap.AccountingCancelBankReconciliation}</a> + </#if> <#if currentGlReconciliation?has_content> <table> <tr> @@ -161,6 +165,10 @@ </div> </div> </form> +<form name="CancelBankReconciliationForm" method="post" action="<@ofbizUrl>cancelBankReconciliation</@ofbizUrl>"> + <input name="finAccountId" type="hidden" value="${finAccountId}"/> + <input name="glReconciliationId" type="hidden" value="${glReconciliationId}"/> +</form> <#list finAccountTransList as finAccountTrans> <form name="reomveFinAccountTransAssociation_${finAccountTrans.finAccountTransId}" method="post" action="<@ofbizUrl>reomveFinAccountTransAssociation</@ofbizUrl>"> <input name="finAccountTransId" type="hidden" value="${finAccountTrans.finAccountTransId}"/> |
Free forum by Nabble | Edit this page |