From 3e8b9a652b86726f7154c1dac6adb2cc24c5b44f Mon Sep 17 00:00:00 2001 From: =?utf8?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=utf8 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 Signed-off-by: Jonathan Druart --- C4/Circulation.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index cf638ab6a4..a3b2f02696 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.39.5