From: phasefx Date: Tue, 8 Aug 2006 03:57:46 +0000 (+0000) Subject: billing types X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=04b4474da5dbb2be9e1596dadbc3cf2a8e3251a9;p=Evergreen.git billing types git-svn-id: svn://svn.open-ils.org/ILS/trunk@5359 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js b/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js index acbed7a586..67abd9d01f 100644 --- a/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js +++ b/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js @@ -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', [ diff --git a/Open-ILS/xul/staff_client/chrome/content/main/constants.js b/Open-ILS/xul/staff_client/chrome/content/main/constants.js index 267903f713..a3ddd89f12 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js @@ -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' }, diff --git a/Open-ILS/xul/staff_client/server/patron/bill_wizard.xul b/Open-ILS/xul/staff_client/server/patron/bill_wizard.xul index 1b4f268a88..9793c07ac2 100644 --- a/Open-ILS/xul/staff_client/server/patron/bill_wizard.xul +++ b/Open-ILS/xul/staff_client/server/patron/bill_wizard.xul @@ -126,6 +126,16 @@ 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(); @@ -213,36 +223,7 @@