diff --git a/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl b/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl index 02fd7caedf..49ea70b181 100644 --- a/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl +++ b/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl @@ -28,10 +28,10 @@ function togglefinAccountTransId(master) { element.checked = master.checked; } } - getFinAccountTransRunningTotal(master); + getFinAccountTransRunningTotal(); } -function getFinAccountTransRunningTotal(e) { +function getFinAccountTransRunningTotal() { var form = document.selectAllForm; var finAccountTransList = form.elements.length; var isSingle = true; @@ -46,12 +46,13 @@ function getFinAccountTransRunningTotal(e) { } } } - if (!($(e).checked)) { - $('checkAllTransactions').checked = false; - } else if (isAllSelected) { + if (isAllSelected) { $('checkAllTransactions').checked = true; + } else { + $('checkAllTransactions').checked = false; } if (!isSingle) { + $('submitButton').disabled = false; new Ajax.Request('getFinAccountTransRunningTotal', { asynchronous: false, onSuccess: function(transport) { @@ -61,6 +62,7 @@ function getFinAccountTransRunningTotal(e) { }); } else { $('showFinAccountTransRunningTotal').update(""); + $('submitButton').disabled = true; } } --> @@ -196,7 +198,7 @@ function getFinAccountTransRunningTotal(e) { - + <#if finAccountTrans.finAccountTransTypeId="ADJUSTMENT"> @@ -223,7 +225,7 @@ function getFinAccountTransRunningTotal(e) { <#if !grandTotal?exists>
- +
diff --git a/applications/accounting/webapp/accounting/payment/depositWithdrawPayments.ftl b/applications/accounting/webapp/accounting/payment/depositWithdrawPayments.ftl index 29fc7cd1c4..b30f273cab 100644 --- a/applications/accounting/webapp/accounting/payment/depositWithdrawPayments.ftl +++ b/applications/accounting/webapp/accounting/payment/depositWithdrawPayments.ftl @@ -28,9 +28,9 @@ function togglePaymentId(master) { element.checked = master.checked; } } - getPaymentRunningTotal(master); + getPaymentRunningTotal(); } -function getPaymentRunningTotal(e) { +function getPaymentRunningTotal() { var form = document.depositWithdrawPaymentsForm; var payments = form.elements.length; var isSingle = true; @@ -45,10 +45,10 @@ function getPaymentRunningTotal(e) { } } } - if (!($(e).checked)) { - $('checkAllPayments').checked = false; - } else if (isAllSelected) { + if (isAllSelected) { $('checkAllPayments').checked = true; + } else { + $('checkAllPayments').checked = false; } if (!isSingle) { $('submitButton').disabled = false; @@ -117,7 +117,7 @@ function getPaymentRunningTotal(e) { ${payment.effectiveDate?if_exists} ${uiLabelMap.AccountingDeposit}  - + diff --git a/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl b/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl index 2e98b90b32..9ccf9f9aac 100644 --- a/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl +++ b/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl @@ -27,10 +27,10 @@ function toggleInvoiceId(master) { element.checked = master.checked; } } - getInvoiceRunningTotal(master); + getInvoiceRunningTotal(); } -function getInvoiceRunningTotal(e) { +function getInvoiceRunningTotal() { var form = document.listPurchaseInvoices; var invoices = form.elements.length; var isSingle = true; @@ -45,10 +45,10 @@ function getInvoiceRunningTotal(e) { } } } - if (!($(e).checked)) { - $('checkAllInvoices').checked = false; - } else if (isAllSelected) { + if (isAllSelected) { $('checkAllInvoices').checked = true; + } else { + $('checkAllInvoices').checked = false; } if (!isSingle) { if ($('paymentMethodTypeId').value != "") @@ -98,7 +98,7 @@ function enableSubmitButton() { } else { $('submitButton').disabled = false; } - getInvoiceRunningTotal('checkAllInvoices'); + getInvoiceRunningTotal(); } --> @@ -166,7 +166,7 @@ function enableSubmitButton() { <#if invoicePaymentInfo.outstandingAmount != 0> <#assign statusItem = invoice.getRelatedOneCache("StatusItem")> class="alternate-row"> - + ${invoice.get("invoiceId")} ${Static["org.ofbiz.party.party.PartyHelper"].getPartyName(delegator, invoice.partyIdFrom, false)?if_exists} ${statusItem.get("description")?if_exists} diff --git a/applications/accounting/webapp/ar/payment/batchPayments.ftl b/applications/accounting/webapp/ar/payment/batchPayments.ftl index 0c4279fac7..566299a721 100644 --- a/applications/accounting/webapp/ar/payment/batchPayments.ftl +++ b/applications/accounting/webapp/ar/payment/batchPayments.ftl @@ -28,9 +28,9 @@ function togglePaymentId(master) { element.checked = master.checked; } } - getPaymentRunningTotal(master); + getPaymentRunningTotal(); } -function getPaymentRunningTotal(e) { +function getPaymentRunningTotal() { var form = document.paymentBatchForm; var payments = form.elements.length; var isSingle = true; @@ -45,13 +45,11 @@ function getPaymentRunningTotal(e) { } } } - if (!($(e).checked)) { - $('checkAllPayments').checked = false; - - } else if (isAllSelected) { + if (isAllSelected) { $('checkAllPayments').checked = true; + } else { + $('checkAllPayments').checked = false; } - if (!isSingle) { $('submitButton').disabled = false; new Ajax.Request('getPaymentRunningTotal', {