From d0ebf0b3ffcf55dbfaad712e1f0a75b01654d910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Thu, 30 Apr 2020 12:03:19 +0200 Subject: [PATCH] Bug 25261: Checkout confirmation depending on syspref MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With this follow-up patch, the intended confirmation of checkin based on CircConfirmParts value is effective. Sponsored-by: Royal College of Music [https://www.rcm.ac.uk/] Sponsored-by: PTFS Europe [https://ptfs-europe.com/] Signed-off-by: Frédéric Demians Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- C4/Circulation.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index d9cdd6b635..1090f58ee7 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -898,9 +898,11 @@ sub CanBookBeIssued { } # Additional Materials Check - my $no_of_parts = $item_object->materials; - if ( $no_of_parts > 0 ) { - $needsconfirmation{additional_materials} = $no_of_parts; + if ( C4::Context->preference("CircConfirmParts") ) { + my $no_of_parts = $item_object->materials || 0; + if ( $no_of_parts > 0 ) { + $needsconfirmation{additional_materials} = $no_of_parts; + } } # -- 2.11.0