]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/money.pm
specialized money-oriented methods
[Evergreen.git] / Open-ILS / src / perlmods / OpenILS / Application / Storage / Publisher / money.pm
1 package OpenILS::Application::Storage::Publisher::money;
2 use base qw/OpenILS::Application::Storage/;
3 use OpenSRF::Utils::Logger qw/:level/;
4 my $log = 'OpenSRF::Utils::Logger';
5
6 sub xact_summary {
7         my $self = shift;
8         my $client = shift;
9         my $xact = shift || '';
10
11         my $sql = <<"   SQL";
12                 SELECT  balance_owed
13                   FROM  money.usr_billable_summary_xact
14                   WHERE transaction = ?
15         SQL
16
17         return money::billing->db_Main->selectrow_hashref($sql, {}, "$xact");
18 }
19 __PACKAGE__->register_method(
20         api_name        => 'open-ils.storage.money.billing.billable_transaction_summary',
21         api_level       => 1,
22         method          => 'xact_summary',
23 );
24
25 1;