svn commit: r806182 - in /ofbiz/trunk/applications/accounting: config/AccountingUiLabels.xml script/org/ofbiz/accounting/finaccount/FinAccountServices.xml webapp/accounting/finaccounttrans/FinAccountTrans.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r806182 - in /ofbiz/trunk/applications/accounting: config/AccountingUiLabels.xml script/org/ofbiz/accounting/finaccount/FinAccountServices.xml webapp/accounting/finaccounttrans/FinAccountTrans.ftl

apatel-2
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">