From 0d563614834e5fe709ab96f6d16bac8e242078bb Mon Sep 17 00:00:00 2001 From: phasefx Date: Tue, 29 Sep 2009 13:08:07 +0000 Subject: [PATCH] Spruce up open-ils.actor.user.transaction.fleshed.retrieve. The new bill history interface will use it git-svn-id: svn://svn.open-ils.org/ILS/trunk@14200 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Actor.pm | 18 +++++++++--------- .../xul/staff_client/chrome/content/main/constants.js | 1 + 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm index b1d6c4bbc4..a5dfd4a05d 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm @@ -1605,7 +1605,7 @@ __PACKAGE__->register_method( api_name => "open-ils.actor.user.transaction.fleshed.retrieve", argc => 1, notes => <<" NOTES"); - Returns a fleshedtransaction record + Returns a fleshed transaction record NOTES __PACKAGE__->register_method( method => "user_transaction_retrieve", @@ -1617,7 +1617,7 @@ __PACKAGE__->register_method( sub user_transaction_retrieve { my( $self, $client, $login_session, $bill_id ) = @_; - # XXX I think I'm deprecated... make sure + # I think I'm deprecated... make sure. phasefx says, "No, I'll use you :) my $trans = $apputils->simple_scalar_request( "open-ils.cstore", @@ -1639,7 +1639,7 @@ sub user_transaction_retrieve { my $circ = $apputils->simple_scalar_request( "open-ils.cstore", - "open-ils..direct.action.circulation.retrieve", + "open-ils.cstore.direct.action.circulation.retrieve", $trans->id ); return {transaction => $trans} unless $circ; @@ -1654,17 +1654,17 @@ sub user_transaction_retrieve { $logger->debug("Found the circ title"); my $mods; + my $copy = $apputils->simple_scalar_request( + "open-ils.cstore", + "open-ils.cstore.direct.asset.copy.retrieve", + $circ->target_copy ); + try { my $u = OpenILS::Utils::ModsParser->new(); $u->start_mods_batch($title->marc()); $mods = $u->finish_mods_batch(); } otherwise { if ($title->id == OILS_PRECAT_RECORD) { - my $copy = $apputils->simple_scalar_request( - "open-ils.cstore", - "open-ils.cstore.direct.asset.copy.retrieve", - $circ->target_copy ); - $mods = new Fieldmapper::metabib::virtual_record; $mods->doc_id(OILS_PRECAT_RECORD); $mods->title($copy->dummy_title); @@ -1674,7 +1674,7 @@ sub user_transaction_retrieve { $logger->debug("MODSized the circ title"); - return {transaction => $trans, circ => $circ, record => $mods }; + return {transaction => $trans, circ => $circ, record => $mods, copy => $copy }; } 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 41873e4481..2348aa54e1 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js @@ -48,6 +48,7 @@ const api = { 'BILL_PAY' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.payment' }, 'BLOB_AU_PARTS_RETRIEVE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.retrieve.parts', 'cacheable' : true, 'ttl' : 120000 }, 'BLOB_MARC_CALLNUMBERS_RETRIEVE' : { 'app' : 'open-ils.cat', 'method' : 'open-ils.cat.biblio.record.marc_cn.retrieve', 'secure' : false }, + 'BLOB_MBTS_DETAILS_RETRIEVE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transaction.fleshed.retrieve', 'secure' : false }, 'BLOB_MOBTS_CIRC_MVR_HAVING_BALANCE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.have_balance.fleshed' }, 'BLOB_MOBTS_CIRC_MVR_OPEN' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.fleshed' }, 'BUCKET_CREATE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.container.create' }, -- 2.11.0