Author: mor
Date: Thu Jun 3 07:21:03 2010 New Revision: 950896 URL: http://svn.apache.org/viewvc?rev=950896&view=rev Log: Merged changes from trunk r950892. Applied a slightly modified patch provided by Surya Kusumakar on jira issue OFBIZ-3337 (https://issues.apache.org/jira/browse/OFBIZ-3337) This fixed a bug with inactive financial account(s) which does show up while creating a new payment or creating a batch of payments. Modified: ofbiz/branches/release10.04/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml ofbiz/branches/release10.04/applications/accounting/webapp/ar/payment/batchPayments.ftl ofbiz/branches/release10.04/applications/accounting/widget/PaymentForms.xml Modified: ofbiz/branches/release10.04/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml?rev=950896&r1=950895&r2=950896&view=diff ============================================================================== --- ofbiz/branches/release10.04/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml (original) +++ ofbiz/branches/release10.04/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml Thu Jun 3 07:21:03 2010 @@ -400,6 +400,19 @@ under the License. <set field="paymentIds" from-field="parameters.paymentIds"/> <set field="finAccountId" from-field="parameters.finAccountId"/> <entity-one entity-name="FinAccount" value-field="finAccount"/> + <!-- Do not create a batch against a financial account which is Manually Frozen or Canceled --> + <if> + <condition> + <or> + <if-compare field="finAccount.statusId" operator="equals" value="FNACT_MANFROZEN"/> + <if-compare field="finAccount.statusId" operator="equals" value="FNACT_CANCELLED"/> + </or> + </condition> + <then> + <add-error><fail-property resource="AccountingErrorUiLabels" property="AccountingFinAccountInactiveStatusError"/></add-error> + </then> + </if> + <check-errors/> <set field="paymentRunningTotal" type="BigDecimal" value="0"/> <entity-condition entity-name="Payment" list="payments"> <condition-expr field-name="paymentId" operator="in" from-field="paymentIds"/> Modified: ofbiz/branches/release10.04/applications/accounting/webapp/ar/payment/batchPayments.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/accounting/webapp/ar/payment/batchPayments.ftl?rev=950896&r1=950895&r2=950896&view=diff ============================================================================== --- ofbiz/branches/release10.04/applications/accounting/webapp/ar/payment/batchPayments.ftl (original) +++ ofbiz/branches/release10.04/applications/accounting/webapp/ar/payment/batchPayments.ftl Thu Jun 3 07:21:03 2010 @@ -128,7 +128,9 @@ function setServiceName(selection) { <label for="finAccountId">${uiLabelMap.AccountingBankAccount}</label> <select name="finAccountId" id="finAccountId"> <#list finAccounts as finAccount> + <#if ("FNACT_MANFROZEN" != finAccount.statusId) && ("FNACT_CANCELLED" != finAccount.statusId)> <option value="${finAccount.get("finAccountId")}">${finAccount.get("finAccountName")} [${finAccount.get("finAccountId")}]</option> + </#if> </#list> </select> </#if> Modified: ofbiz/branches/release10.04/applications/accounting/widget/PaymentForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/accounting/widget/PaymentForms.xml?rev=950896&r1=950895&r2=950896&view=diff ============================================================================== --- ofbiz/branches/release10.04/applications/accounting/widget/PaymentForms.xml (original) +++ ofbiz/branches/release10.04/applications/accounting/widget/PaymentForms.xml Thu Jun 3 07:21:03 2010 @@ -182,6 +182,8 @@ under the License. <drop-down allow-empty="true"> <entity-options entity-name="FinAccount" description="${finAccountName} [${finAccountId}]" filter-by-date="true"> <entity-constraint name="finAccountTypeId" value="BANK_ACCOUNT"/> + <entity-constraint name="statusId" operator="not-equals" value="FNACT_MANFROZEN"/> + <entity-constraint name="statusId" operator="not-equals" value="FNACT_CANCELLED"/> </entity-options> </drop-down> </field> |
Free forum by Nabble | Edit this page |