From: erickson Date: Thu, 5 Nov 2009 22:25:08 +0000 (+0000) Subject: use new mbts mat view directly instead of jumping through the billable xact. remove... X-Git-Tag: kcls-grey-screen-prod1~3081 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2bb437c30f303683420a6d78d8e949c682297c0c;p=evergreen%2Fequinox.git use new mbts mat view directly instead of jumping through the billable xact. remove explicit xact management and rely on authoritative git-svn-id: svn://svn.open-ils.org/ILS/trunk@14796 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm index 4575adfcb6..eb6ace8265 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm @@ -2075,7 +2075,7 @@ sub user_transaction_history { 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,19 +2086,12 @@ sub user_transaction_history { 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} - ) }; - - $e->rollback; - - my @mbts = $U->make_mbts( $e, @xacts ); + my @mbts = $e->search_money_billable_transaction_summary( + [ + { usr => $userid, @xact_finish }, + { order_by => { mbt => 'xact_start DESC' } } + ] + ); if(defined($type)) { @mbts = grep { $_->xact_type eq $type } @mbts;