checkout receipt fix, and don't treat item already circulating as a bug
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 25 Jul 2005 13:52:37 +0000 (13:52 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 25 Jul 2005 13:52:37 +0000 (13:52 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1415 dcc99617-32d9-48b4-a31d-7c20da2025e4

Evergreen/staff_client/chrome/content/evergreen/patron/patron_display.js
Evergreen/staff_client/chrome/content/evergreen/util/print.js

index 00158c0..e02c097 100755 (executable)
@@ -267,7 +267,7 @@ function patron_display_patron_checkout_items_init(p) {
        var checkouts = [];
 
        function print_receipt() {
-               p._current_checkouts = checkouts;
+               p._patron._current_checkouts = checkouts;
                var params = { 
                        'au' : p._patron, 
                        'lib' : mw.G.user_ou,
@@ -309,7 +309,11 @@ function patron_display_patron_checkout_items_init(p) {
                        }
                } catch(E) {
                        tb.select();
-                       handle_error(E);
+                       if (typeof(E) == 'object') {
+                               handle_error(E,true);
+                       } else {
+                               s_alert(E);
+                       }
                }
                tb.focus();
        }
index 625ae05..265f9c1 100644 (file)
@@ -22,9 +22,9 @@ function print_circ_receipt(circ_type,params,sample_view) {
                case 'checkout' : circs = params.au._current_checkouts; break;
        }
        for (var i = 0; i < circs.length; i++) {
-               params.current_circ = circs()[i].circ;
-               params.current_copy = circs()[i].copy;
-               params.current_mvr = circs()[i].record;
+               params.current_circ = circs[i].circ;
+               params.current_copy = circs[i].copy;
+               params.current_mvr = circs[i].record;
                params.current_index = i;
                s += print_template_replace(params.line_item, params); 
        }