added a barcode version of the copy details method
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 10 Nov 2006 19:53:01 +0000 (19:53 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 10 Nov 2006 19:53:01 +0000 (19:53 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@6581 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Circ.pm

index 2777618..362147d 100644 (file)
@@ -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 ) = @_;