receipt printing
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 16 Mar 2006 16:56:07 +0000 (16:56 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 16 Mar 2006 16:56:07 +0000 (16:56 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@3378 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/circ/checkin.js
Open-ILS/xul/staff_client/server/circ/checkout.js
Open-ILS/xul/staff_client/server/patron/adv_barcode_entry.xul
Open-ILS/xul/staff_client/server/patron/barcode_entry.xul
Open-ILS/xul/staff_client/server/patron/holds.js
Open-ILS/xul/staff_client/server/patron/items.js

index 251a01b..97311d8 100644 (file)
@@ -97,8 +97,25 @@ circ.checkin.prototype = {
                                        'cmd_checkin_print' : [
                                                ['command'],
                                                function() {
-                                                       dump( js2JSON( obj.list.dump() ) );
-                                                       alert( js2JSON( obj.list.dump() ) );
+                                                       try {
+                                                       dump( js2JSON( obj.list.dump() ) + '\n' );
+                                                       obj.OpenILS.data.stash_retrieve();
+                                                       var lib = obj.OpenILS.data.hash.aou[ obj.OpenILS.data.list.au[0].ws_ou() ];
+                                                       lib.children(null);
+                                                       var p = { 
+                                                               'lib' : lib,
+                                                               'staff' : obj.OpenILS.data.list.au[0],
+                                                               'header' : obj.OpenILS.data.print_list_templates.checkin.header,
+                                                               'line_item' : obj.OpenILS.data.print_list_templates.checkin.line_item,
+                                                               'footer' : obj.OpenILS.data.print_list_templates.checkin.footer,
+                                                               'type' : obj.OpenILS.data.print_list_templates.checkin.type,
+                                                               'list' : obj.list.dump(),
+                                                       };
+                                                       JSAN.use('util.print'); var print = new util.print();
+                                                       print.tree_list( p );
+                                                       } catch(E) {
+                                                               alert(E); 
+                                                       }
                                                }
                                        ],
                                        'cmd_checkin_reprint' : [
index 27147a4..f1b7084 100644 (file)
@@ -110,12 +110,12 @@ circ.checkout.prototype = {
                                                        try {
                                                                var params = { 
                                                                        'patron' : obj.patron, 
-                                                                       'lib' : obj.data.hash.aou[ this.data.list.au[0].ws_ou() ],
+                                                                       'lib' : obj.data.hash.aou[ obj.data.list.au[0].ws_ou() ],
                                                                        'staff' : obj.data.list.au[0],
                                                                        'header' : obj.data.print_list_templates.checkout.header,
                                                                        'line_item' : obj.data.print_list_templates.checkout.line_item,
                                                                        'footer' : obj.data.print_list_templates.checkout.footer,
-                                                                       'type' : 'items',
+                                                                       'type' : obj.data.print_list_templates.checkout.type,
                                                                        'list' : obj.list.dump(),
                                                                };
                                                                JSAN.use('util.print'); var print = new util.print();
@@ -247,6 +247,7 @@ circ.checkout.prototype = {
                        /* Normal case, proceed with checkout */
                        if (permit.ilsevent == 0) {
 
+                               JSAN.use('util.sound'); var sound = new util.sound(); sound.circ_good();
                                params.permit_key = permit.payload;
                                check_out( params );
 
index c69d570..0b3f8f1 100644 (file)
@@ -79,6 +79,7 @@
 
                function spawn() {
                        try {
+                               JSAN.use('util.sound'); var sound = new util.sound(); sound.good();
                                var tb = document.getElementById('barcode_tb');
                                var barcode = tb.value;
 
index 7472c0e..a0cc93d 100644 (file)
@@ -79,6 +79,7 @@
 
                function spawn() {
                        try {
+                               JSAN.use('util.sound'); var sound = new util.sound(); sound.good();
                                var tb = document.getElementById('barcode_tb');
                                var barcode = tb.value;
 
index 682c8a3..3462585 100644 (file)
@@ -78,8 +78,27 @@ patron.holds.prototype = {
                                        'cmd_holds_print' : [
                                                ['command'],
                                                function() {
-                                                       dump( js2JSON( obj.list.dump() ) + '\n');
-                                                       alert( js2JSON( obj.list.dump() ) + '\n');
+                                                       dump(js2JSON(obj.list.dump()) + '\n');
+                                                       try {
+                                                               JSAN.use('patron.util');
+                                                               var params = { 
+                                                                       'patron' : patron.util.retrieve_au_via_id(obj.session,obj.patron_id), 
+                                                                       'lib' : obj.OpenILS.data.hash.aou[ obj.OpenILS.data.list.au[0].ws_ou() ],
+                                                                       'staff' : obj.OpenILS.data.list.au[0],
+                                                                       'header' : obj.OpenILS.data.print_list_templates.holds.header,
+                                                                       'line_item' : obj.OpenILS.data.print_list_templates.holds.line_item,
+                                                                       'footer' : obj.OpenILS.data.print_list_templates.holds.footer,
+                                                                       'type' : obj.OpenILS.data.print_list_templates.holds.type,
+                                                                       'list' : obj.list.dump(),
+                                                               };
+                                                               JSAN.use('util.print'); var print = new util.print();
+                                                               print.tree_list( params );
+                                                       } catch(E) {
+                                                               this.error.sdump('D_ERROR','preview: ' + E);
+                                                               alert('preview: ' + E);
+                                                       }
+
+
                                                }
                                        ],
                                        'cmd_holds_edit' : [
index c4ef3a9..42cb3ef 100644 (file)
@@ -110,6 +110,26 @@ patron.items.prototype = {
                                                ['command'],
                                                function() {
                                                        dump(js2JSON(obj.list.dump()) + '\n');
+                                                       try {
+                                                               JSAN.use('patron.util');
+                                                               var params = { 
+                                                                       'patron' : patron.util.retrieve_au_via_id(obj.session,obj.patron_id), 
+                                                                       'lib' : obj.OpenILS.data.hash.aou[ obj.OpenILS.data.list.au[0].ws_ou() ],
+                                                                       'staff' : obj.OpenILS.data.list.au[0],
+                                                                       'header' : obj.OpenILS.data.print_list_templates.checkout.header,
+                                                                       'line_item' : obj.OpenILS.data.print_list_templates.checkout.line_item,
+                                                                       'footer' : obj.OpenILS.data.print_list_templates.checkout.footer,
+                                                                       'type' : obj.OpenILS.data.print_list_templates.checkout.type,
+                                                                       'list' : obj.list.dump(),
+                                                               };
+                                                               JSAN.use('util.print'); var print = new util.print();
+                                                               print.tree_list( params );
+                                                       } catch(E) {
+                                                               this.error.sdump('D_ERROR','preview: ' + E);
+                                                               alert('preview: ' + E);
+                                                       }
+
+
                                                }
                                        ],
                                        'cmd_items_claimed_returned' : [