[open-ils-commits] r17385 - in trunk/Open-ILS: src/sql/Pg src/sql/Pg/upgrade xul/staff_client/server/patron (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Aug 30 12:49:04 EDT 2010


Author: phasefx
Date: 2010-08-30 12:49:00 -0400 (Mon, 30 Aug 2010)
New Revision: 17385

Added:
   trunk/Open-ILS/src/sql/Pg/upgrade/0383.data.org-setting-circ.do_not_tally_claims_returned.sql
Modified:
   trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
   trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
   trunk/Open-ILS/xul/staff_client/server/patron/summary.js
Log:
option to not include claims returned circs in summary sidebar and under-button tallies


Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql	2010-08-30 16:17:32 UTC (rev 17384)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql	2010-08-30 16:49:00 UTC (rev 17385)
@@ -68,7 +68,7 @@
     install_date    TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
 );
 
-INSERT INTO config.upgrade_log (version) VALUES ('0381'); -- dbs
+INSERT INTO config.upgrade_log (version) VALUES ('0383'); -- phasefx
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,

Modified: trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql	2010-08-30 16:17:32 UTC (rev 17384)
+++ trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql	2010-08-30 16:49:00 UTC (rev 17385)
@@ -6725,4 +6725,21 @@
     ,(1, 'cat.label.font.weight', '"normal"')
 ;
 
+-- 0383.data.org-setting-circ.do_not_tally_claims_returned.sql
 
+INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES (
+        'circ.do_not_tally_claims_returned',
+        oils_i18n_gettext(
+            'circ.do_not_tally_claims_returned',
+            'Circulation: Do not include outstanding Claims Returned circulations in lump sum tallies in Patron Display.', 
+            'coust', 
+            'label'),
+        oils_i18n_gettext(
+            'circ.do_not_tally_claims_returned',
+            'In the Patron Display interface, the number of total active circulations for a given patron is presented in the Summary sidebar and underneath the Items Out navigation button.  This setting will prevent Claims Returned circulations from counting toward these tallies.',
+            'coust', 
+            'description'),
+        'bool'
+);
+
+

Added: trunk/Open-ILS/src/sql/Pg/upgrade/0383.data.org-setting-circ.do_not_tally_claims_returned.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0383.data.org-setting-circ.do_not_tally_claims_returned.sql	                        (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0383.data.org-setting-circ.do_not_tally_claims_returned.sql	2010-08-30 16:49:00 UTC (rev 17385)
@@ -0,0 +1,20 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0383'); -- phasefx
+
+INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES (
+        'circ.do_not_tally_claims_returned',
+        oils_i18n_gettext(
+            'circ.do_not_tally_claims_returned',
+            'Circulation: Do not include outstanding Claims Returned circulations in lump sum tallies in Patron Display.', 
+            'coust', 
+            'label'),
+        oils_i18n_gettext(
+            'circ.do_not_tally_claims_returned',
+            'In the Patron Display interface, the number of total active circulations for a given patron is presented in the Summary sidebar and underneath the Items Out navigation button.  This setting will prevent Claims Returned circulations from counting toward these tallies.',
+            'coust', 
+            'description'),
+        'bool'
+);
+
+COMMIT;

Modified: trunk/Open-ILS/xul/staff_client/server/patron/summary.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/summary.js	2010-08-30 16:17:32 UTC (rev 17384)
+++ trunk/Open-ILS/xul/staff_client/server/patron/summary.js	2010-08-30 16:49:00 UTC (rev 17385)
@@ -369,13 +369,24 @@
                                     function(req) {
                                         try {
                                             var robj = req.getResultObject();
-                                            util.widgets.set_text(e, robj.out + robj.overdue + robj.claims_returned + robj.long_overdue );
+                                            var do_not_tally_claims_returned = String( obj.OpenILS.data.hash.aous['circ.do_not_tally_claims_returned'] ) == 'true';
+                                            util.widgets.set_text(e,
+                                                robj.out
+                                                + robj.overdue
+                                                + (do_not_tally_claims_returned ? 0 : robj.claims_returned)
+                                                + robj.long_overdue
+                                            );
                                             if (e2) util.widgets.set_text(e2, robj.overdue    );
                                             if (e3) util.widgets.set_text(e3, robj.claims_returned    );
                                             if (e4) util.widgets.set_text(e4, robj.long_overdue    );
                                             if (e5) util.widgets.set_text(e5, robj.lost    );
                                             if (under_btn) util.widgets.set_text(under_btn, 
-                                                String( robj.out + robj.overdue + robj.claims_returned + robj.long_overdue) 
+                                                String(
+                                                    robj.out
+                                                    + robj.overdue
+                                                    + (do_not_tally_claims_returned ? 0 : robj.claims_returned)
+                                                    + robj.long_overdue
+                                                ) 
                                                 /* + ( robj.overdue > 0 ? '*' : '' ) */
                                             );
                                         } catch(E) {



More information about the open-ils-commits mailing list