From 391de3eab1ffa7655caeda04fce4a10fb27da4ee Mon Sep 17 00:00:00 2001 From: miker Date: Thu, 14 Jul 2005 21:30:11 +0000 Subject: [PATCH] specialized money-oriented methods git-svn-id: svn://svn.open-ils.org/ILS/trunk@1191 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../OpenILS/Application/Storage/Publisher/money.pm | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/money.pm diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/money.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/money.pm new file mode 100644 index 0000000000..9c3962d0aa --- /dev/null +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/money.pm @@ -0,0 +1,25 @@ +package OpenILS::Application::Storage::Publisher::money; +use base qw/OpenILS::Application::Storage/; +use OpenSRF::Utils::Logger qw/:level/; +my $log = 'OpenSRF::Utils::Logger'; + +sub xact_summary { + my $self = shift; + my $client = shift; + my $xact = shift || ''; + + my $sql = <<" SQL"; + SELECT balance_owed + FROM money.usr_billable_summary_xact + WHERE transaction = ? + SQL + + return money::billing->db_Main->selectrow_hashref($sql, {}, "$xact"); +} +__PACKAGE__->register_method( + api_name => 'open-ils.storage.money.billing.billable_transaction_summary', + api_level => 1, + method => 'xact_summary', +); + +1; -- 2.11.0