Author: mor
Date: Thu Jun 3 07:12:21 2010
New Revision: 950892
URL: http://svn.apache.org/viewvc?rev=950892&view=rev
Log:
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/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml
ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl
ofbiz/trunk/applications/accounting/widget/PaymentForms.xml
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=950892&r1=950891&r2=950892&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
Thu Jun 3 07:12:21 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/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl?rev=950892&r1=950891&r2=950892&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl
(original)
+++ ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl Thu
Jun 3 07:12:21 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/trunk/applications/accounting/widget/PaymentForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/PaymentForms.xml?rev=950892&r1=950891&r2=950892&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/PaymentForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/PaymentForms.xml Thu Jun 3
07:12:21 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>