Author: apatel
Date: Thu Aug 20 14:16:21 2009 New Revision: 806182 URL: http://svn.apache.org/viewvc?rev=806182&view=rev Log: Limiting user to be only able to assign financial accounts trans that are in created status to bank reconciliation. Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml?rev=806182&r1=806181&r2=806182&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml (original) +++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml Thu Aug 20 14:16:21 2009 @@ -6943,6 +6943,10 @@ <value xml:lang="en">Selected payments ${batchPaymentIds} is already assigned in a batch</value> <value xml:lang="hi_IN">à¤à¥à¤¨à¥ हà¥à¤ à¤à¥à¤à¤¤à¤¾à¤¨ $(batchPaymentIds) पहलॠहॠà¤à¤ बà¥à¤ मà¥à¤ सà¥à¤à¤ªà¤¾ हॠ</value> </property> + <property key="AccountingPaymentsAssociateWithFinAccountHasInvalidStatusError"> + <value xml:lang="en">Associated Payments with FinAccountTrans has invalid status</value> + <value xml:lang="hi_IN">FinAccountTrans à¤à¥ साथ à¤à¥à¤¡à¤¼à¥ à¤à¥à¤à¤¤à¤¾à¤¨ ठमानà¥à¤¯ सà¥à¤¥à¤¿à¤¤à¤¿ मà¥à¤ हà¥</value> + </property> <property key="AccountingPaymentCancelled"> <value xml:lang="en">Payment [${paymentId}] is cancelled and cannot be applied</value> <value xml:lang="es">Pago [${paymentId}] ha sido concelado y no puede ser aplicado</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=806182&r1=806181&r2=806182&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 Aug 20 14:16:21 2009 @@ -924,5 +924,22 @@ <store-value value-field="finAccountTrans"/> </else> </if-compare> + <if-empty field="finAccountTrans.paymentId"> + <entity-and entity-name="Payment" list="payments"> + <field-map field-name="finAccountTransId" from-field="finAccountTrans.finAccountTransId"/> + </entity-and> + <else> + <entity-one entity-name="Payment" value-field="payment"> + <field-map field-name="paymentId" from-field="finAccountTrans.paymentId"/> + </entity-one> + <field-to-list field="payment" list="payments"/> + </else> + </if-empty> + <iterate list="payments" entry="payment"> + <if-compare field="${payment.statusId == 'PMNT_SENT' @or payment.statusId == 'PMNT_RECEIVED' @or payment.statusId == 'PMNT_CONFIRMED'}" operator="equals" value="false"> + <add-error><fail-property resource="AccountingUiLabels" property="AccountingPaymentsAssociateWithFinAccountHasInvalidStatusError"/></add-error> + <check-errors/> + </if-compare> + </iterate> </simple-method> </simple-methods> Modified: ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl?rev=806182&r1=806181&r2=806182&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl Thu Aug 20 14:16:21 2009 @@ -238,7 +238,9 @@ <input name="glReconciliationId_o_${finAccountTrans_index}" type="hidden" value="${glReconciliationId}"/> </#if> <#if ((glReconciliationId?has_content && glReconciliationId == "_NA_") && (glReconciliations?has_content && finAccountTransList?has_content)) || !grandTotal?exists> - <td><input id="finAccountTransId_${finAccountTrans_index}" name="_rowSubmit_o_${finAccountTrans_index}" type="checkbox" value="Y" onclick="javascript:getFinAccountTransRunningTotalAndBalances();"/></td> + <#if finAccountTrans.statusId == "FINACT_TRNS_CREATED"> + <td><input id="finAccountTransId_${finAccountTrans_index}" name="_rowSubmit_o_${finAccountTrans_index}" type="checkbox" value="Y" onclick="javascript:getFinAccountTransRunningTotalAndBalances();"/></td> + </#if> </#if> <#if !grandTotal?exists> <#if finAccountTrans.finAccountTransTypeId="ADJUSTMENT"> |
Free forum by Nabble | Edit this page |