Org unit setting (not wired into Settings Editor), circ.staff_client.do_not_auto_atte...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 22 Sep 2009 03:11:24 +0000 (03:11 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 22 Sep 2009 03:11:24 +0000 (03:11 +0000)
  Disable automatic print attempts from staff client interfaces for the receipt types in this list.  Possible values: "Checkout", "Bill Pay", "Hold Slip", "Transit Slip", and/or "Hold/Transit Slip".  This is different from the
Auto-Print checkbox in the pertinent interfaces in that it disables automatic print attempts altogether, rather than encouraging silent printing by suppressing the print dialog.  The Auto-Print checkbox in these interfaces have no
effect on the behavior for this setting.  In the case of the Hold, Transit, and Hold/Transit slips, this also suppresses the alert dialogs that precede the print dialog (the ones that offer Print and Do Not Print as options).

git-svn-id: svn://svn.open-ils.org/ILS/trunk@14079 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/xul/staff_client/server/circ/checkout.js
Open-ILS/xul/staff_client/server/circ/util.js
Open-ILS/xul/staff_client/server/patron/bills.js

index 8b4dd55..5a8877c 100644 (file)
@@ -1812,6 +1812,11 @@ INSERT into config.org_unit_setting_type
   'List of checkout/renewal events that the selfcheck interface should automatically override instead instead of alerting and stopping the transaction',
   'array' ),
 
+( 'circ.staff_client.do_not_auto_attempt_print',
+  'Disable Automatic Print Attempt Type List',
+  'Disable automatic print attempts from staff client interfaces for the receipt types in this list.  Possible values: "Checkout", "Bill Pay", "Hold Slip", "Transit Slip", and "Hold/Transit Slip".  This is different from the Auto-Print checkbox in the pertinent interfaces in that it disables automatic print attempts altogether, rather than encouraging silent printing by suppressing the print dialog.  The Auto-Print checkbox in these interfaces have no effect on the behavior for this setting.  In the case of the Hold, Transit, and Hold/Transit slips, this also suppresses the alert dialogs that precede the print dialog (the ones that offer Print and Do Not Print as options).',
+  'array' ),
+
 ( 'ui.patron.default_inet_access_level',
   'Default level of patrons'' internet access',
   null,
index fb962e4..1b15194 100644 (file)
@@ -231,6 +231,14 @@ circ.checkout.prototype = {
                                                ['command'],
                                                function() {
                                                        try {
+                                var no_print_prompting = obj.data.hash.aous['circ.staff_client.do_not_auto_attempt_print'];
+                                if (no_print_prompting) {
+                                    if (no_print_prompting.indexOf( "Checkout" ) > -1) {
+                                                                               obj.list.clear();
+                                                                               xulG.set_tab(urls.XUL_PATRON_BARCODE_ENTRY,{},{}); 
+                                        return;
+                                    }
+                                }
                                                                if (document.getElementById('checkout_auto').checked) {
                                                                        obj.print(true,function() { 
                                                                                obj.list.clear();
index b812be4..df8e2d5 100644 (file)
@@ -2312,6 +2312,12 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che
                                                msg += '\n';
                                        }
                                        var rv = 0;
+                    var no_print_prompting = data.hash.aous['circ.staff_client.do_not_auto_attempt_print'];
+                    if (no_print_prompting) {
+                        if (no_print_prompting.indexOf( "Hold Slip" ) > -1) {
+                            rv = -1; auto_print = true; // DO NOT PRINT and skip dialog
+                        }
+                    }
                     print_data.slip_date = util.date.formatted_date(new Date(),'%F');
                                        print_data.slip_date_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.payload.hold.slip_date', [print_data.slip_date]);
                     msg += print_data.slip_date_msg;
@@ -2510,6 +2516,12 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che
                                msg += '\n';
                        }
                        var rv = 0;
+            var no_print_prompting = data.hash.aous['circ.staff_client.do_not_auto_attempt_print'];
+            if (no_print_prompting) {
+                if (no_print_prompting.indexOf( check.payload.hold ? "Hold/Transit Slip" : "Transit Slip" ) > -1) {
+                    rv = -1; auto_print = true; // DO NOT PRINT and skip dialog
+                }
+            }
             print_data.slip_date = util.date.formatted_date(new Date(),'%F');
             print_data.slip_date_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.payload.hold.slip_date', [print_data.slip_date]);
             msg += print_data.slip_date_msg;
index e639f03..bfae49b 100644 (file)
@@ -517,6 +517,10 @@ patron.bills.prototype = {
                                        obj.data.voided_billings = []; obj.data.stash('voided_billings');
                                        obj.refresh();
                                        try {
+                        var no_print_prompting = obj.data.hash.aous['circ.staff_client.do_not_auto_attempt_print'];
+                        if (no_print_prompting) {
+                            if (no_print_prompting.indexOf( "Bill Pay" ) > -1) return; // Skip print attempt
+                        }
                                                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
                                                obj.data.stash_retrieve();
                                                var template = 'bill_payment';