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) {
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(
<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>
<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>
<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>