added custom copy flesh method
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 28 Aug 2006 19:33:58 +0000 (19:33 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 28 Aug 2006 19:33:58 +0000 (19:33 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5739 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 1db0210..57544be 100644 (file)
@@ -313,6 +313,30 @@ sub fleshed_copy_retrieve2 {
 }
 
 
+__PACKAGE__->register_method(
+       method => 'flesh_copy_custom',
+       api_name => 'open-ils.search.asset.copy.fleshed.custom'
+);
+
+sub flesh_copy_custom {
+       my( $self, $conn, $copyid, $fields ) = @_;
+       my $e = new_editor();
+       my $copy = $e->retrieve_asset_copy(
+               [
+                       $copyid,
+                       { 
+                               flesh                           => 1,
+                               flesh_fields    => { 
+                                       acp => $fields,
+                               }
+                       }
+               ]
+       ) or return $e->event;
+       return $copy;
+}
+
+
+