billing location
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 1 Sep 2006 05:27:04 +0000 (05:27 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 1 Sep 2006 05:27:04 +0000 (05:27 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5826 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/main/constants.js
Open-ILS/xul/staff_client/server/patron/bill_details.xul
Open-ILS/xul/staff_client/server/patron/bill_summary_overlay.xul
Open-ILS/xul/staff_client/server/skin/global.css

index eeafb3d..6644821 100644 (file)
@@ -123,6 +123,7 @@ const api = {
        'FM_MBTS_IDS_RETRIEVE_ALL_HAVING_BALANCE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.history.have_balance' },
        'FM_MP_RETRIEVE_VIA_MBTS_ID' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.payment.retrieve.all' },
        'FM_MG_CREATE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.grocery.create' },
+       'FM_MG_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.grocery.retrieve' },
        'FM_MOBTS_HAVING_BALANCE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.have_balance' },
        'FM_MOBTS_TOTAL_HAVING_BALANCE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.have_balance.total' },
        'FM_MOBTS_COUNT_HAVING_BALANCE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.have_balance.count' },
index f130774..f3ad4b4 100644 (file)
                                                $('mbts_total_owed').value = g.mbts.total_owed() ? util.money.sanitize( g.mbts.total_owed() ) : '';
                                                $('mbts_total_paid').value = g.mbts.total_paid() ? util.money.sanitize( g.mbts.total_paid() ) : '';
                                                $('mbts_balance_owed').value = g.mbts.balance_owed() ? util.money.sanitize( g.mbts.balance_owed() ) : '';
+
+                                               switch(g.mbts.xact_type()) {
+                                                       case 'circulation' : retrieve_circ(); break;
+                                                       case 'grocery' : retrieve_grocery(); break;
+                                                       default: break;
+                                               }
+
                                        } catch(E) {
                                                g.error.sdump('D_ERROR',E);
                                        }
                        );
                }
 
+               function retrieve_grocery() {
+                       JSAN.use('util.widgets');
+                       g.network.simple_request('FM_MG_RETRIEVE', [ ses(), g.mbts_id ],
+                               function (req) {
+                                       var r_mg = req.getResultObject();
+                                       if (instanceOf(r_mg,mg)) {
+                                               $('billing_location').value = g.data.hash.aou[ r_mg.billing_location() ].shortname() + ' : ' + g.data.hash.aou[ r_mg.billing_location() ].name();
+                                       }
+                               }
+                       );
+               }
+
                function retrieve_circ() {
                        JSAN.use('util.widgets');
                        g.network.simple_request('FM_CIRC_RETRIEVE_VIA_ID', [ ses(), g.mbts_id ],
                                                $('checked_out').value = r_circ.xact_start() ? r_circ.xact_start().toString().substr(0,10) : '';
                                                $('checked_in').value = r_circ.checkin_time() ? r_circ.checkin_time().toString().substr(0,10) : '';
                                                $('due').value = r_circ.due_date() ? r_circ.due_date().toString().substr(0,10) : '';
+                                               $('billing_location').value = g.data.hash.aou[ r_circ.circ_lib() ].shortname() + ' : ' + g.data.hash.aou[ r_circ.circ_lib() ].name();
                                                var r = '';
                                                if (get_bool( r_circ.desk_renewal() ) ) r += 'DESK ';
                                                if (get_bool(r_circ.opac_renewal() ) ) r += 'OPAC ';
                                retrieve_patron();
 
                                retrieve_mbts();
-                               retrieve_circ();
+                               //retrieve_circ();
 
                                init_lists();
 
index 198f4f5..2c66659 100644 (file)
@@ -7,6 +7,9 @@
 
                        <groupbox orient="vertical" flex="1" id="summary">
                                <caption label="Summary" />
+                               <hbox>
+                                       <label class="header1" id="billing_location"/>
+                               </hbox>
                                <grid flex="1">
                                        <columns>
                                                <column flex="1"/>
index 196043f..78f1ca7 100644 (file)
@@ -75,6 +75,7 @@ iframe { background: #CDCED3 url("chrome://browser/skin/icons/box-background.png
 .text_justify { text-align: justify; }
 
 .header { font-weight: bold; }
+.header1 { font-weight: bold; font-size: large; }
 
 .tan { background-color: #D2B48C; }
 .sandy_brown { background-color: #F4A460; }