From: Bill Erickson Date: Thu, 6 Oct 2016 14:24:06 +0000 (-0400) Subject: LP#1619703 Transfer ACQ lineitem to alternate bib WIP X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=639c8ce7cc959ce8a6a87fb8d23b749d8a1a9263;p=working%2FEvergreen.git LP#1619703 Transfer ACQ lineitem to alternate bib WIP Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm index b613177d18..622d1e0093 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm @@ -4285,7 +4285,16 @@ sub transfer_order_volume { $e, $bib_id, $cn->label, $cn->owning_lib, $cn->prefix, $cn->suffix ); - if (!$target_cn) { + if ($target_cn) { + # We are transferring all attached copies to the matching + # callnumber on the target bib. This call number is no + # longer needed. Delete it. + $cn->deleted('t'); + $cn->edit_date('now'); + $cn->editor($e->requestor->id); + $e->update_asset_call_number($cn) or return $e->die_event; + + } else { # No matching CN exists. Point our CN at the target bib. $cn->record($bib_id); $cn->edit_date('now');