[open-ils-commits] r9645 - branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq

svn at svn.open-ils.org svn at svn.open-ils.org
Tue May 20 16:37:17 EDT 2008


Author: erickson
Date: 2008-05-20 16:37:13 -0400 (Tue, 20 May 2008)
New Revision: 9645

Modified:
   branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm
Log:
added initial lineitem search

Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm	2008-05-20 19:09:16 UTC (rev 9644)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm	2008-05-20 20:37:13 UTC (rev 9645)
@@ -713,7 +713,36 @@
     return {complete=>1, picklist_id=>$picklist->id};
 }
 
+__PACKAGE__->register_method(
+	method => 'lineitem_search',
+	api_name => 'open-ils.acq.lineitem.search',
+    stream => 1,
+	signature => {
+        desc => 'Searches lineitems',
+        params => [
+            {desc => 'Authentication token', type => 'string'},
+            {desc => 'Search definition', type => 'object'},
+            {desc => 'Optoins hash.  idlist=true', type => 'object'},
+            {desc => 'List of lineitems', type => 'object/number'},
+        ]
+    }
+);
 
+sub lineitem_search {
+    my($self, $conn, $auth, $search, $options) = @_;
+    my $e = new_editor(authtoken=>$auth, xact=>1);
+    return $e->event unless $e->checkauth;
+    return $e->event unless $e->allowed('CREATE_PICKLIST');
+    # XXX needs serious permissions consideration!
+    my $pls = $e->search_acq_lineitem($search, {idlist=>$$options{idlist}});
+    for my $pl (@$pls) {
+        $pl->clear_marc if $$options{clear_marc};
+        $conn->respond($_) for $pl;
+    }
+    return undef;
+}
 
 
+
+
 1;



More information about the open-ils-commits mailing list