[open-ils-commits] r14225 - trunk/Open-ILS/xul/staff_client/server/circ (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Sep 30 13:30:18 EDT 2009


Author: phasefx
Date: 2009-09-30 13:30:14 -0400 (Wed, 30 Sep 2009)
New Revision: 14225

Modified:
   trunk/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js
   trunk/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul
Log:
dedicated fields for Total Circs - Current Year and Previous Field in alternate item details interface

Modified: trunk/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js	2009-09-30 16:18:03 UTC (rev 14224)
+++ trunk/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js	2009-09-30 17:30:14 UTC (rev 14225)
@@ -121,6 +121,8 @@
         set("circulations", '');
         set("total_circ_count", '');
         set_tooltip("total_circ_count", '');
+        set("total_circ_count_prev_year", '');
+        set("total_circ_count_curr_year", '');
         set("holds", '');
 
         if (details.copy) {
@@ -163,9 +165,13 @@
                 for (var i = 0; i < r.length; i++) {
                     total += Number( r[i].count() );
                     if (typeof year[ r[i].year() ] == 'undefined') year[ r[i].year() ] = 0;
-                    year[ r[i].year() ] += r[i].count(); // Add original circs and renewals together
+                    year[ r[i].year() ] += Number( r[i].count() ); // Add original circs and renewals together
                 }
                 set( 'total_circ_count', total );
+                var curr_year = (new Date()).getFullYear();
+                var prev_year = curr_year - 1;
+                set( 'total_circ_count_curr_year', year[ curr_year ] || 0 );
+                set( 'total_circ_count_prev_year', year[ prev_year ] || 0 );
                 var keys = []; for (var i in year) { keys.push( i ); }; keys.sort();
                 for (var i = 0; i < keys.length; i++) {
                     tooltip += document.getElementById('circStrings').getFormattedString( 

Modified: trunk/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul	2009-09-30 16:18:03 UTC (rev 14224)
+++ trunk/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul	2009-09-30 17:30:14 UTC (rev 14225)
@@ -122,8 +122,8 @@
                                 <textbox name="date_created" readonly="true" context="clipboard"/>
                                 <label value="Reference" />
                                 <textbox name="reference" readonly="true" context="clipboard"/>
-                                <label value="Pub Date" />
-                                <textbox name="pubdate" readonly="true" context="clipboard"/>
+                                <label value="Total Circs" />
+                                <textbox name="total_circ_count" readonly="true" context="clipboard"/>
                                 <label value="Checkout Library" />
                                 <textbox name="circ_circ_lib" readonly="true" context="clipboard"/>
                             </row>
@@ -132,8 +132,8 @@
                                 <textbox name="copy_id" readonly="true" context="clipboard"/>
                                 <label value="OPAC Visible" />
                                 <textbox name="opac_visible" readonly="true" context="clipboard"/>
-                                <label value="Edition" />
-                                <textbox name="edition" readonly="true" context="clipboard"/>
+                                <label value="Total Circs - Current Year" />
+                                <textbox name="total_circ_count_curr_year" readonly="true" context="clipboard"/>
                                 <label value="Checkin Time" />
                                 <textbox name="checkin_time" readonly="true" context="clipboard"/>
                             </row>
@@ -142,8 +142,8 @@
                                 <textbox name="tcn" readonly="true" context="clipboard"/>
                                 <label value="Holdable" />
                                 <textbox name="holdable" readonly="true" context="clipboard"/>
-                                <label value="Total Circs" />
-                                <textbox name="total_circ_count" readonly="true" context="clipboard"/>
+                                <label value="Total Circs - Prev Year" />
+                                <textbox name="total_circ_count_prev_year" readonly="true" context="clipboard"/>
                                 <label value="Checkin Scan Time" />
                                 <textbox name="checkin_scan_time" readonly="true" context="clipboard"/>
                             </row>



More information about the open-ils-commits mailing list