fix open-ils.circ.prev_renewal_chain.retrieve_by_circ.summary to return the correct...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 5 Aug 2010 19:08:08 +0000 (19:08 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 5 Aug 2010 19:08:08 +0000 (19:08 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17103 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Circ.pm
Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js
Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul

index c2197dc..f19ccca 100644 (file)
@@ -1679,7 +1679,7 @@ sub retrieve_prev_circ_chain {
         my $target_copy = $$first_circ{'target_copy'};
         my $usr = $$first_circ{'usr'};
         my $last_circ_from_prev_chain = $e->json_query({
-            'select' => { 'circ' => ['id'] },
+            'select' => { 'circ' => ['id','usr'] },
             'from' => 'circ', 
             'where' => {
                 target_copy => $target_copy,
@@ -1694,7 +1694,7 @@ sub retrieve_prev_circ_chain {
         return undef unless $sum;
         my $obj = Fieldmapper::action::circ_chain_summary->new;
         $obj->$_($sum->{$_}) for keys %$sum;
-        return { 'summary' => $obj, 'usr' => $usr };
+        return { 'summary' => $obj, 'usr' => $$last_circ_from_prev_chain{'usr'} };
 
     } else {
 
index 713a26d..0deea00 100644 (file)
@@ -401,6 +401,7 @@ function load_item() {
                     patron.util.format_name( r_au ) + ' : ' + r_au.card().barcode(),
                     details.circ.usr()
                 );
+                set_tooltip('patron_name','circ id ' + details.circ.id());
             });
             set("xact_finish", util.date.formatted_date( details.circ.xact_finish(), '%{localized}' )); 
             set("xact_start", util.date.formatted_date( details.circ.xact_start(), '%{localized}' )); 
@@ -442,6 +443,7 @@ function load_item() {
                             patron.util.format_name( r_au ) + ' : ' + r_au.card().barcode(),
                             robj['usr']
                         );
+                        set_tooltip('prev_patron_name','circ chain prior to circ id ' + details.circ.id());
                     });
                     set("prev_num_circs", summary.num_circs());
                     set("prev_num_renewals", Number(summary.num_circs()) - 1);
@@ -556,6 +558,7 @@ function load_item() {
         set_tooltip("selection_ou", '');
         set("target", '');
         set("hold_usr", '');
+        set("hold_patron_name", '');
         set("cancel_time", '');
         set("notify_time", '');
         set("notify_count", '');
@@ -591,7 +594,7 @@ function load_item() {
 
             JSAN.use('patron.util'); 
             var au_obj = patron.util.retrieve_fleshed_au_via_id( ses(), details.hold.usr() );
-            $('patron_name').setAttribute('value', $('circStrings').getFormattedString('staff.circ.copy_details.user_details', [au_obj.family_name(), au_obj.first_given_name(), au_obj.card().barcode()]) );
+            $('hold_patron_name').setAttribute('value', $('circStrings').getFormattedString('staff.circ.copy_details.user_details', [au_obj.family_name(), au_obj.first_given_name(), au_obj.card().barcode()]) );
 
             set("hold_status", details.hold.status()); 
             set("transit", details.hold.transit()); 
index 46d8baf..f85b53c 100644 (file)
                 <tabpanel orient="vertical"><!-- Hold/Transit -->
                     <groupbox flex="1" id="holds" style="overflow: none; min-height: 80;">
                         <caption id="hold_caption" label="&staff.circ.copy_details.hold_caption;"/>
-                        <label id="patron_name" class="patronNameLarge"/>
+                        <label id="hold_patron_name" class="patronNameLarge"/>
                         <tree id="hold" flex="1" enableColumnDrag="true"/>
                         <spacer FIXME="label and tree get swapped without this"/>
                     </groupbox>