added barcode version of fleshed2
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 21 Aug 2006 21:42:22 +0000 (21:42 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 21 Aug 2006 21:42:22 +0000 (21:42 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5633 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm

index ee74c04..b89cdda 100644 (file)
@@ -257,6 +257,20 @@ sub fleshed_copy_retrieve {
        return $c;
 }
 
+
+
+__PACKAGE__->register_method(
+       method => 'fleshed_by_barcode',
+       api_name        => "open-ils.search.asset.copy.fleshed2.find_by_barcode",);
+sub fleshed_by_barcode {
+       my( $self, $conn, $barcode ) = @_;
+       my $e = new_editor();
+       my $copyid = $e->search_asset_copy({barcode => $barcode}, {idlist=>1})->[0]
+               or return $e->event;
+       return $self->fleshed_copy_retrieve2($conn, $copyid);
+}
+
+
 __PACKAGE__->register_method(
        method  => "fleshed_copy_retrieve2",
        api_name        => "open-ils.search.asset.copy.fleshed2.retrieve",);