From: erickson Date: Fri, 10 Nov 2006 19:53:01 +0000 (+0000) Subject: added a barcode version of the copy details method X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e8addbe8925646fe2d8b766c4e98876cb6ef6f67;p=Evergreen.git added a barcode version of the copy details method git-svn-id: svn://svn.open-ils.org/ILS/trunk@6581 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm index 277761882a..362147d694 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm @@ -838,13 +838,19 @@ sub age_hold_rules { +__PACKAGE__->register_method( + method => 'copy_details_barcode', + api_name => 'open-ils.circ.copy_details.retrieve.barcode'); +sub copy_details_barcode { + my( $self, $conn, $auth, $barcode ) = @_; + return $self->copy_details( $conn, $auth, + new_editor()->search_asset_copy({barcode=>$barcode,deleted=>'f'},{idlist=>1})->[0]); +} + __PACKAGE__->register_method( method => 'copy_details', - api_name => 'open-ils.circ.copy_details.retrieve', - signature => q/ - / -); + api_name => 'open-ils.circ.copy_details.retrieve'); sub copy_details { my( $self, $conn, $auth, $copy_id ) = @_;