[open-ils-commits] r14796 - trunk/Open-ILS/src/perlmods/OpenILS/Application (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Nov 5 17:25:14 EST 2009


Author: erickson
Date: 2009-11-05 17:25:08 -0500 (Thu, 05 Nov 2009)
New Revision: 14796

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
Log:
use new mbts mat view directly instead of jumping through the billable xact.  remove explicit xact management and rely on authoritative

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm	2009-11-05 21:37:23 UTC (rev 14795)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm	2009-11-05 22:25:08 UTC (rev 14796)
@@ -2075,7 +2075,7 @@
 	my( $self, $conn, $auth, $userid, $type ) = @_;
 
 	# run inside of a transaction to prevent replication delays
-	my $e = new_editor(xact=>1, authtoken=>$auth);
+	my $e = new_editor(authtoken=>$auth);
 	return $e->die_event unless $e->checkauth;
 
 	if( $e->requestor->id ne $userid ) {
@@ -2086,20 +2086,13 @@
 	my $api = $self->api_name;
 	my @xact_finish  = (xact_finish => undef ) if ($api =~ /history.still_open$/);
 
-	my @xacts = @{ $e->search_money_billable_transaction(
-		[	{ usr => $userid, @xact_finish },
-			{ flesh => 1,
-			  flesh_fields => { mbt => [ qw/billings payments grocery circulation/ ] },
-			  order_by => { mbt => 'xact_start DESC' },
-			}
-		],
-      {substream => 1}
-	) };
+    my @mbts = $e->search_money_billable_transaction_summary(
+        [ 
+            { usr => $userid, @xact_finish },
+            { order_by => { mbt => 'xact_start DESC' } }
+        ]
+    );
 
-	$e->rollback;
-
-	my @mbts = $U->make_mbts( $e, @xacts );
-
 	if(defined($type)) {
 		@mbts = grep { $_->xact_type eq $type } @mbts;
 	}



More information about the open-ils-commits mailing list