[open-ils-commits] r14199 - in trunk/Open-ILS: src/perlmods/OpenILS/Application xul/staff_client/chrome/content/main (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Sep 29 08:19:32 EDT 2009
Author: phasefx
Date: 2009-09-29 08:19:31 -0400 (Tue, 29 Sep 2009)
New Revision: 14199
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
Log:
Correct the documentation for these bill retrieval methods and add variants that return just ids instead of full objects.
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm 2009-09-29 10:24:00 UTC (rev 14198)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm 2009-09-29 12:19:31 UTC (rev 14199)
@@ -1952,14 +1952,14 @@
api_name => "open-ils.actor.user.transactions.history",
argc => 1,
notes => <<" NOTES");
- Returns a list of billable transaction ids for a user, optionally by type
+ Returns a list of billable transactions for a user, optionally by type
NOTES
__PACKAGE__->register_method(
method => "user_transaction_history",
api_name => "open-ils.actor.user.transactions.history.have_charge",
argc => 1,
notes => <<" NOTES");
- Returns a list of billable transaction ids for a user that have an initial charge, optionally by type
+ Returns a list of billable transactions for a user that have an initial charge, optionally by type
NOTES
__PACKAGE__->register_method(
method => "user_transaction_history",
@@ -1967,14 +1967,14 @@
authoritative => 1,
argc => 1,
notes => <<" NOTES");
- Returns a list of billable transaction ids for a user that have a balance, optionally by type
+ Returns a list of billable transactions for a user that have a balance, optionally by type
NOTES
__PACKAGE__->register_method(
method => "user_transaction_history",
api_name => "open-ils.actor.user.transactions.history.still_open",
argc => 1,
notes => <<" NOTES");
- Returns a list of billable transaction ids for a user that are not finished
+ Returns a list of billable transactions for a user that are not finished
NOTES
__PACKAGE__->register_method(
method => "user_transaction_history",
@@ -1982,9 +1982,47 @@
authoritative => 1,
argc => 1,
notes => <<" NOTES");
+ Returns a list of billable transactions for a user that has billings
+ NOTES
+__PACKAGE__->register_method(
+ method => "user_transaction_history",
+ api_name => "open-ils.actor.user.transactions.history.ids",
+ argc => 1,
+ notes => <<" NOTES");
+ Returns a list of billable transaction ids for a user, optionally by type
+ NOTES
+__PACKAGE__->register_method(
+ method => "user_transaction_history",
+ api_name => "open-ils.actor.user.transactions.history.have_charge.ids",
+ argc => 1,
+ notes => <<" NOTES");
+ Returns a list of billable transaction ids for a user that have an initial charge, optionally by type
+ NOTES
+__PACKAGE__->register_method(
+ method => "user_transaction_history",
+ api_name => "open-ils.actor.user.transactions.history.have_balance.ids",
+ authoritative => 1,
+ argc => 1,
+ notes => <<" NOTES");
+ Returns a list of billable transaction ids for a user that have a balance, optionally by type
+ NOTES
+__PACKAGE__->register_method(
+ method => "user_transaction_history",
+ api_name => "open-ils.actor.user.transactions.history.still_open.ids",
+ argc => 1,
+ notes => <<" NOTES");
+ Returns a list of billable transaction ids for a user that are not finished
+ NOTES
+__PACKAGE__->register_method(
+ method => "user_transaction_history",
+ api_name => "open-ils.actor.user.transactions.history.have_bill.ids",
+ authoritative => 1,
+ argc => 1,
+ notes => <<" NOTES");
Returns a list of billable transaction ids for a user that has billings
NOTES
+
sub user_transaction_history {
my( $self, $conn, $auth, $userid, $type ) = @_;
@@ -2030,7 +2068,11 @@
@mbts = grep { int($_->total_owed * 100) != 0 } @mbts;
}
- return [@mbts];
+ if ($api =~ /\.ids/) {
+ return [map {$_->id} @mbts];
+ } else {
+ return [@mbts];
+ }
}
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js 2009-09-29 10:24:00 UTC (rev 14198)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js 2009-09-29 12:19:31 UTC (rev 14199)
@@ -200,15 +200,15 @@
'FM_MB_NOTE_EDIT' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.billing.note.edit' },
'FM_MBTS_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.billable_xact_summary.retrieve' },
'FM_MBTS_RETRIEVE.authoritative' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.billable_xact_summary.retrieve.authoritative' },
- 'FM_MBTS_IDS_RETRIEVE_ALL' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.history' },
- 'FM_MBTS_IDS_RETRIEVE_ALL_HAVING_CHARGE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.history.have_charge' },
- 'FM_MBTS_IDS_RETRIEVE_ALL_HAVING_BALANCE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.history.have_balance' },
- 'FM_MBTS_IDS_RETRIEVE_ALL_HAVING_BALANCE.authoritative' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.history.have_balance.authoritative' },
- 'FM_MBTS_IDS_RETRIEVE_ALL_STILL_OPEN' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.history.still_open' },
- 'FM_MBTS_IDS_RETRIEVE_ALL_HAVING_BILL' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.history.have_bill' },
- 'FM_MBTS_IDS_RETRIEVE_ALL_HAVING_BILL.authoritative' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.history.have_bill.authoritative' },
- 'FM_MBTS_IDS_RETRIEVE_FOR_HISTORY' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.history.have_bill' },
- 'FM_MBTS_IDS_RETRIEVE_FOR_HISTORY.authoritative' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.history.have_bill.authoritative' },
+ 'FM_MBTS_IDS_RETRIEVE_ALL' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.history.ids' },
+ 'FM_MBTS_IDS_RETRIEVE_ALL_HAVING_CHARGE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.history.have_charge.ids' },
+ 'FM_MBTS_IDS_RETRIEVE_ALL_HAVING_BALANCE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.history.have_balance.ids' },
+ 'FM_MBTS_IDS_RETRIEVE_ALL_HAVING_BALANCE.authoritative' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.history.have_balance.ids.authoritative' },
+ 'FM_MBTS_IDS_RETRIEVE_ALL_STILL_OPEN' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.history.still_open.ids' },
+ 'FM_MBTS_IDS_RETRIEVE_ALL_HAVING_BILL' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.history.have_bill.ids' },
+ 'FM_MBTS_IDS_RETRIEVE_ALL_HAVING_BILL.authoritative' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.history.have_bill.ids.authoritative' },
+ 'FM_MBTS_IDS_RETRIEVE_FOR_HISTORY' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.history.have_bill.ids' },
+ 'FM_MBTS_IDS_RETRIEVE_FOR_HISTORY.authoritative' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.history.have_bill.ids.authoritative' },
'FM_MP_RETRIEVE_VIA_MBTS_ID' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.payment.retrieve.all' },
'FM_MP_RETRIEVE_VIA_MBTS_ID.authoritative' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.payment.retrieve.all.authoritative' },
'FM_MP_NOTE_EDIT' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.payment.note.edit' },
More information about the open-ils-commits
mailing list