bug fix
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 1 Feb 2006 15:41:39 +0000 (15:41 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 1 Feb 2006 15:41:39 +0000 (15:41 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2916 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/legacy/_browse.xul
Open-ILS/xul/staff_client/server/patron/bills.js

index a93c8ef..73593bf 100644 (file)
                        var title = list.length == 1 ? 'Copy' : 'Copies';
 
                        JSAN.use('util.window'); var win = new util.window();
+                       g.data.temp = '';
+                       g.data.stash('temp');
                        var w = win.open(
                                window.xulG.url_prefix(urls.XUL_COPY_EDITOR)
                                        +'?session='+window.escape(g.session)
                        g.data.stash_retrieve();
                        var copies = JSON2js( g.data.temp );
                        g.error.sdump('D_CAT','in browse, g.data.temp =\n' + g.data.temp);
-                       if (edit=='1') {
+                       if (edit=='1' && copies!='') {
                                try {
                                        var r = g.network.request(
                                                api.FM_ACP_FLESHED_BATCH_UPDATE.app,
                        var title = list.length == 1 ? 'Volume' : 'Volumes';
 
                        JSAN.use('util.window'); var win = new util.window();
+                       g.data.temp = '';
+                       g.data.stash('temp');
                        var w = win.open(
                                window.xulG.url_prefix(urls.XUL_VOLUME_EDITOR)
                                        +'?session='+window.escape(g.session)
                        g.data.stash_retrieve();
                        var volumes = JSON2js( g.data.temp );
                        g.error.sdump('D_CAT','in browse, g.data.temp =\n' + g.data.temp);
+                       if (volumes=='') return;
                
                        volumes = util.functional.filter_list(
                                volumes,
index d91dd68..74a96b8 100644 (file)
@@ -235,6 +235,8 @@ patron.bills.prototype = {
                var win = new util.window();
                switch(obj.controller.view.payment_type.value) {
                        case 'credit_card_payment' :
+                               obj.OpenILS.data.temp = '';
+                               obj.OpenILS.data.stash('temp');
                                var w = win.open(
                                        urls.XUL_PATRON_BILL_CC_INFO,
                                        'billccinfo',
@@ -245,6 +247,8 @@ patron.bills.prototype = {
                                payment_blob = JSON2js( obj.OpenILS.data.temp );
                        break;
                        case 'check_payment' :
+                               obj.OpenILS.data.temp = '';
+                               obj.OpenILS.data.stash('temp');
                                var w = win.open(
                                        urls.XUL_PATRON_BILL_CHECK_INFO,
                                        'billcheckinfo',
@@ -255,7 +259,7 @@ patron.bills.prototype = {
                                payment_blob = JSON2js( obj.OpenILS.data.temp );
                        break;
                }
-               if (payment_blob.cancelled == 'true') { alert('cancelled'); return; }
+               if (payment_blob=='' || payment_blob.cancelled=='true') { alert('cancelled'); return; }
                payment_blob.userid = obj.patron_id;
                payment_blob.note = payment_blob.note || '';
                payment_blob.cash_drawer = 1; // FIXME: get new Config() to work