billing types
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 8 Aug 2006 03:57:46 +0000 (03:57 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 8 Aug 2006 03:57:46 +0000 (03:57 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5359 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js
Open-ILS/xul/staff_client/chrome/content/main/constants.js
Open-ILS/xul/staff_client/server/patron/bill_wizard.xul

index acbed7a..67abd9d 100644 (file)
@@ -324,6 +324,21 @@ OpenILS.data.prototype = {
 
                this.chain.push(
                        function() {
+                               try {
+                                       var robj = obj.network.simple_request('BILLING_TYPE_LIST',[]);
+                                       if (typeof robj.ilsevent != 'undefined') throw(robj);
+                                       obj.list.billing_type = robj;
+                               } catch(E) {
+                                       var error = 'Error: ' + js2JSON(E);
+                                       obj.error.sdump('D_ERROR',error);
+                                       throw(E);
+                               }
+                       }
+               );
+
+
+               this.chain.push(
+                       function() {
                                var f = gen_fm_retrieval_func(
                                        'cnal',
                                        [
index 267903f..a3ddd89 100644 (file)
@@ -5,6 +5,7 @@ const api = {
        'AUTH_DELETE' : { 'app' : 'open-ils.auth', 'method' : 'open-ils.auth.session.delete' },
        'AUTH_WORKSTATION' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.workstation.register' },
        'BILL_PAY' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.payment' },
+       'BILLING_TYPE_LIST' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.billing_type.retrieve.all' },
        'BLOB_MARC_CALLNUMBERS_RETRIEVE' : { 'app' : 'open-ils.cat', 'method' : 'open-ils.cat.biblio.record.marc_cn.retrieve' },
        'BLOB_MOBTS_CIRC_MVR_HAVING_BALANCE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.have_balance.fleshed' },
        'BLOB_MOBTS_CIRC_MVR_OPEN' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.fleshed' },
index 1b4f268..9793c07 100644 (file)
                                JSAN.use('util.network'); g.network = new util.network();
                                JSAN.use('util.date');
                                JSAN.use('util.money');
+                               JSAN.use('util.widgets');
+                               JSAN.use('util.functional');
+                               var ml = util.widgets.make_menulist(
+                                       util.functional.map_list(
+                                               g.OpenILS.data.list.billing_type.sort(),
+                                               function(obj) { return [ obj, obj ]; }
+                                       )
+                               );
+                               ml.setAttribute('id','billing_type');
+                               document.getElementById('menu_placeholder').appendChild(ml);
 
                                g.cgi = new CGI();
 
                                                        </menulist>
                                                </row>
                                                <row><label value="Billing Type"/>
-                                                       <menulist id="billing_type">
-                                                               <menupopup>
-                                                                       <menuitem value="Miscellaneous" label="Miscellaneous" />
-                                                                       <menuitem value="Overdue materials" label="Overdue materials" />
-                                                                       <menuitem value="Fee for placing a hold" label="Fee for placing a hold" />
-                                                                       <menuitem value="Fee for checking out a book" label="Fee for checking out a book" />
-                                                                       <menuitem value="Fee for library card" label="Fee for library card" />
-                                                                       <menuitem value="Miscellaneous charges" label="Miscellaneous charges" />
-                                                                       <menuitem value="Lost materials" label="Lost materials" />
-                                                                       <menuitem value="Damaged material" label="Damaged material" />
-                                                                       <menuitem value="Overdue Reserves charge" label="Overdue Reserves charge" />
-                                                                       <menuitem value="Recall overdue" label="Recall overdue" />
-                                                                       <menuitem value="Fee for processing lost library materials" label="Fee for processing lost library materials" />
-                                                                       <menuitem value="Fee for sending patron bills to collection agency" label="Fee for sending patron bills to collection agency" />
-                                                                       <menuitem value="Fee for interlibrary loan" label="Fee for interlibrary loan" />
-                                                                       <menuitem value="Fee for copies" label="Fee for copies" />
-                                                                       <menuitem value="Money advanced to pay for telephone use" label="Money advanced to pay for telephone use" />
-                                                                       <menuitem value="Deposit fee" label="Deposit fee" />
-                                                                       <menuitem value="Fee for disk" label="Fee for disk" />
-                                                                       <menuitem value="Fee for faxing" label="Fee for faxing" />
-                                                                       <menuitem value="Fee for laminating" label="Fee for laminating" />
-                                                                       <menuitem value="Fee for room cleaning" label="Fee for room cleaning" />
-                                                                       <menuitem value="Deposit returned; fee refund" label="Deposit returned; fee refund" />
-                                                                       <menuitem value="Sale items" label="Sale items" />
-                                                                       <menuitem value="Fee for lost card" label="Fee for lost card" />
-                                                                       <menuitem value="Long overdue items" label="Long overdue items" />
-                                                                       <menuitem value="Lost/Replacement Cassette" label="Lost/Replacement Cassette" />
-                                                                       <menuitem value="Returned Check" label="Returned Check" />
-                                                               </menupopup>
-                                                       </menulist>
+                                                       <hbox id="menu_placeholder"/>
                                                </row>
                                                <row><label value="Amount"/><textbox id="bill_amount" /></row>
                                                <row><label value="Note"/><textbox id="bill_note" multiline="true" rows="5" /></row>