first cut and bill details
[Evergreen.git] / Evergreen / staff_client / chrome / content / evergreen / patron / patron_bill_details.xul
1 <?xml version="1.0"?>
2 <!-- Application: Evergreen Staff Client -->
3
4 <!-- Stylesheets -->
5 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
6 <?xml-stylesheet href="chrome://evergreen/skin/evergreen.css" type="text/css"?>
7
8 <!DOCTYPE window SYSTEM "chrome://evergreen/locale/patron.dtd">
9 <window id="patron_bill_details" 
10         onload="try { my_init(); } catch(E) { alert(E); }"
11         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
12
13         <!-- Overlays for this XUL file -->
14         <?xul-overlay href="chrome://evergreen/content/OpenSRF/OpenSRF_overlay.xul"?>
15         <?xul-overlay href="chrome://evergreen/content/util/util_overlay.xul"?>
16
17         <!-- OpenSRF -->
18         <script>var myPackageDir = "evergreen";</script>
19         <OpenSRF id="OpenSRF_js" />
20         <script src="patron_utils.js" />
21
22         <script>
23         <![CDATA[
24
25                 function my_init() {
26                         try {
27
28                                 var mb_list = user_request(
29                                         'open-ils.circ',
30                                         'open-ils.circ.money.billing.retrieve.all',
31                                         [ mw.G.auth_ses[0], params.mbts.id() ]
32                                 )[0];
33
34                                 var rows = document.getElementById('g_rows');
35                                 for (var i = 0; i < mb_list.length; i++) {
36
37                                         var row = document.createElement('row');
38                                         rows.appendChild(row);
39
40                                                 var c1 = document.createElement('label');
41                                                 row.appendChild(c1);
42                                                 c1.setAttribute('value', yesno( mb_list[0].voided() ));
43
44                                                 var c2 = document.createElement('label');
45                                                 row.appendChild(c2);
46                                                 c2.setAttribute('value', formatted_date( mb_list[0].billing_ts(),'%F' ));
47
48                                                 var c3 = document.createElement('label');
49                                                 row.appendChild(c3);
50                                                 c3.setAttribute('value', mb_list[0].billing_type());
51
52                                                 var c4 = document.createElement('label');
53                                                 row.appendChild(c4);
54                                                 c4.setAttribute('value', mb_list[0].amount());
55
56                                                 var c5 = document.createElement('label');
57                                                 row.appendChild(c5);
58                                                 c5.setAttribute('value', mb_list[0].note());
59                                 }
60
61                         } catch(E) {
62                                 handle_error(E);
63                         }
64                 }
65
66         ]]>
67         </script>
68
69         <vbox flex="1" class="my_overflow">
70                 <groupbox orient="vertical" flex="1">
71                         <caption label="Full Details"/>
72                         <grid>
73                                 <columns> <column /> <column /> <column /> <column /> </columns>
74                                 <rows id="g_rows">
75                                         <row><label value="Voided" /><label value="When"/><label value="Type" /><label value="Amount" /><label value="Note"/></row>
76                                 </rows>
77                         </grid>
78                 </groupbox>
79         </vbox>
80
81 </window>
82