From a2bd79cc7e9e0eb10b009b00825376d7fa29f7b4 Mon Sep 17 00:00:00 2001 From: pines Date: Tue, 5 Sep 2006 10:53:05 +0000 Subject: [PATCH] tweaking bill history method git-svn-id: svn://svn.open-ils.org/ILS/trunk@5957 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Actor.pm | 11 ++++++++++- Open-ILS/xul/staff_client/chrome/content/main/constants.js | 1 + Open-ILS/xul/staff_client/server/patron/bill_history.xul | 3 ++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm index ffc48190b8..d379846914 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm @@ -1766,6 +1766,14 @@ __PACKAGE__->register_method( 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", + argc => 1, + notes => <<" NOTES"); + Returns a list of billable transaction ids for a user that has billings + NOTES + =head old @@ -1807,11 +1815,12 @@ sub user_transaction_history { my @xact = (xact_type => $type) if(defined($type)); my @balance = (balance_owed => { "!=" => 0}) if($api =~ /have_balance/); my @charge = (last_billing_ts => { "!=" => undef }) if $api =~ /have_charge/; + my @total_billed = (total_billed => { "!=" => 0}) if $api =~ /have_bill/; my @xact_finish = (xact_finish => undef ) if $api =~ /still_open/; return $e->search_money_billable_transaction_summary( [ - { usr => $userid, @xact, @charge, @balance, @xact_finish }, + { usr => $userid, @xact, @charge, @balance, @xact_finish, @total_billed }, { order_by => 'xact_start DESC' } ], {idlist => 1}); } diff --git a/Open-ILS/xul/staff_client/chrome/content/main/constants.js b/Open-ILS/xul/staff_client/chrome/content/main/constants.js index a9c531a7b2..d3a1faf625 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js @@ -129,6 +129,7 @@ const api = { '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_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_MP_RETRIEVE_VIA_MBTS_ID' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.payment.retrieve.all' }, 'FM_MG_CREATE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.grocery.create' }, 'FM_MG_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.grocery.retrieve' }, diff --git a/Open-ILS/xul/staff_client/server/patron/bill_history.xul b/Open-ILS/xul/staff_client/server/patron/bill_history.xul index 5af9edade3..4502182c5f 100644 --- a/Open-ILS/xul/staff_client/server/patron/bill_history.xul +++ b/Open-ILS/xul/staff_client/server/patron/bill_history.xul @@ -49,7 +49,8 @@ } function retrieve_mbts_for_list() { - var method = 'FM_MBTS_IDS_RETRIEVE_ALL_HAVING_CHARGE'; + //var method = 'FM_MBTS_IDS_RETRIEVE_ALL_HAVING_CHARGE'; + var method = 'FM_MBTS_IDS_RETRIEVE_ALL_HAVING_BILL'; if (g.cgi.param('current')) method = 'FM_MBTS_IDS_RETRIEVE_ALL_HAVING_BALANCE'; g.mbts_ids = g.network.simple_request(method,[ses(),g.patron_id]); if (g.mbts_ids.ilsevent) { -- 2.11.0