From 865121a5de26e982880bacca2ddff7382097f156 Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 23 Aug 2006 22:29:35 +0000 Subject: [PATCH] added some cash report methods git-svn-id: svn://svn.open-ils.org/ILS/trunk@5646 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../OpenILS/Application/Circ/Money.pm | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm index 6cef7cf438..8af6fd8b40 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm @@ -481,6 +481,37 @@ sub fetch_mbts { } +__PACKAGE__->register_method( + method => 'desk_payments', + api_name => 'open-ils.circ.money.org_unit.desk_payments' +); + +sub desk_payments { + my( $self, $conn, $auth, $org, $start_date, $end_date ) = @_; + my $e = new_editor(authtoken=>$auth); + return $e->event unless $e->checkauth; + return $e->event unless $e->allowed('VIEW_TRANSACTION', $org); + return $U->storagereq( + 'open-ils.storage.money.org_unit.desk_payments.atomic', + $org, $start_date, $end_date ); +} + + +__PACKAGE__->register_method( + method => 'user_payments', + api_name => 'open-ils.circ.money.org_unit.user_payments' +); + +sub user_payments { + my( $self, $conn, $auth, $org, $start_date, $end_date ) = @_; + my $e = new_editor(authtoken=>$auth); + return $e->event unless $e->checkauth; + return $e->event unless $e->allowed('VIEW_TRANSACTION', $org); + return $U->storagereq( + 'open-ils.storage.money.org_unit.user_payments.atomic', + $org, $start_date, $end_date ); +} + -- 2.43.2