run total owed and total checked out inside a transaction. in particular, give the...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 7 Oct 2008 20:01:48 +0000 (20:01 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 7 Oct 2008 20:01:48 +0000 (20:01 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10784 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm

index bdf4212..8300a17 100644 (file)
@@ -1138,14 +1138,20 @@ sub __patron_money_owed {
 
 sub patron_money_owed {
        my( $self, $userid ) = @_;
-       return $self->storagereq(
-               'open-ils.storage.actor.user.total_owed', $userid);
+       my $ses = $self->start_db_session();
+       my $val = $ses->request(
+               'open-ils.storage.actor.user.total_owed', $userid)->gather(1);
+       $self->rollback_db_session($ses);
+       return $val;
 }
 
 sub patron_total_items_out {
        my( $self, $userid ) = @_;
-       return $self->storagereq(
-               'open-ils.storage.actor.user.total_out', $userid);
+       my $ses = $self->start_db_session();
+       my $val = $ses->request(
+               'open-ils.storage.actor.user.total_out', $userid)->gather(1);
+       $self->rollback_db_session($ses);
+       return $val;
 }