Bill, would you sanity check this? appears to work on dev
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 5 Sep 2006 17:56:07 +0000 (17:56 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 5 Sep 2006 17:56:07 +0000 (17:56 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5965 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index a46cc7c..c522581 100644 (file)
@@ -959,6 +959,15 @@ sub fetch_billable_xact {
        return ($xact, $evt);
 }
 
+sub fetch_billable_xact_summary {
+       my( $self, $id ) = @_;
+       my($xact, $evt);
+       $logger->debug("Fetching billable transaction summary %id");
+       $xact = $self->cstorereq(
+               'open-ils.cstore.direct.money.billable_transaction_summary.retrieve', $id );
+       $evt = OpenILS::Event->new('MONEY_BILLABLE_TRANSACTION_NOT_FOUND') unless $xact;
+       return ($xact, $evt);
+}
 
 sub fetch_fleshed_copy {
        my( $self, $id ) = @_;
index a41b892..f8cc997 100644 (file)
@@ -82,7 +82,8 @@ sub make_payments {
                my $amount = $pay->[1];
                $amount =~ s/\$//og; # just to be safe
 
-               ($trans, $evt) = $apputils->fetch_open_billable_transaction($transid);
+               #($trans, $evt) = $apputils->fetch_open_billable_transaction($transid);
+               ($trans, $evt) = $apputils->fetch_billable_xact_summary($transid);
                return $evt if $evt;
 
                if($trans->usr != $userid) { # Do we need to restrict this in some way ??