added a wrapper for the location copy summary count call
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 8 Nov 2008 00:46:05 +0000 (00:46 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 8 Nov 2008 00:46:05 +0000 (00:46 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@11100 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index aa5824c..6e83b52 100644 (file)
@@ -1330,6 +1330,26 @@ sub copy_count_summary {
 }
 
 __PACKAGE__->register_method(
+       method          => "copy_count_location_summary",
+       api_name        => "open-ils.search.biblio.copy_counts.location.summary.retrieve",
+       notes           => <<"  NOTES");
+       returns an array of these:
+               [ org_id, callnumber_label, <status1_count>, <status2_cout>,...]
+               where statusx is a copy status name.  the statuses are sorted
+               by id.
+       NOTES
+
+sub copy_count_location_summary {
+       my( $self, $client, $rid, $org, $depth ) = @_;
+       $org ||= 1;
+       $depth ||= 0;
+    my $data = $U->storagereq(
+        'open-ils.storage.biblio.record_entry.status_copy_location_count.atomic', $rid, $org, $depth );
+    return [ sort { $a->[1] cmp $b->[1] } @$data ];
+}
+
+
+__PACKAGE__->register_method(
        method          => "marc_search",
        api_name        => "open-ils.search.biblio.marc.staff");