2 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
3 <!-- This DTD declaration needs to be fixed for Mozilla locales -->
4 <!DOCTYPE wizard SYSTEM "chrome://evergreen/locale/patron.dtd">
5 <wizard id="patron_bill" title="Bill Patron Wizard"
6 orient="vertical" style="overflow: auto"
7 onload="patron_bill_init()" width="800" height="600"
8 onwizardfinish="patron_bill_finish()"
9 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
11 <!-- Overlays for this XUL file -->
12 <?xul-overlay href="chrome://evergreen/content/OpenSRF/OpenSRF_overlay.xul"?>
13 <?xul-overlay href="chrome://evergreen/content/util/util_overlay.xul"?>
16 <script>var myPackageDir = "evergreen";</script>
17 <OpenSRF id="OpenSRF_js" />
18 <script src="patron_utils.js" />
23 function patron_bill_init() {
24 document.getElementById('patron_name').setAttribute('value',
25 patron_get_full_name(params.patron) + ' : ' + patron_get_barcode(params.patron) );
26 document.getElementById('billing_location').setAttribute('value',
27 mw.G.user_ou.name() );
30 function patron_bill_finish() {
32 var grocery = new mg();
34 grocery.billing_location( mw.G.user_ou.id() );
35 grocery.usr( params.patron.id() );
36 grocery.note( document.getElementById('bill_note').value );
37 var mg_id = user_request(
39 'open-ils.circ.money.grocery.create',
40 [ mw.G.auth_ses[0], grocery ]
43 var billing = new mb();
45 billing.note( document.getElementById('bill_note').value );
46 billing.xact( mg_id );
47 billing.amount( document.getElementById('bill_amount').value );
48 billing.billing_type( document.getElementById('billing_type').value );
49 var mb_id = user_request(
51 'open-ils.circ.money.billing.create',
52 [ mw.G.auth_ses[0], billing ]
56 throw('mb_id = ' + mb_id);
59 throw('mg_id = ' + mg_id);
70 <wizardpage id="page1" description="Billing Patron" onpageadvanced="">
71 <label id="patron_name"/>
73 <columns> <column flex="0" /> <column flex="0" /> </columns>
74 <rows id="page1_rows">
75 <row><label value="Location"/><textbox id="billing_location" disabled="true" /></row>
76 <row><label value="Transaction Type"/>
77 <menulist id="xact_type">
79 <menuitem label="Grocery" value="grocery" selected="true"/>
83 <row><label value="Billing Type"/>
84 <menulist id="billing_type">
86 <menuitem value="Miscellaneous" label="Miscellaneous" />
87 <menuitem value="Overdue materials" label="Overdue materials" />
88 <menuitem value="Fee for placing a hold" label="Fee for placing a hold" />
89 <menuitem value="Fee for checking out a book" label="Fee for checking out a book" />
90 <menuitem value="Fee for library card" label="Fee for library card" />
91 <menuitem value="Miscellaneous charges" label="Miscellaneous charges" />
92 <menuitem value="Lost materials" label="Lost materials" />
93 <menuitem value="Damaged material" label="Damaged material" />
94 <menuitem value="Overdue Reserves charge" label="Overdue Reserves charge" />
95 <menuitem value="Recall overdue" label="Recall overdue" />
96 <menuitem value="Fee for processing lost library materials" label="Fee for processing lost library materials" />
97 <menuitem value="Fee for sending patron bills to collection agency" label="Fee for sending patron bills to collection agency" />
98 <menuitem value="Fee for interlibrary loan" label="Fee for interlibrary loan" />
99 <menuitem value="Fee for copies" label="Fee for copies" />
100 <menuitem value="Money advanced to pay for telephone use" label="Money advanced to pay for telephone use" />
101 <menuitem value="Deposit fee" label="Deposit fee" />
102 <menuitem value="Fee for disk" label="Fee for disk" />
103 <menuitem value="Fee for faxing" label="Fee for faxing" />
104 <menuitem value="Fee for laminating" label="Fee for laminating" />
105 <menuitem value="Fee for room cleaning" label="Fee for room cleaning" />
106 <menuitem value="Deposit returned; fee refund" label="Deposit returned; fee refund" />
107 <menuitem value="Sale items" label="Sale items" />
108 <menuitem value="Fee for lost card" label="Fee for lost card" />
109 <menuitem value="Long overdue items" label="Long overdue items" />
110 <menuitem value="Lost/Replacement Cassette" label="Lost/Replacement Cassette" />
111 <menuitem value="Returned Check" label="Returned Check" />
115 <row><label value="Amount"/><textbox id="bill_amount" /></row>
116 <row><label value="Note"/><textbox id="bill_note" multiline="true" rows="5" /></row>