[open-ils-commits] r15114 - in trunk: . Open-ILS/web/opac/locale/en-US Open-ILS/xul/staff_client/chrome/content/main Open-ILS/xul/staff_client/server/patron (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Dec 9 08:36:51 EST 2009
Author: phasefx
Date: 2009-12-09 08:36:50 -0500 (Wed, 09 Dec 2009)
New Revision: 15114
Modified:
trunk/
trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
trunk/Open-ILS/xul/staff_client/server/patron/bill_history.js
trunk/Open-ILS/xul/staff_client/server/patron/bill_history.xul
Log:
rough-cut of a payment-history interface
Property changes on: trunk
___________________________________________________________________
Name: bzr:revision-info
- timestamp: 2009-12-08 10:54:12.392999887 -0500
committer: Jason Etheridge <jason at esilibrary.com>
properties:
branch-nick: trunk
+ timestamp: 2009-12-09 08:36:42.950999975 -0500
committer: Jason Etheridge <jason at esilibrary.com>
properties:
branch-nick: trunk
Name: bzr:ancestry:v4
- phasefx at batrepo-20091014063314-vwbu74yuns94tzb4
jason at esilibrary.com-20091202233704-ej5adh761jjyc97k
jason at esilibrary.com-20091204160629-ilcxw9t02sqmo1qr
jason at esilibrary.com-20091208134806-0n0h8hf3gieuu5zz
jason at esilibrary.com-20091208155338-qatq3itbybh68tst
+ phasefx at batrepo-20091014063314-vwbu74yuns94tzb4
jason at esilibrary.com-20091202233704-ej5adh761jjyc97k
jason at esilibrary.com-20091204160629-ilcxw9t02sqmo1qr
jason at esilibrary.com-20091208134806-0n0h8hf3gieuu5zz
jason at esilibrary.com-20091208155338-qatq3itbybh68tst
jason at esilibrary.com-20091209133349-f98dfqy22fe4lt0m
Name: bzr:file-ids
- Open-ILS/xul/staff_client/chrome/content/util/network.js 2848 at dcc99617-32d9-48b4-a31d-7c20da2025e4:trunk:Open-ILS%2Fxul%2Fstaff_client%2Fchrome%2Fcontent%2Futil%2Fnetwork.js
+ Open-ILS/web/opac/locale/en-US/lang.dtd 1681 at dcc99617-32d9-48b4-a31d-7c20da2025e4:trunk:Open-ILS%2Fweb%2Fopac%2Flocale%2Fen-US%2Flang.dtd
Open-ILS/xul/staff_client/chrome/content/main/constants.js 2848 at dcc99617-32d9-48b4-a31d-7c20da2025e4:trunk:Open-ILS%2Fxul%2Fstaff_client%2Fchrome%2Fcontent%2Fmain%2Fconstants.js
Open-ILS/xul/staff_client/server/patron/bill_history.js 14198 at dcc99617-32d9-48b4-a31d-7c20da2025e4:trunk%2FOpen-ILS%2Fxul%2Fstaff_client%2Fserver%2Fpatron%2Fbill_history.js
Open-ILS/xul/staff_client/server/patron/bill_history.xul 3794 at dcc99617-32d9-48b4-a31d-7c20da2025e4:trunk:Open-ILS%2Fxul%2Fstaff_client%2Fserver%2Fpatron%2Fbill_history.xul
Name: bzr:revision-id:v4
- 11741 phasefx at batrepo-20091014063041-ama3i5s87ziqohxo
11742 phasefx at batrepo-20091014063644-pn3a6urkw3uxgr6n
12108 phasefx at batrepo-20091120084700-lavt73oserscgalf
12166 jason at esilibrary.com-20091202233906-g8kh2kh3qmmz66r1
12184 jason at esilibrary.com-20091204161020-0dqezh01c05btffh
12198 jason at esilibrary.com-20091208140008-eofwdbn2u8dxk2kk
12199 jason at esilibrary.com-20091208155412-4qdzy8sgs51vm0yq
+ 11741 phasefx at batrepo-20091014063041-ama3i5s87ziqohxo
11742 phasefx at batrepo-20091014063644-pn3a6urkw3uxgr6n
12108 phasefx at batrepo-20091120084700-lavt73oserscgalf
12166 jason at esilibrary.com-20091202233906-g8kh2kh3qmmz66r1
12184 jason at esilibrary.com-20091204161020-0dqezh01c05btffh
12198 jason at esilibrary.com-20091208140008-eofwdbn2u8dxk2kk
12199 jason at esilibrary.com-20091208155412-4qdzy8sgs51vm0yq
12215 jason at esilibrary.com-20091209133642-bp8mb3tc5vpoc1ij
Name: bzr:text-parents
- Open-ILS/xul/staff_client/chrome/content/util/network.js svn-v4:dcc99617-32d9-48b4-a31d-7c20da2025e4:trunk:14577
+ Open-ILS/web/opac/locale/en-US/lang.dtd jason at esilibrary.com-20091204161607-1gq44brnb7fxk895
Open-ILS/xul/staff_client/chrome/content/main/constants.js jason at esilibrary.com-20091204185841-i9b9msleuq3i3rgj
Open-ILS/xul/staff_client/server/patron/bill_history.js jason at esilibrary.com-20091209060449-hnm0aa0ds1h2ob5i
Open-ILS/xul/staff_client/server/patron/bill_history.xul jason at esilibrary.com-20091209060449-hnm0aa0ds1h2ob5i
Name: bzr:text-revisions
- Open-ILS/xul/staff_client/chrome/content/util/network.js jason at esilibrary.com-20091208155338-qatq3itbybh68tst
+ Open-ILS/web/opac/locale/en-US/lang.dtd jason at esilibrary.com-20091209060449-hnm0aa0ds1h2ob5i
Open-ILS/xul/staff_client/chrome/content/main/constants.js jason at esilibrary.com-20091209133349-f98dfqy22fe4lt0m
Open-ILS/xul/staff_client/server/patron/bill_history.js jason at esilibrary.com-20091209133349-f98dfqy22fe4lt0m
Open-ILS/xul/staff_client/server/patron/bill_history.xul jason at esilibrary.com-20091209133349-f98dfqy22fe4lt0m
Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2009-12-09 01:07:34 UTC (rev 15113)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2009-12-09 13:36:50 UTC (rev 15114)
@@ -2532,6 +2532,10 @@
<!ENTITY staff.patron.bill_history.print.accesskey "P">
<!ENTITY staff.patron.bill_history.selected_billed.label "Selected Billed:">
<!ENTITY staff.patron.bill_history.selected_paid.label "Selected Paid:">
+<!ENTITY staff.patron.bill_history.tab.transactions.label "Transactions">
+<!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_interface.total_owed "Total Owed:">
<!ENTITY staff.patron.bill_interface.total_checked "Total Checked:">
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js 2009-12-09 01:07:34 UTC (rev 15113)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js 2009-12-09 13:36:50 UTC (rev 15114)
@@ -228,6 +228,7 @@
'FM_MBTS_IDS_RETRIEVE_FOR_HISTORY.authoritative' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.history.have_bill.ids.authoritative' },
'FM_MP_RETRIEVE_VIA_MBTS_ID' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.payment.retrieve.all' },
'FM_MP_RETRIEVE_VIA_MBTS_ID.authoritative' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.payment.retrieve.all.authoritative' },
+ 'FM_MP_RETRIEVE_VIA_USER' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.payments.retrieve' },
'FM_MP_NOTE_EDIT' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.payment.note.edit' },
'FM_MG_CREATE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.grocery.create' },
'FM_MG_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.grocery.retrieve' },
Modified: trunk/Open-ILS/xul/staff_client/server/patron/bill_history.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/bill_history.js 2009-12-09 01:07:34 UTC (rev 15113)
+++ trunk/Open-ILS/xul/staff_client/server/patron/bill_history.js 2009-12-09 13:36:50 UTC (rev 15114)
@@ -1,4 +1,5 @@
function $(id) { return document.getElementById(id); }
+var payment_history_fetched = false;
function tally_selected() {
try {
@@ -76,6 +77,11 @@
function init_lists() {
JSAN.use('util.list'); JSAN.use('circ.util');
+ init_main_list();
+ init_payments_list();
+}
+
+function init_main_list() {
g.bill_list_selection = [];
g.bill_list = new util.list('bill_tree');
@@ -130,6 +136,34 @@
g.bill_list.set_list_actions();
}
+function init_payments_list() {
+ g.payments_list_selection = [];
+
+ g.payments_list = new util.list('payments_tree');
+
+ g.payments_list.init( {
+ 'columns' : g.payments_list.fm_columns('mp'),
+ 'on_select' : function(ev) {
+ JSAN.use('util.functional');
+ g.payments_list_selection = util.functional.map_list(
+ g.payments_list.retrieve_selection(),
+ function(o) { return o.getAttribute('retrieve_id'); }
+ );
+ },
+ 'retrieve_row' : function(params) {
+ var id = params.retrieve_id;
+ var row = params.row;
+ if (typeof params.on_retrieve == 'function') {
+ params.on_retrieve(row);
+ };
+ return row;
+ },
+ } );
+
+ $('payments_list_actions').appendChild( g.payments_list.render_list_actions() );
+ g.payments_list.set_list_actions();
+}
+
function my_init() {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
@@ -247,4 +281,51 @@
}
}
+function payment_history_init() {
+ try {
+ if (payment_history_fetched) { return; } else { payment_history_fetched = true; }
+ g.payments_list.clear();
+
+ $('payments_meter').hidden = false;
+
+ fieldmapper.standardRequest(
+ [ api.FM_MP_RETRIEVE_VIA_USER.app, api.FM_MP_RETRIEVE_VIA_USER.method ],
+ { async: true,
+ params: [ses(), g.patron_id],
+ onresponse: function(r) {
+ try {
+ var result = r.recv().content();
+
+ if (result && typeof result.ilsevent == 'undefined') {
+ g.payments_list.append(
+ {
+ 'retrieve_id' : result.id(),
+ 'row' : {
+ 'my' : {
+ 'mp' : result
+ }
+ }
+ }
+ );
+ } else {
+ throw( js2JSON(result) );
+ }
+ } catch(E) {
+ alert('Error retrieving payment in bill_history.js, onresponse: ' + E);
+ }
+ },
+ oncomplete: function() {
+ $('payments_meter').hidden = true;
+ },
+ onerror: function(r) {
+ var result = r.recv().content();
+ alert('Error retrieving payment in bill_history.js, onerror: ' + js2JSON(result));
+ }
+ }
+ );
+
+ } catch(E) {
+ alert('Error in bill_history.js, payment_history_init(): ' + E);
+ }
+}
Modified: trunk/Open-ILS/xul/staff_client/server/patron/bill_history.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/bill_history.xul 2009-12-09 01:07:34 UTC (rev 15113)
+++ trunk/Open-ILS/xul/staff_client/server/patron/bill_history.xul 2009-12-09 13:36:50 UTC (rev 15114)
@@ -26,8 +26,8 @@
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<!-- BEHAVIOR -->
- <script type="text/javascript">var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};</script>
- <scripts id="openils_util_scripts"/>
+ <script type="text/javascript">var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};</script>
+ <scripts id="openils_util_scripts"/>
<script type="text/javascript" src="/xul/server/main/JSAN.js"/>
<script type="text/javascript" src="bill_history.js"/>
@@ -38,21 +38,42 @@
<vbox flex="1" class="my_overflow">
<groupbox orient="vertical" flex="1">
<caption id="caption" label="&staff.patron.bill_history.caption.label;"/>
- <hbox>
- <label value='&staff.patron.bill_history.selected_billed.label;' style='font-weight: bold;'/>
- <label id="billed_tally" />
- <label value='&staff.patron.bill_history.selected_paid.label;' style='font-weight: bold;'/>
- <label id="paid_tally" />
- </hbox>
- <tree id="bill_tree" flex="1" enableColumnDrag="true" seltype="multiple"/>
- <hbox>
- <hbox id="bill_list_actions" />
- <spacer flex="1"/>
- <button id="opac" label="&staff.patron.bill_history.show_in_catalog.label;" accesskey="&staff.patron.bill_history.show_in_catalog.accesskey;" hidden="true" oncommand="alert('Not Yet Implemented');"/>
- <button id="print" label="&staff.patron.bill_history.print.label;" accesskey="&staff.patron.bill_history.print.accesskey;" hidden="false" oncommand="print_bills();"/>
- <button id="add" label="&staff.patron.bill_history.add_billing.label;" disabled="true"/>
- <button id="details" label="&staff.patron.bill_history.full_details.label;" disabled="true" accesskey="&staff.patron.bill_history.full_details.accesskey;"/>
- </hbox>
+ <tabbox flex="1">
+ <tabs>
+ <tab label="&staff.patron.bill_history.tab.transactions.label;" accesskey="&staff.patron.bill_history.tab.transactions.accesskey;"/>
+ <tab label="&staff.patron.bill_history.tab.payments.label;" accesskey="&staff.patron.bill_history.tab.payments.accesskey;" oncommand="payment_history_init();"/>
+ </tabs>
+ <tabpanels flex="1">
+ <tabpanel orient="vertical">
+ <hbox>
+ <label value='&staff.patron.bill_history.selected_billed.label;' style='font-weight: bold;'/>
+ <label id="billed_tally" />
+ <label value='&staff.patron.bill_history.selected_paid.label;' style='font-weight: bold;'/>
+ <label id="paid_tally" />
+ </hbox>
+ <tree id="bill_tree" flex="1" enableColumnDrag="true" seltype="multiple"/>
+ <hbox>
+ <hbox id="bill_list_actions" />
+ <spacer flex="1"/>
+ <button id="opac" label="&staff.patron.bill_history.show_in_catalog.label;" accesskey="&staff.patron.bill_history.show_in_catalog.accesskey;" hidden="true" oncommand="alert('Not Yet Implemented');"/>
+ <button id="print" label="&staff.patron.bill_history.print.label;" accesskey="&staff.patron.bill_history.print.accesskey;" hidden="false" oncommand="print_bills();"/>
+ <button id="add" label="&staff.patron.bill_history.add_billing.label;" disabled="true"/>
+ <button id="details" label="&staff.patron.bill_history.full_details.label;" disabled="true" accesskey="&staff.patron.bill_history.full_details.accesskey;"/>
+ </hbox>
+ </tabpanel>
+ <tabpanel orient="vertical">
+ <hbox>
+ <spacer flex="1"/>
+ <progressmeter id ="payments_meter" mode="undetermined" hidden="true"/>
+ <spacer flex="1"/>
+ </hbox>
+ <tree id="payments_tree" flex="1" enableColumnDrag="true" seltype="multiple"/>
+ <hbox>
+ <hbox id="payments_list_actions" />
+ </hbox>
+ </tabpanel>
+ </tabpanels>
+ </tabbox>
</groupbox>
</vbox>
More information about the open-ils-commits
mailing list