From f54a8acb38aa44221d626afa47eccb567f2acb21 Mon Sep 17 00:00:00 2001 From: Tiffany Little Date: Fri, 18 Jun 2021 14:33:50 -0400 Subject: [PATCH] LP1928003 Protect real copies from auto-deletion by cancelling acq line items Signed-off-by: Tiffany Little Signed-off-by: Mike Rylander --- Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm | 2 +- 1 file changed, 1 insertion(+), 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 104cf71fc5..377a9b45e0 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm @@ -3176,7 +3176,7 @@ sub cancel_lineitem { # gathering any real copies for deletion # if there is a copy ID and the cancel reason keeps debits, # do not delete. - if ($lid->eg_copy_id && ! $U->is_true($cancel_reason->keep_debits)) { + if ($lid->eg_copy_id && ! $U->is_true($cancel_reason->keep_debits) && $lid->eg_copy_id->status == OILS_COPY_STATUS_ON_ORDER) { $lid->eg_copy_id->isdeleted('t'); push @$copies, $lid->eg_copy_id; } -- 2.11.0