From: Galen Charlton Date: Thu, 13 Jan 2022 19:35:00 +0000 (-0500) Subject: LP#1942220: (follow-up) API: remove cancel reason if last LID of LI is received X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=dd8136eeda64c1014036c45b0b3030ea0201a217;p=working%2FEvergreen.git LP#1942220: (follow-up) API: remove cancel reason if last LID of LI is received Otherwise, a sequence where a line item was cancelled but one of its items was received would have the LI end up in a received state but with a cancel reason. Signed-off-by: Galen Charlton --- 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 100be39e84..010036a532 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm @@ -623,6 +623,7 @@ sub check_lineitem_received { my $li = $mgr->editor->retrieve_acq_lineitem($li_id); $li->state('received'); + $li->clear_cancel_reason; # un-cancel on receive return update_lineitem($mgr, $li); }