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
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});
}
'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' },
}
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) {