From: Bill Erickson Date: Wed, 30 Nov 2011 20:42:30 +0000 (-0500) Subject: ACQ Vandelay : vl ML bits for updating acq records X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=6f09b799adc4bf25d37e2d983e57c8ad0f3b5228;p=evergreen%2Fequinox.git ACQ Vandelay : vl ML bits for updating acq records Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Vandelay.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Vandelay.pm index b30d6527c9..ef49f00801 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Vandelay.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Vandelay.pm @@ -1090,6 +1090,19 @@ sub import_record_list_impl { if($e->$update_func($rec)) { + if($type eq 'bib') { + + # see if this record is linked from an acq record. + my $li = $e->search_acq_lineitem( + {queued_record => $rec->id, state => {'!=' => 'canceled'}})->[0]; + + if ($li) { + # if so, update the acq lineitem to point to the imported record + $li->eg_bib_id($rec->imported_as); + $$report_args{evt} = $e->die_event unless $e->update_acq_lineitem($li); + } + } + push @success_rec_ids, $rec_id; finish_rec_import_attempt($report_args);