checking for deleted == false on copy searches
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 17 Mar 2006 17:26:21 +0000 (17:26 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 17 Mar 2006 17:26:21 +0000 (17:26 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@3388 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 5ad6a8e..f937a6f 100644 (file)
@@ -519,7 +519,8 @@ sub fetch_copy_by_barcode {
        $logger->debug("Fetching copy by barcode $barcode from storage");
 
        $copy = $self->simplereq( 'open-ils.storage',
-               'open-ils.storage.direct.asset.copy.search.barcode', $barcode );
+               'open-ils.storage.direct.asset.copy.search_where', { barcode => $barcode, deleted => 'f'} );
+               #'open-ils.storage.direct.asset.copy.search.barcode', $barcode );
 
        $evt = OpenILS::Event->new('COPY_NOT_FOUND', barcode => $barcode) unless $copy;
 
@@ -936,7 +937,8 @@ sub fetch_copies_by_call_number {
        my( $self, $cnid ) = @_;
        $logger->info("Fetching copies by call number $cnid");
        return $self->storagereq(
-               'open-ils.storage.direct.asset.copy.search.call_number.atomic', $cnid );
+               'open-ils.storage.direct.asset.copy.search_where.atomic', { call_number => $cnid, deleted => 'f' } );
+               #'open-ils.storage.direct.asset.copy.search.call_number.atomic', $cnid );
 }
 
 1;
index 7e110f5..a5775a5 100644 (file)
@@ -563,6 +563,14 @@ sub orgs_for_title {
 }
 
 
+__PACKAGE__->register_method(
+       method  => "retrieve_copies_",
+       api_name        => "open-ils.cat.asset.copy_tree.retrieve_");
+
+sub retrieve_copies_ {
+       my( $self, $conn, $authtoken, $docid, $orgs ) = @_;
+}
+
 
 __PACKAGE__->register_method(
        method  => "retrieve_copies",
@@ -628,7 +636,9 @@ sub _build_volume_list {
 
                warn "Grabbing copies for volume: " . $volume->id . "\n";
                my $creq = $session->request(
-                       "open-ils.storage.direct.asset.copy.search.call_number.atomic", $volume->id );
+                       "open-ils.storage.direct.asset.copy.search_where.atomic", 
+                       { call_number => $volume->id , deleted => 'f' });
+                       #"open-ils.storage.direct.asset.copy.search.call_number.atomic", $volume->id );
 
                my $copies = $creq->gather(1);
 
@@ -741,8 +751,10 @@ sub _delete_volume {
        warn "Deleting volume " . $volume->id . "\n";
 
        my $copies = $session->request(
-               "open-ils.storage.direct.asset.copy.search.call_number.atomic",
-               $volume->id )->gather(1);
+               "open-ils.storage.direct.asset.copy.search_where.atomic", 
+               { call_number => $volume->id, deleted => 'f' } )->gather(1);
+               #"open-ils.storage.direct.asset.copy.search.call_number.atomic",
+
        if(@$copies) {
                throw OpenSRF::EX::ERROR 
                        ("Cannot remove volume with copies attached");
index 1baf1e6..251c993 100644 (file)
@@ -450,7 +450,8 @@ sub note_batch {
 
        for my $c (@$cns) {
                my $copyids = $U->storagereq(
-                       'open-ils.storage.id_list.asset.copy.search.call_number.atomic', $c);
+                       #'open-ils.storage.id_list.asset.copy.search.call_number.atomic', $c);
+                       'open-ils.storage.id_list.asset.copy.search_where.atomic', { call_number => $c, deleted => 'f' });
                push(@copies, @$copyids);
        }