svn commit: r797762 - in /ofbiz/trunk/applications/accounting/webapp: accounting/payment/depositWithdrawPayments.ftl ap/invoices/PurchaseInvoices.ftl ar/payment/batchPayments.ftl

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

svn commit: r797762 - in /ofbiz/trunk/applications/accounting/webapp: accounting/payment/depositWithdrawPayments.ftl ap/invoices/PurchaseInvoices.ftl ar/payment/batchPayments.ftl

apatel-2
Author: apatel
Date: Sat Jul 25 12:24:06 2009
New Revision: 797762

URL: http://svn.apache.org/viewvc?rev=797762&view=rev
Log:
If no payment or invoice is selected from list then don't let user submit the form.

Modified:
    ofbiz/trunk/applications/accounting/webapp/accounting/payment/depositWithdrawPayments.ftl
    ofbiz/trunk/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl
    ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/payment/depositWithdrawPayments.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/payment/depositWithdrawPayments.ftl?rev=797762&r1=797761&r2=797762&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/payment/depositWithdrawPayments.ftl (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/payment/depositWithdrawPayments.ftl Sat Jul 25 12:24:06 2009
@@ -51,6 +51,7 @@
         $('checkAllPayments').checked = true;
     }
     if (!isSingle) {
+        $('submitButton').disabled = false;
         new Ajax.Request('getPaymentRunningTotal', {
             asynchronous: false,
             onSuccess: function(transport) {
@@ -60,6 +61,7 @@
         });
     } else {
         $('showPaymentRunningTotal').update("");
+        $('submitButton').disabled = true;
     }
 }
 // -->
@@ -115,7 +117,7 @@
                     <div align="right">
                         ${uiLabelMap.AccountingGroupInOneTransaction}
                         <input type="checkbox" name="groupInOneTransaction" value="Y"/>
-                        <a href="javascript:document.depositWithdrawPaymentsForm.submit();" class="buttontext">${uiLabelMap.AccountingDepositWithdraw}</a>
+                        <input id="submitButton" type="button"  onclick="javascript:document.depositWithdrawPaymentsForm.submit();" value="${uiLabelMap.AccountingDepositWithdraw}" disabled/>
                     </div>
                 </table>
             <#else>
@@ -123,4 +125,4 @@
             </#if>
         </form>
     </div>
-</div>
\ No newline at end of file
+</div>

Modified: ofbiz/trunk/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl?rev=797762&r1=797761&r2=797762&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl (original)
+++ ofbiz/trunk/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl Sat Jul 25 12:24:06 2009
@@ -51,6 +51,8 @@
         $('checkAllInvoices').checked = true;
     }
     if (!isSingle) {
+        if ($('paymentMethodTypeId').value != "")
+            $('submitButton').disabled = false;
         new Ajax.Request('getInvoiceRunningTotal', {
             asynchronous: false,
             onSuccess: function(transport) {
@@ -59,6 +61,7 @@
             }, parameters: $('listPurchaseInvoices').serialize(), requestHeaders: {Accept: 'application/json'}
         });
     } else {
+        $('submitButton').disabled = true;
         $('showInvoiceRunningTotal').update("");
     }
 }
@@ -95,6 +98,7 @@
     } else {
         $('submitButton').disabled = false;
     }
+    getInvoiceRunningTotal('checkAllInvoices');
 }
 -->
 </script>

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=797762&r1=797761&r2=797762&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl (original)
+++ ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl Sat Jul 25 12:24:06 2009
@@ -53,6 +53,7 @@
     }
     
     if (!isSingle) {
+        $('submitButton').disabled = false;
         new Ajax.Request('getPaymentRunningTotal', {
             asynchronous: false,
             onSuccess: function(transport) {
@@ -61,6 +62,7 @@
             }, parameters: $('paymentBatchForm').serialize(), requestHeaders: {Accept: 'application/json'}
         });
     } else {
+        $('submitButton').disabled = true;
         $('showPaymentRunningTotal').update("");
     }
 }
@@ -119,4 +121,4 @@
             </#if>
         </form>
     </div>
-</div>
\ No newline at end of file
+</div>