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}
-
+
|
#list>
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"#if>>
- |
+ |
${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', {