[open-ils-commits] r15177 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Dec 16 17:34:30 EST 2009
Author: erickson
Date: 2009-12-16 17:34:24 -0500 (Wed, 16 Dec 2009)
New Revision: 15177
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor/UserGroups.pm
Log:
added a balance owed summary call for group members
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor/UserGroups.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor/UserGroups.pm 2009-12-16 22:14:12 UTC (rev 15176)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor/UserGroups.pm 2009-12-16 22:34:24 UTC (rev 15177)
@@ -10,7 +10,39 @@
sub initialize { return 1; }
+
__PACKAGE__->register_method(
+ method => 'group_money_summary',
+ api_name => 'open-ils.actor.usergroup.members.balance_owed',
+ authoritative => 1,
+ signature => q/
+ /
+);
+
+sub group_money_summary {
+ my($self, $conn, $auth, $group_id) = @_;
+ my $e = new_editor(authtoken=>$auth);
+ return $e->event unless $e->checkauth;
+ return $e->event unless $e->allowed('VIEW_USER');
+ return $e->json_query(
+ {
+ select => {mous => ['usr', 'balance_owed']},
+ from => 'mous',
+ where => {
+ usr => {
+ in => {
+ select => {au => ['id']},
+ from => 'au',
+ where => {usrgroup => $group_id}
+ }
+ }
+ }
+ }
+ );
+}
+
+
+__PACKAGE__->register_method(
method => 'get_users_from_usergroup',
api_name => 'open-ils.actor.usergroup.members.retrieve',
authoritative => 1,
More information about the open-ils-commits
mailing list