LP1076411 Return updated circ object from checkin
authorBill Erickson <berick@esilibrary.com>
Fri, 29 Mar 2013 13:41:44 +0000 (09:41 -0400)
committerBen Shum <bshum@biblio.org>
Sat, 27 Apr 2013 05:59:25 +0000 (01:59 -0400)
Retrieve an updated copy of the circulation object to return to the
caller during checkin.  This ensures the data in the circ object, in
particular date fields, are consistent with the database.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm

index 273978e..ef2b361 100644 (file)
@@ -3556,11 +3556,17 @@ sub checkin_flesh_events {
     }
 
     if($self->circ) {
-        # if we checked in a circulation, flesh the billing summary data
-        $self->circ->billable_transaction(
-            $self->editor->retrieve_money_billable_transaction([
-                $self->circ->id,
-                {flesh => 1, flesh_fields => {mbt => ['summary']}}
+        # update our copy of the circ object and 
+        # flesh the billing summary data
+        $self->circ(
+            $self->editor->retrieve_action_circulation([
+                $self->circ->id, {
+                    flesh => 2,
+                    flesh_fields => {
+                        circ => ['billable_transaction'],
+                        mbt => ['summary']
+                    }
+                }
             ])
         );
     }