forgot to add these. bills in progress
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 17 Dec 2005 06:37:37 +0000 (06:37 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 17 Dec 2005 06:37:37 +0000 (06:37 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2432 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/patron/bills.js [new file with mode: 0644]
Open-ILS/xul/staff_client/server/patron/bills.xul [new file with mode: 0644]
Open-ILS/xul/staff_client/server/patron/bills_overlay.xul [new file with mode: 0644]
Open-ILS/xul/staff_client/server/patron/holds.js [new file with mode: 0644]
Open-ILS/xul/staff_client/server/patron/holds.xul [new file with mode: 0644]
Open-ILS/xul/staff_client/server/patron/holds_overlay.xul [new file with mode: 0644]

diff --git a/Open-ILS/xul/staff_client/server/patron/bills.js b/Open-ILS/xul/staff_client/server/patron/bills.js
new file mode 100644 (file)
index 0000000..a4bc24d
--- /dev/null
@@ -0,0 +1,266 @@
+dump('entering patron.bills.js\n');
+
+if (typeof patron == 'undefined') patron = {};
+patron.bills = function (params) {
+
+       JSAN.use('util.error'); this.error = new util.error();
+       JSAN.use('util.network'); this.network = new util.network();
+       this.OpenILS = {}; JSAN.use('OpenILS.data'); this.OpenILS.data = new OpenILS.data(); this.OpenILS.data.init({'via':'stash'});
+}
+
+patron.bills.prototype = {
+
+       'current_payments' : [],
+
+       'init' : function( params ) {
+
+               var obj = this;
+
+               obj.session = params['session'];
+               obj.patron_id = params['patron_id'];
+
+               JSAN.use('util.list'); obj.list = new util.list('bill_list');
+
+               function getString(s) { return obj.OpenILS.data.entities[s]; }
+               obj.list.init(
+                       {
+                               'columns' : {
+                                               {
+                                                       'id' : 'checkbox', 'label' : '', 'flex' : 0, 'primary' : false, 'hidden' : false,
+                                                       'render' : 'document.createElement("checkbox")'
+                                               },
+                                               {
+                                                       'id' : 'xact_dates', 'label' : getString('staff.bills_xact_dates_label'), 'flex' : 0,
+                                                       'primary' : false, 'hidden' : false, 'render' : 'xact_dates_box(my.mbts)'
+                                               },
+                                               {
+                                                       'id' : 'notes', 'label' : getString('staff.bills_information'), 'flex' : 0,
+                                                       'primary' : false, 'hidden' : false, 'render' : 'info_box(my.mbts)'
+                                               },
+                                               {
+                                                       'id' : 'money', 'label' : getString('staff.bills_money_label'), 'flex' : 0,
+                                                       'primary' : false, 'hidden' : false, 'render' : 'money_box(my.mbts)'
+                                               },
+                                               {
+                                                       'id' : 'current_pay', 'label' : getString('staff.bills_current_payment_label'), 'flex' : 0, 
+                                                       'render' : 'document.createElement("textbox")'
+                                               }
+                               },
+                               'map_row_to_column' : function(row,col) {
+                                       // row contains { 'my' : { 'mbts' : ... } }
+                                       // col contains one of the objects listed above in columns
+
+                                       var obj = {}; obj.OpenILS = {}; 
+                                       JSAN.use('util.error'); obj.error = new util.error();
+                                       //JSAN.use('OpenILS.data'); obj.OpenILS.data = new OpenILS.data(); obj.OpenILS.data.init({'via':'stash'});
+
+                                       var my = row.my;
+                                       var value;
+                                       try {
+                                               value = eval( col.render );
+                                       } catch(E) {
+                                               obj.error.sdump('D_ERROR','map_row_to_column: ' + E);
+                                               value = '???';
+                                       }
+                                       return value;
+                               },
+                       }
+               );
+
+               JSAN.use('util.controller'); obj.controller = new util.controller();
+               obj.controller.init(
+                       {
+                               'control_map' : {
+                                       'cmd_broken' : [
+                                               ['command'],
+                                               function() { alert('Not Yet Implemented'); }
+                                       ],
+                                       'cmd_bill_wizard' : [
+                                               ['command'],
+                                               function() { alert('Not Yet Implemented'); }
+                                       ],
+                                       'cmd_change_to_credit' : [
+                                               ['command'],
+                                               function() {
+                                                       obj.change_to_credit();
+                                               }
+                                       ],
+                                       'cmd_bill_apply_payment' : [
+                                               ['command'],
+                                               function() {
+                                                       obj.apply_payment();
+                                               }
+                                       ],
+                                       'bill_total_owed' : [
+                                               ['render'],
+                                               function(e) { return function() {}; }
+                                       ],
+                                       'payment_type' : [
+                                               ['render'],
+                                               function(e) { return function() {}; }
+                                       ],
+                                       'bill_payment_amount' : [
+                                               ['change'],
+                                               function(ev) {
+                                                       JSAN.use('util.money');
+                                                       var tb = ev.target;
+                                                       tb.value = util.money.cents_as_dollars( util.money.dollars_float_to_cents_integer( tb.value ) );
+                                                       var total = util.money.dollars_float_to_cents_integer( tb.value );
+                                                       for (var i = 0; i < obj.current_payments.length; i++) {
+                                                               var bill = obj.current_payments[i];
+                                                               if (bill.checkbox.checked) {
+                                                                       var bo = util.money.dollars_float_to_cents_integer( bill.balance_owed );
+                                                                       if ( bo > total ) {
+                                                                               bill.textbox.value = util.money.cents_as_dollars( total );
+                                                                               total = 0;
+                                                                       } else {
+                                                                               bill.textbox.value = util.money.cents_as_dollars( bo );
+                                                                               total = total - bo;
+                                                                       }
+                                                               } else {
+                                                                       bill.textbox.value = '0.00';
+                                                               }
+                                                       }
+                                                       obj.update_payment_applied();
+                                               }; 
+                                       ],
+                                       'bill_payment_applied' : [
+                                               ['render'],
+                                               function(e) { return function() {}; }
+                                       ],
+                                       'bill_change_amount' : [
+                                               ['change'],
+                                               function(ev) {
+                                                       JSAN.use('util.money');
+                                                       var tb = ev.target;
+                                                       var proposed_change = util.money.dollars_float_to_cents_integer( tb.value );
+                                                       var proposed_credit = 0;
+                                                       obj.update_payment_applied();
+                                                       var real_change = util.money.dollars_float_to_cents_integer( tb.value );
+                                                       if ( proposed_change > real_change ) {
+                                                               obj.error.sdump('D_ERROR','Someone wanted more money than they deserved\n');
+                                                               proposed_change = real_change;
+                                                       } else if ( real_change > proposed_change ) {
+                                                               proposed_credit = real_change - proposed_change;
+                                                       }
+                                                       tb.value = util.money.cents_as_dollars( proposed_change );
+                                                       obj.controller.view.bill_credit_amount.value = util.money.cents_as_dollars( proposed_credit );
+                                               }
+                                       ],
+                                       'bill_credit_amount' : [
+                                               ['render'],
+                                               function(e) { return function() {}; }
+                                       ],
+                                       'bill_new_balance' : [
+                                               ['render'],
+                                               function(e) { return function() {}; }
+                                       ],
+                               }
+                       }
+               );
+
+       },
+
+       'apply_payment' : function() {
+               var obj = this;
+               var payment_blob = {};
+               payment_blob.userid = obj.patron_id;
+               payment_blob.note = '';
+               payment_blob.cash_drawer = 1; // FIXME: get new Config() to work
+               payment_blob.payment_type = obj.controller.view.payment_type.value;
+               payment_blob.payments = [];
+               payment_blob.patron_credit = obj.controller.view.bill_credit_amount.value;
+               for (var i = 0; i < obj.current_payments.length; i++) {
+                       var tb = obj.current_payments[ i ].textbox;
+                       if ( !(tb.value == '0.00' || tb.value == '') ) {
+                               payment_blob.payments.push( 
+                                       [
+                                               obj.current_payments[ i ].mbts_id,
+                                               tb.value
+                                       ]
+                               );
+                       }
+               }
+               try {
+                       if ( obj.pay( payment_blob ) ) {
+
+                               //FIXME//Refresh
+
+                       }
+
+               } catch(E) {
+
+                       obj.error.sdump('D_ERROR',E);
+               }
+       },
+
+       'pay' : function(payment_blob) {
+               try {
+                       var robj = this.network.retrieve(
+                               api.bill_pay.app,       
+                               api.bill_pay.method,
+                               [ this.session, payment_blob ]
+                       );
+                       if (robj && robj.ilsevent && robj.ilsevent == 0) {
+                               return true;
+                       } else {
+                               throw robj;
+                       }
+               } catch(E) {
+                       this.error.sdump('D_ERROR','patron.bills.pay: ' + E);
+                       return false;
+               }
+       },
+
+       'update_payment_applied' : function() {
+               JSAN.use('util.money');
+               var obj = this;
+               var total_applied = 0;
+               for (var i = 0; i < obj.current_payments.length; i++) {
+                       total_applied += util.money.dollars_float_to_cents_integer( obj.current_payments[ i ].textbox.value );
+               }
+               var total_payment = 0;
+               if (obj.controller.view.bill_payment_amount.value) {
+                       try {
+                               total_payment = util.money.dollars_float_to_cents_integer( obj.controller.view.bill_payment_amount.value );
+                       } catch(E) {
+                               obj.error.sdump('D_ERROR',E + '\n');
+                       }
+               }
+               if ( total_applied > total_payment ) {
+                       total_payment = total_applied;
+                       obj.controller.view.bill_payment_amount.value = util.money.cents_as_dollars( total_applied );
+               }
+               obj.controller.view.bill_payment_applied.value = util.money.cents_as_dollars( total_applied );
+               obj.controller.view.bill_credit_amount.value = '';
+               if (total_payment > total_applied ) {
+                       obj.controller.view.bill_change_amount.value = util.money.cents_as_dollars( total_payment - total_applied);
+                       obj.controller.view.bill_credit_amount.value = '0.00';
+               } else {
+                       obj.controller.view.bill_change_amount.value = '0.00';
+                       obj.controller.view.bill_credit_amount.value = '0.00';
+               }
+               var total_owed = util.money.dollars_float_to_cents_integer( obj.controller.view.bill_total_owed.value );
+               obj.controller.view.bill_new_balance.value = util.money.cents_as_dollars( total_owed - total_applied );
+       },
+
+       'change_to_credit' : function() {
+               JSAN.use('util.money');
+               var obj = this;
+               var tb = obj.controller.view.bill_change_amount;
+               var proposed_change = 0;
+               var proposed_credit = util.money.dollars_float_to_cents_integer( tb.value );
+               obj.update_payment_applied();
+               var real_change = util.money.dollars_float_to_cents_integer( tb.value );
+               if ( proposed_change > real_change ) {
+                       obj.error.sdump('D_ERROR','Someone wanted more money than they deserved\n');
+                       proposed_change = real_change;
+               } else if ( real_change > proposed_change ) {
+                       proposed_credit = real_change - proposed_change;
+               }
+               tb.value = util.money.cents_as_dollars( proposed_change );
+               obj.controller.view.bill_credit_amount.value = util.money.cents_as_dollars( proposed_credit );
+       }
+}
+
+dump('exiting patron.bills.js\n');
diff --git a/Open-ILS/xul/staff_client/server/patron/bills.xul b/Open-ILS/xul/staff_client/server/patron/bills.xul
new file mode 100644 (file)
index 0000000..75c8adf
--- /dev/null
@@ -0,0 +1,71 @@
+<?xml version="1.0"?>
+<!-- Application: Evergreen Staff Client -->
+<!-- Screen: Patron Display -->
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- STYLESHEETS -->
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<?xml-stylesheet href="/xul/server/skin/evergreen.css" type="text/css"?>
+<?xml-stylesheet href="/xul/server/skin/circ.css" type="text/css"?>
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- LOCALIZATION -->
+<!DOCTYPE window SYSTEM "chrome://evergreen/locale/lang.dtd">
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- OVERLAYS -->
+<?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
+<?xul-overlay href="/xul/server/patron/bills_overlay.xul"?>
+
+<window id="bills_win" 
+       onload="my_init()"
+       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+       <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+       <!-- BEHAVIOR -->
+        <script type="text/javascript">var myPackageDir = 'evergreen'; var IAMXUL = true; var g = {};</script>
+        <scripts id="openils_util_scripts"/>
+
+       <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
+       <script>
+       <![CDATA[
+               function my_init() {
+                       try {
+                               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+                               if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
+                               JSAN.errorLevel = "die"; // none, warn, or die
+                               JSAN.addRepository('/xul/server/');
+                               JSAN.use('util.error'); g.error = new util.error();
+                               g.error.sdump('D_TRACE','my_init() for bills.xul');
+
+                               g.cgi = new CGI();
+
+                               JSAN.use('patron.bills'); g.bills = new patron.bills();
+                               g.bills.init( 
+                                       { 
+                                               'patron_id' : g.cgi.param('patron_id'), 
+                                               'session' : g.cgi.param('session') 
+                                       } 
+                               );
+       
+                       } catch(E) {
+                               var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
+                                       "system administrator or software developer the following:\n" + E + '\n';
+                               try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
+                               alert(err_msg);
+                       }
+               }
+
+       ]]>
+       </script>
+
+       <commandset id="bills_cmds">
+               <command id="cmd_bill_wizard" />
+               <command id="cmd_bill_apply_payment" />
+               <command id="cmd_change_to_credit" />
+       </commandset>
+
+       <box id="bills_main" />
+
+</window>
+
diff --git a/Open-ILS/xul/staff_client/server/patron/bills_overlay.xul b/Open-ILS/xul/staff_client/server/patron/bills_overlay.xul
new file mode 100644 (file)
index 0000000..f5b790c
--- /dev/null
@@ -0,0 +1,99 @@
+<?xml version="1.0"?>
+<!DOCTYPE overlay SYSTEM "chrome://evergreen/locale/lang.dtd">
+<overlay id="bills_overlay" 
+       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<script>dump('loading bills_overlay.xul\n');</script>
+
+<commandset id="bills_cmds" />
+
+<box id="bills_main" flex="1" orient="vertical" class="my_overflow">
+       <box id="bills_top_ui" />
+       <listbox id="bill_list" />
+</box>
+
+<box id="bills_top_ui">
+       <hbox>
+               <groupbox>
+                       <caption label="Summary"/>
+                       <grid>
+                               <columns><column /><column /></columns>                                 
+                               <rows>
+                                       <row>
+                                               <label value="Total Owed" />
+       
+                                               <textbox id="bill_total_owed" value="" readonly="true" />
+                                       </row>
+                                       <row>
+                                               <label value="- Payment applied" />
+                       
+                                               <textbox id="bill_payment_applied" readonly="true"/>
+                                       </row>
+                                       <row>
+                                               <label value="= New Balance" 
+                                                       style="font-family: bold" />
+       
+                                               <textbox id="bill_new_balance" readonly="true"/>
+                                       </row>
+                               </rows>
+                       </grid>
+               </groupbox>
+               <spacer flex="2"/>
+               <groupbox>
+                       <caption label="Pay Bill"/>
+                       <grid>
+                               <columns><column /><column /></columns>                                 
+                               <rows>
+                                       <row>
+                                               <label value="Payment Type" 
+                                                       accesskey="t" control="payment_type" />
+                                               <menulist id="payment_type">
+                                                       <menupopup id="payment_type_menupopup">
+                                                               <menuitem id="payment_type_menuitem1" label="Cash" value="cash_payment"/>
+                                                               <menuitem id="payment_type_menuitem2" label="Check" value="check_payment"/>
+                                                               <menuitem id="payment_type_menuitem3" label="Credit Card" value="credit_card_payment"/>
+                                                               <menuitem id="payment_type_menuitem4" label="Patron Credit" value="credit_payment" />
+                                                               <menuitem id="payment_type_menuitem5" label="Work" value="work_payment"/>
+                                                               <menuitem id="payment_type_menuitem6" label="Forgive" value="forgive_payment"/>
+                                                       </menupopup>
+                                               </menulist>
+                                       </row>
+                                       <row>
+                                               <label value="Payment received" style="font-weight: bold"
+                                                       accesskey="a" control="bill_payment_amount" />
+                       
+                                               <textbox id="bill_payment_amount" style="border: solid thick black"/>
+                                       </row>
+                                       <row>
+                                               <label value="- Payment applied" />
+                       
+                                               <textbox id="bpato" observes="bill_payment_applied" />
+                                       </row>
+                                       <row>
+                                               <label value="= Change" control="bill_change_amount" />
+       
+                                               <hbox>
+                                                       <textbox id="bill_change_amount" />
+                                               </hbox>
+                                       </row>
+                                       <row>
+                                               <label value="or Patron Credit" 
+                                                       style="font-family: bold" />
+       
+                                               <textbox id="bill_credit_amount" readonly="true"/>
+                                       </row>
+                               </rows>
+                       </grid>
+               </groupbox>
+       </hbox>
+       <hbox>
+               <button id="bill_wizard" label="Bill Patron" accesskey="B" command="cmd_bill_wizard"/>
+               <spacer flex="2"/>
+               <button id="change_to_credit" label="Convert Change to Patron Credit" command="cmd_change_to_credit"/>
+               <button id="bill_apply_payment" label="Go!" accesskey="G" command="cmd_bill_apply_payment"/>
+       </hbox>
+       <label value=" "/>
+</box>
+
+
+</overlay>
diff --git a/Open-ILS/xul/staff_client/server/patron/holds.js b/Open-ILS/xul/staff_client/server/patron/holds.js
new file mode 100644 (file)
index 0000000..b3003a2
--- /dev/null
@@ -0,0 +1,125 @@
+dump('entering patron.holds.js\n');
+
+if (typeof patron == 'undefined') patron = {};
+patron.holds = function (params) {
+
+       JSAN.use('util.error'); this.error = new util.error();
+       JSAN.use('util.network'); this.network = new util.network();
+       this.OpenILS = {}; JSAN.use('OpenILS.data'); this.OpenILS.data = new OpenILS.data(); this.OpenILS.data.init({'via':'stash'});
+}
+
+patron.holds.prototype = {
+
+       'init' : function( params ) {
+
+               var obj = this;
+
+               obj.session = params['session'];
+               obj.patron_id = params['patron_id'];
+
+               JSAN.use('circ.util');
+               var columns = circ.util.hold_columns( 
+                       { 
+                               'title' : { 'hidden' : false, 'flex' : '3' },
+                               'request_time' : { 'hidden' : false },
+                               'pickup_lib_shortname' : { 'hidden' : false },
+                               'hold_type' : { 'hidden' : false },
+                               'capture_time' : { 'hidden' : false },
+                       } 
+               );
+
+               JSAN.use('util.list'); obj.list = new util.list('holds_list');
+               obj.list.init(
+                       {
+                               'columns' : columns,
+                               'map_row_to_column' : circ.util.std_map_row_to_column(),
+                                'retrieve_row' : function(params) {
+                                        var row = params.row;
+                                       try {
+                                               switch(row.my.ahr.hold_type()) {
+                                                       case 'M' :
+                                                               row.my.mvr = obj.network.request(
+                                                                       api.mods_slim_metarecord_retrieve.app,
+                                                                       api.mods_slim_metarecord_retrieve.method,
+                                                                       [ row.my.ahr.target() ]
+                                                               );
+                                                       break;
+                                                       default:
+                                                               row.my.mvr = obj.network.request(
+                                                                       api.mods_slim_record_retrieve.app,
+                                                                       api.mods_slim_record_retrieve.method,
+                                                                       [ row.my.ahr.target() ]
+                                                               );
+                                                       break;
+                                               }
+                                       } catch(E) {
+                                               obj.error.sdump('D_ERROR','retrieve_row: ' + E );
+                                       }
+                                        return row;
+                               }
+                       }
+               );
+               
+               JSAN.use('util.controller'); obj.controller = new util.controller();
+               obj.controller.init(
+                       {
+                               'control_map' : {
+                                       'cmd_broken' : [
+                                               ['command'],
+                                               function() { alert('Not Yet Implemented'); }
+                                       ],
+                                       'cmd_item_print' : [
+                                               ['command'],
+                                               function() {
+                                               }
+                                       ],
+                                       'cmd_item_reprint' : [
+                                               ['command'],
+                                               function() {
+                                               }
+                                       ],
+                               }
+                       }
+               );
+
+               obj.retrieve();
+
+       },
+
+       'retrieve' : function() {
+               var obj = this;
+               if (window.xulG && window.xulG.holds) {
+                       obj.holds = window.xulG.holds;
+               } else {
+                       obj.holds = obj.network.request(
+                               api.fm_ahr_retrieve.app,
+                               api.fm_ahr_retrieve.method,
+                               [ obj.session, obj.patron_id ]
+                       );
+                               
+               }
+
+               function gen_list_append(hold) {
+                       return function() {
+                               obj.list.append(
+                                       {
+                                               'row' : {
+                                                       'my' : {
+                                                               'ahr' : hold,
+                                                       }
+                                               }
+                                       }
+                               );
+                       };
+               }
+
+               JSAN.use('util.exec'); var exec = new util.exec();
+               var rows = [];
+               for (var i in obj.holds) {
+                       rows.push( gen_list_append(obj.holds[i]) );
+               }
+               exec.chain( rows );
+       },
+}
+
+dump('exiting patron.holds.js\n');
diff --git a/Open-ILS/xul/staff_client/server/patron/holds.xul b/Open-ILS/xul/staff_client/server/patron/holds.xul
new file mode 100644 (file)
index 0000000..89ca37a
--- /dev/null
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<!-- Application: Evergreen Staff Client -->
+<!-- Screen: Patron Display -->
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- STYLESHEETS -->
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<?xml-stylesheet href="/xul/server/skin/evergreen.css" type="text/css"?>
+<?xml-stylesheet href="/xul/server/skin/circ.css" type="text/css"?>
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- LOCALIZATION -->
+<!DOCTYPE window SYSTEM "chrome://evergreen/locale/lang.dtd">
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- OVERLAYS -->
+<?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
+<?xul-overlay href="/xul/server/patron/holds_overlay.xul"?>
+
+<window id="holds_win" 
+       onload="my_init()"
+       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+       <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+       <!-- BEHAVIOR -->
+        <script type="text/javascript">var myPackageDir = 'evergreen'; var IAMXUL = true; var g = {};</script>
+        <scripts id="openils_util_scripts"/>
+
+       <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
+       <script>
+       <![CDATA[
+               function my_init() {
+                       try {
+                               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+                               if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
+                               JSAN.errorLevel = "die"; // none, warn, or die
+                               JSAN.addRepository('/xul/server/');
+                               JSAN.use('util.error'); g.error = new util.error();
+                               g.error.sdump('D_TRACE','my_init() for holds.xul');
+
+                               g.cgi = new CGI();
+
+                               JSAN.use('patron.holds'); g.holds = new patron.holds();
+                               g.holds.init( 
+                                       { 
+                                               'patron_id' : g.cgi.param('patron_id'), 
+                                               'session' : g.cgi.param('session') 
+                                       } 
+                               );
+       
+                       } catch(E) {
+                               var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
+                                       "system administrator or software developer the following:\n" + E + '\n';
+                               try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
+                               alert(err_msg);
+                       }
+               }
+
+       ]]>
+       </script>
+
+       <commandset id="holds_cmds">
+               <command id="cmd_holds_print" />
+               <command id="cmd_holds_reprint" />
+       </commandset>
+
+       <box id="holds_main" />
+
+</window>
+
diff --git a/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul b/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul
new file mode 100644 (file)
index 0000000..2183269
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!DOCTYPE overlay SYSTEM "chrome://evergreen/locale/lang.dtd">
+<overlay id="holds_overlay" 
+       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<script>dump('loading holds_overlay.xul\n');</script>
+
+<commandset id="holds_cmds" />
+
+<box id="holds_main" flex="1" orient="vertical" class="my_overflow">
+       <vbox id="cmvb1" flex="1"/>
+</box>
+
+<vbox id="cmvb1" flex="1">
+       <groupbox id="cmgb1" flex="2">
+               <caption label="&staff.patron_navbar.holds;" />
+               <hbox id="holds_top_ui" />
+               <tree id="holds_list" flex="1" enableColumnDrag="true"/>
+               <hbox id="holds_bottom_ui" />
+       </groupbox>
+</vbox>
+
+<hbox id="holds_bottom_ui">
+       <button id="holds_print" 
+               label="&staff.patron_display.holds.print_receipt_label;" 
+               command="cmd_holds_print"
+               accesskey="&staff.patron_display.holds.print_receipt_label.accesskey;"/>
+       <spacer id="pcii3s" flex="1"/>
+</hbox>
+
+</overlay>