From 639c8ce7cc959ce8a6a87fb8d23b749d8a1a9263 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 6 Oct 2016 10:24:06 -0400 Subject: [PATCH] LP#1619703 Transfer ACQ lineitem to alternate bib WIP Signed-off-by: Bill Erickson --- Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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'); -- 2.11.0