added closed dates overlap method
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 19 Jun 2006 16:00:32 +0000 (16:00 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 19 Jun 2006 16:00:32 +0000 (16:00 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@4674 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Actor/ClosedDates.pm

index 3e40074..5bf5c92 100644 (file)
@@ -132,6 +132,27 @@ sub edit_date {
 }
 
 
+__PACKAGE__->register_method(
+       method  => 'closed_dates_overlap',
+       api_name        => 'open-ils.actor.org_unit.closed_date.overlap',
+       signature       => q/
+               Returns an object with 'start' and 'end' fields 
+               start is the first day the org is open going backwards from 
+               'date'.  end is the next day the org is open going
+               forward from 'date'.
+               @param orgid The org unit in question
+               @param date The date to search
+       /
+);
+sub closed_dates_overlap {
+       my( $self, $conn, $auth, $orgid, $date ) = @_;
+       my $e = new_editor(authtoken=>$auth);
+       return $e->event unless $e->checkauth;
+       return $e->request(
+               'open-ils.storage.actor.org_unit.closed_date.overlap', $orgid, $date );
+}
+
+
 
 
 1;