Code improvements.
Submit button on Bank Reconciliation screen should be disabled till the minimum one transaction is selected. Thanks Rishi Solanki for the patch. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@800201 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -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) {
|
||||
<input name="finAccountTransId_o_${finAccountTrans_index}" type="hidden" value="${finAccountTrans.finAccountTransId}"/>
|
||||
<input name="organizationPartyId_o_${finAccountTrans_index}" type="hidden" value="${defaultOrganizationPartyId}"/>
|
||||
<td>
|
||||
<input id="finAccountTransId_${finAccountTrans_index}" name="_rowSubmit_o_${finAccountTrans_index}" type="checkbox" value="Y" onclick="javascript:getFinAccountTransRunningTotal('finAccountTransId_${finAccountTrans_index}');"/>
|
||||
<input id="finAccountTransId_${finAccountTrans_index}" name="_rowSubmit_o_${finAccountTrans_index}" type="checkbox" value="Y" onclick="javascript:getFinAccountTransRunningTotal();"/>
|
||||
</td>
|
||||
<#if finAccountTrans.finAccountTransTypeId="ADJUSTMENT">
|
||||
</tr>
|
||||
@@ -223,7 +225,7 @@ function getFinAccountTransRunningTotal(e) {
|
||||
</#list>
|
||||
<#if !grandTotal?exists>
|
||||
<div align="right">
|
||||
<input id="submitButton" type="submit" onclick="javascript:document.selectAllForm.submit();" value="${uiLabelMap.AccountingReconcile}"/>
|
||||
<input id="submitButton" type="submit" onclick="javascript:document.selectAllForm.submit();" value="${uiLabelMap.AccountingReconcile}" disabled/>
|
||||
<div>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
@@ -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) {
|
||||
<td>${payment.effectiveDate?if_exists}</td>
|
||||
<td align="right">
|
||||
${uiLabelMap.AccountingDeposit}
|
||||
<input type="checkbox" id="paymentId_${payment_index}" name="paymentIds" value="${payment.paymentId}" onclick="javascript:getPaymentRunningTotal('paymentId_${payment_index}');"/>
|
||||
<input type="checkbox" id="paymentId_${payment_index}" name="paymentIds" value="${payment.paymentId}" onclick="javascript:getPaymentRunningTotal();"/>
|
||||
</td>
|
||||
</tr>
|
||||
</#list>
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
-->
|
||||
</script>
|
||||
@@ -166,7 +166,7 @@ function enableSubmitButton() {
|
||||
<#if invoicePaymentInfo.outstandingAmount != 0>
|
||||
<#assign statusItem = invoice.getRelatedOneCache("StatusItem")>
|
||||
<tr valign="middle"<#if alt_row> class="alternate-row"</#if>>
|
||||
<td><input type="checkbox" id="invoiceId_${invoice_index}" name="invoiceIds" value="${invoice.invoiceId}" onclick="javascript:getInvoiceRunningTotal('invoiceId_${invoice_index}');"/></td>
|
||||
<td><input type="checkbox" id="invoiceId_${invoice_index}" name="invoiceIds" value="${invoice.invoiceId}" onclick="javascript:getInvoiceRunningTotal();"/></td>
|
||||
<td><a class="buttontext" href="<@ofbizUrl>invoiceOverview?invoiceId=${invoice.invoiceId}</@ofbizUrl>">${invoice.get("invoiceId")}</a></td>
|
||||
<td>${Static["org.ofbiz.party.party.PartyHelper"].getPartyName(delegator, invoice.partyIdFrom, false)?if_exists}</td>
|
||||
<td>${statusItem.get("description")?if_exists}</td>
|
||||
|
||||
@@ -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', {
|
||||
|
||||
Reference in New Issue
Block a user