From: erickson Date: Sun, 26 Sep 2010 23:20:12 +0000 (+0000) Subject: honor SIP return date as the circ backdate X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=13f31a3598f36fd067490973fb9221e0c3566758;p=evergreen%2Fpines.git honor SIP return date as the circ backdate git-svn-id: svn://svn.open-ils.org/ILS/trunk@18017 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/SIP/Transaction/Checkin.pm b/Open-ILS/src/perlmods/OpenILS/SIP/Transaction/Checkin.pm index 66b09c62f8..fc7f450325 100644 --- a/Open-ILS/src/perlmods/OpenILS/SIP/Transaction/Checkin.pm +++ b/Open-ILS/src/perlmods/OpenILS/SIP/Transaction/Checkin.pm @@ -71,6 +71,13 @@ sub do_checkin { my $args = {barcode => $self->{item}->id}; + if($return_date) { + # SIP date format is YYYYMMDD. Translate to ISO8601 + $return_date =~ s/(\d{4})(\d{2})(\d{2}).*/$1-$2-$3/; + syslog('LOG_INFO', "Checking in with backdate $return_date"); + $args->{backdate} = $return_date; + } + if($current_loc) { # SIP client specified a physical location my $org_id = (defined $org_sn_cache{$current_loc}) ?