added clear_marc support to lineitem ident search
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 1 Aug 2008 17:23:58 +0000 (17:23 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 1 Aug 2008 17:23:58 +0000 (17:23 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@10234 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm

index ec18479..5bd5033 100644 (file)
@@ -418,6 +418,7 @@ __PACKAGE__->register_method(
             {   desc => q/
                     Options hash.  Options are:
                         idlist : if set, only return lineitem IDs
+                        clear_marc : if set, strip the MARC xml from the lineitem before delivery
                 /,
                 type => 'object',
             }
@@ -482,7 +483,9 @@ sub lineitem_search_ident {
         if($$options{idlist}) {
             $conn->respond($li_id);
         } else {
-            $conn->respond($e->retrieve_acq_lineitem($li_id));
+            my $li = $e->retrieve_acq_lineitem($li_id);
+            $li->clear_marc if $$options{clear_marc};
+            $conn->respond($li);
         }
     }
     return undef;