[open-ils-commits] r14795 - in trunk/Open-ILS: web/opac/locale/en-US xul/staff_client/chrome/content/main xul/staff_client/server/circ (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Nov 5 16:37:29 EST 2009
Author: phasefx
Date: 2009-11-05 16:37:23 -0500 (Thu, 05 Nov 2009)
New Revision: 14795
Modified:
trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
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:
Use open-ils.circ.renewal_chain.retrieve_by_circ.atomic to retrieve the original circ for a sequence of circ renewals and display the workstation for that original circ in the alternate copy details page
Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2009-11-05 20:29:40 UTC (rev 14794)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2009-11-05 21:37:23 UTC (rev 14795)
@@ -2931,6 +2931,7 @@
<!ENTITY staff.circ.alternate_copy_summary.Checkin_Time.label "Checkin Time">
<!ENTITY staff.circ.alternate_copy_summary.Checkin_Workstation.label "Checkin Workstation">
<!ENTITY staff.circ.alternate_copy_summary.Checkout_Date.label "Checkout Date">
+<!ENTITY staff.circ.alternate_copy_summary.Checkout_Workstation.label "Checkout Workstation">
<!ENTITY staff.circ.alternate_copy_summary.Circ_Modifier.label "Circ Modifier">
<!ENTITY staff.circ.alternate_copy_summary.Circulation_History.label "Circulation History">
<!ENTITY staff.circ.alternate_copy_summary.Copy_ID.label "Copy ID">
@@ -2952,6 +2953,7 @@
<!ENTITY staff.circ.alternate_copy_summary.Quick_Summary.label "Quick Summary">
<!ENTITY staff.circ.alternate_copy_summary.Reference.label "Reference">
<!ENTITY staff.circ.alternate_copy_summary.Remaining_Renewals.label "Remaining Renewals">
+<!ENTITY staff.circ.alternate_copy_summary.Renewal_Workstation.label "Renewal Workstation">
<!ENTITY staff.circ.alternate_copy_summary.Rolling_Counter.label "Rolling Counter">
<!ENTITY staff.circ.alternate_copy_summary.Status.label "Status">
<!ENTITY staff.circ.alternate_copy_summary.TCN.label "TCN">
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js 2009-11-05 20:29:40 UTC (rev 14794)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js 2009-11-05 21:37:23 UTC (rev 14795)
@@ -178,6 +178,7 @@
'FM_BRN_FROM_MARCXML' : { 'app' : 'open-ils.search', 'method' : 'open-ils.search.z3950.marcxml_to_brn', 'secure' : false },
'FM_CBT_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.billing_type.ranged.retrieve.all', 'secure' : false },
'FM_CCS_RETRIEVE' : { 'app' : 'open-ils.search', 'method' : 'open-ils.search.config.copy_status.retrieve.all', 'secure' : false },
+ 'FM_CIRC_CHAIN' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.renewal_chain.retrieve_by_circ.atomic' },
'FM_CIRC_DETAILS' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.fleshed.retrieve' },
'FM_CIRC_DETAILS.authoritative' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.fleshed.retrieve.authoritative' },
'FM_CIRC_RETRIEVE_VIA_ID' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.retrieve' },
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-11-05 20:29:40 UTC (rev 14794)
+++ trunk/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js 2009-11-05 21:37:23 UTC (rev 14795)
@@ -271,6 +271,8 @@
set("xact_start", '');
set("create_time", '');
set("workstation", '');
+ set("renewal_workstation", '');
+ set("checkout_workstation", '');
set("billings", '');
set("payments", '');
set("billable_transaction", '');
@@ -309,6 +311,19 @@
set("xact_start", details.circ.xact_start());
set("create_time", details.circ.create_time());
set("workstation", details.circ.workstation());
+ if (get_bool(details.circ.opac_renewal())||get_bool(details.circ.phone_renewal())||get_bool(details.circ.desk_renewal())) {
+ set("renewal_workstation", typeof details.circ.workstation() == 'object' ? details.circ.workstation().name() : details.circ.workstation() );
+ network.simple_request('FM_CIRC_CHAIN', [ses(), details.circ.id() ], function(req) { // Tiny race condition between details.circ and circs[circs.length-1] here, but meh :)
+ try {
+ var circs = req.getResultObject();
+ set("checkout_workstation", typeof circs[0].workstation() == 'object' ? circs[0].workstation().name() : circs[0].workstation() );
+ } catch(E) {
+ alert('Error in alternate_copy_summary.js, FM_CIRC_CHAIN: ' + E);
+ }
+ } );
+ } else {
+ set("checkout_workstation", typeof details.circ.workstation() == 'object' ? details.circ.workstation().name() : details.circ.workstation() );
+ }
set("billings", details.circ.billings());
set("payments", details.circ.payments());
set("billable_transaction", details.circ.billable_transaction());
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-11-05 20:29:40 UTC (rev 14794)
+++ trunk/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul 2009-11-05 21:37:23 UTC (rev 14795)
@@ -106,6 +106,8 @@
<textbox name="reference" readonly="true" context="clipboard"/>
<label value="&staff.circ.alternate_copy_summary.Total_Circs.label;" />
<textbox name="total_circ_count" readonly="true" context="clipboard"/>
+ <label value="&staff.circ.alternate_copy_summary.Checkout_Workstation.label;" />
+ <textbox name="checkout_workstation" readonly="true" context="clipboard"/>
</row>
<row>
<label value="&staff.circ.alternate_copy_summary.Status_Changed_Time.label;" />
@@ -114,8 +116,8 @@
<textbox name="opac_visible" readonly="true" context="clipboard"/>
<label value="&staff.circ.alternate_copy_summary.Total_Circs___Current_Year.label;" />
<textbox name="total_circ_count_curr_year" readonly="true" context="clipboard"/>
- <label value="&staff.circ.alternate_copy_summary.Checkin_Time.label;" />
- <textbox name="checkin_time" readonly="true" context="clipboard"/>
+ <label value="&staff.circ.alternate_copy_summary.Renewal_Workstation.label;" />
+ <textbox name="renewal_workstation" readonly="true" context="clipboard"/>
</row>
<row>
<label value="&staff.circ.alternate_copy_summary.Copy_ID.label;" />
@@ -124,8 +126,8 @@
<textbox name="holdable" readonly="true" context="clipboard"/>
<label value="&staff.circ.alternate_copy_summary.Total_Circs___Prev_Year.label;" />
<textbox name="total_circ_count_prev_year" readonly="true" context="clipboard"/>
- <label value="&staff.circ.alternate_copy_summary.Checkin_Scan_Time.label;" />
- <textbox name="checkin_scan_time" readonly="true" context="clipboard"/>
+ <label value="&staff.circ.alternate_copy_summary.Checkin_Time.label;" />
+ <textbox name="checkin_time" readonly="true" context="clipboard"/>
</row>
<row>
<label value="&staff.circ.alternate_copy_summary.TCN.label;" />
@@ -134,6 +136,8 @@
<textbox name="circ_mod" readonly="true" context="clipboard"/>
<label value="&staff.circ.alternate_copy_summary.Rolling_Counter.label;" />
<textbox name="rolling_counter" readonly="true" context="clipboard"/>
+ <label value="&staff.circ.alternate_copy_summary.Checkin_Scan_Time.label;" />
+ <textbox name="checkin_scan_time" readonly="true" context="clipboard"/>
</row>
<row>
<spacer />
More information about the open-ils-commits
mailing list