Author: ashish
Date: Thu Oct 22 11:27:48 2009
New Revision: 828661
URL: http://svn.apache.org/viewvc?rev=828661&view=rev
Log:
Applied patch from jira issue OFBIZ-3072 - Consistency on List Batch Payments.
https://demo.ofbiz.org/ar/control/batchPayments screen should have the actions
in drop-down for the list as like https://demo.ofbiz.org/control/findInvoices
Thanks Chirag for the contribution.
Modified:
ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl
ofbiz/trunk/applications/accounting/widget/ar/CommonScreens.xml
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=828661&r1=828660&r2=828661&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl
(original)
+++ ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl Thu
Oct 22 11:27:48 2009
@@ -64,14 +64,36 @@
$('showPaymentRunningTotal').update("");
}
}
+function setServiceName(selection) {
+ $('paymentBatchForm').action =
'<@ofbizUrl>'+selection.value+'</@ofbizUrl>';
+ showCreatePaymentBatch(selection);
+ $('submitButton').disabled = true;
+}
+function showCreatePaymentBatch(selection) {
+ if (selection.value == 'createPaymentBatch') {
+ Effect.BlindDown('createPaymentBatch',{duration: 0.0});
+ } else {
+ Effect.BlindUp('createPaymentBatch',{duration: 0.0});
+ }
+}
+
// -->
</script>
<div class="screenlet">
<div class="screenlet-body">
- <form id="paymentBatchForm" name="paymentBatchForm" method="post"
action="<@ofbizUrl>createPaymentBatch</@ofbizUrl>">
+ <form id="paymentBatchForm" name="paymentBatchForm" method="post"
action="">
<#if paymentList?has_content>
<div>
+ <span class="label">${uiLabelMap.AccountingRunningTotal}
:</span>
+ <span class="label" id="showPaymentRunningTotal"></span>
+ </div>
+ <div align="right">
+ <select name="serviceName" id="serviceName"
onchange="javascript:setServiceName(this);">
+ <option
value="">${uiLabelMap.AccountingSelectAction}</options>
+ <option
value="createPaymentBatch">${uiLabelMap.AccountingCreateBatch}</option>
+ </select>
+ <input id="submitButton" type="button"
onclick="javascript:$('paymentBatchForm').submit();"
value="${uiLabelMap.OrderRunAction}" disabled/>
<input type="hidden" name='organizationPartyId'
value="${organizationPartyId?if_exists}">
<input type="hidden" name='paymentGroupTypeId'
value="BATCH_PAYMENT">
<input type="hidden" name="groupInOneTransaction"
value="Y"/>
@@ -84,10 +106,6 @@
<input type="hidden" name='fromDate'
value="${fromDate?if_exists}">
<input type="hidden" name='thruDate'
value="${thruDate?if_exists}">
</div>
- <div>
- <span class="label">${uiLabelMap.AccountingRunningTotal}
:</span>
- <span class="label" id="showPaymentRunningTotal"></span>
- </div>
<table class="basic-table">
<tr class="header-row">
<td>${uiLabelMap.FormFieldTitle_paymentId}</td>
@@ -117,7 +135,7 @@
</td>
</tr>
</#list>
- <div align="right">
+ <div id="createPaymentBatch" style="display: none;"
align="right">
<span
class="label">${uiLabelMap.AccountingPaymentGroupName}</span>
<input type="text" size='25' id="paymentGroupName"
name='paymentGroupName'>
<#if finAccounts?has_content>
@@ -128,7 +146,6 @@
</#list>
</select>
</#if>
- <input id="submitButton" type="submit"
value="${uiLabelMap.AccountingCreateBatch}"/>
<div>
</table>
<#else>
Modified: ofbiz/trunk/applications/accounting/widget/ar/CommonScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ar/CommonScreens.xml?rev=828661&r1=828660&r2=828661&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/ar/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/ar/CommonScreens.xml Thu Oct 22
11:27:48 2009
@@ -26,6 +26,7 @@
<property-map resource="CommonUiLabels" map-name="uiLabelMap"
global="true"/>
<property-map resource="AccountingUiLabels"
map-name="uiLabelMap" global="true"/>
<property-map resource="PartyUiLabels" map-name="uiLabelMap"
global="true"/>
+ <property-map resource="OrderUiLabels" map-name="uiLabelMap"
global="true"/>
<set field="layoutSettings.companyName"
from-field="uiLabelMap.AccountingArCompanyName" global="true"/>
<set field="layoutSettings.companySubtitle"
from-field="uiLabelMap.AccountingCompanySubtitle" global="true"/>