<!ENTITY staff.patron.bill_history.tab.transactions.accesskey "T">
<!ENTITY staff.patron.bill_history.tab.payments.label "Payments">
<!ENTITY staff.patron.bill_history.tab.payments.accesskey "y">
+<!ENTITY staff.patron.bill_history.payments.start_date.label "Start Date">
+<!ENTITY staff.patron.bill_history.payments.start_date.accesskey "S">
+<!ENTITY staff.patron.bill_history.payments.end_date.label "End Date">
+<!ENTITY staff.patron.bill_history.payments.end_date.accesskey "">
+<!ENTITY staff.patron.bill_history.payments.retrieve.label "Retrieve Payments">
+<!ENTITY staff.patron.bill_history.payments.retrieve.accesskey "R">
<!ENTITY staff.patron.bill_interface.total_owed "Total Owed:">
<!ENTITY staff.patron.bill_interface.total_checked "Total Checked:">
try {
if (payment_history_fetched) { return; } else { payment_history_fetched = true; }
+ $('payments_date1').year = $('payments_date1').year - 1;
+
+ retrieve_payments();
+
+ } catch(E) {
+ alert('Error in bill_history.js, payment_history_init(): ' + E);
+ }
+}
+
+function retrieve_payments() {
+ try {
+
g.payments_list.clear();
$('payments_meter').hidden = false;
+ var filters = {
+ 'where' : {
+ 'payment_ts' : {
+ 'between' : [
+ $('payments_date1').value,
+ $('payments_date2').value == util.date.formatted_date(new Date(),'%F') ? 'now' : $('payments_date2').value
+ ]
+ }
+ }
+ };
+
fieldmapper.standardRequest(
[ api.FM_MP_RETRIEVE_VIA_USER.app, api.FM_MP_RETRIEVE_VIA_USER.method ],
{ async: true,
- params: [ses(), g.patron_id],
+ params: [ses(), g.patron_id, filters],
onresponse: function(r) {
try {
var result = r.recv().content();
);
} catch(E) {
- alert('Error in bill_history.js, payment_history_init(): ' + E);
+ alert('Error in bill_history.js, retrieve_payments(): ' + E);
}
}
</tabpanel>
<tabpanel orient="vertical">
<hbox>
- <spacer flex="1"/>
- <progressmeter id ="payments_meter" mode="undetermined" hidden="true"/>
- <spacer flex="1"/>
+ <toolbox flex="1">
+ <toolbar>
+ <toolbarspring/>
+ <toolbaritem>
+ <progressmeter id="payments_meter" flex="1" hidden="true" mode="undetermined"/>
+ </toolbaritem>
+ <toolbaritem>
+ <vbox pack="center">
+ <label control="payments_date1"
+ value="&staff.patron.bill_history.payments.start_date.label;"
+ accesskey="&staff.patron.bill_history.payments.start_date.accesskey;" />
+ </vbox>
+ <datepicker id="payments_date1" type="popup" />
+ <vbox pack="center">
+ <label control="payments_date2"
+ value="&staff.patron.bill_history.payments.end_date.label;"
+ accesskey="&staff.patron.bill_history.payments.end_date.accesskey;" />
+ </vbox>
+ <datepicker id="payments_date2" type="popup" />
+ </toolbaritem>
+ <toolbarbutton id="payments_retrieve_btn"
+ label="&staff.patron.bill_history.payments.retrieve.label;"
+ accesskey="&staff.patron.bill_history.payments.retrieve.accesskey;"
+ oncommand="retrieve_payments();"
+ style="-moz-user-focus: normal" />
+ </toolbar>
+ </toolbox>
</hbox>
<tree id="payments_tree" flex="1" enableColumnDrag="true" seltype="multiple"/>
<hbox>