From 5fbf00e969e1ba6a78028dfd5a7149ce15b2de70 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 1 Sep 2006 04:41:40 +0000 Subject: [PATCH] added money.grocery retrieval method git-svn-id: svn://svn.open-ils.org/ILS/trunk@5823 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm index eb276b8882..60ed9982a0 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm @@ -309,6 +309,23 @@ sub create_grocery_bill { return $transid; } + +__PACKAGE__->register_method( + method => 'fetch_grocery', + api_name => 'open-ils.circ.money.grocery.retrieve' +); + +sub fetch_grocery { + my( $self, $conn, $auth, $id ) = @_; + my $e = new_editor(authtoken=>$auth); + return $e->event unless $e->checkauth; + return $e->event unless $e->allowed('VIEW_TRANSACTION'); # eh.. basically the same permission + my $g = $e->retrieve_money_grocery($id) + or return $e->event; + return $g; +} + + __PACKAGE__->register_method( method => "billing_items", api_name => "open-ils.circ.money.billing.retrieve.all", -- 2.11.0