From 53358760680a73cc82db414407d89c48ae69b57d Mon Sep 17 00:00:00 2001 From: mbeaulieu Date: Mon, 7 Jul 2014 08:34:50 -0400 Subject: [PATCH] Bug 12448 - Follow-up to Comment 32. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In C4/Circulation.pm, 'GetIssuingCharges' is now called after the syspref is checked. The text for the system preference now reads "When checking out an item with rental fees [ask/don't ask] for confirmation. modified: C4/Circulation.pm modified: koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref --- C4/Circulation.pm | 14 +++++++------- .../en/modules/admin/preferences/circulation.pref | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index c5cae12..b51ab71 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -909,20 +909,20 @@ sub CanBookBeIssued { # # CHECK IF THERE IS RENTAL CHARGES. RENTAL MUST BE CONFIRMED BY THE BORROWER # - my ($rentalCharge) = GetIssuingCharges( $item->{'itemnumber'}, $borrower->{'borrowernumber'} ); my $rentalConfirmation = C4::Context->preference("RentalFeesCheckoutConfirmation"); - if ( $rentalConfirmation && $rentalCharge != 0 ) - { - $rentalCharge = sprintf("%.02f", $rentalCharge); - $needsconfirmation{RENTALCHARGE} = $rentalCharge; + if ( $rentalConfirmation ){ + my ($rentalCharge) = GetIssuingCharges( $item->{'itemnumber'}, $borrower->{'borrowernumber'} ); + if ( $rentalCharge ){ + $rentalCharge = sprintf("%.02f", $rentalCharge); + $needsconfirmation{RENTALCHARGE} = $rentalCharge; + } } # # CHECK IF BOOK ALREADY ISSUED TO THIS BORROWER # - if ( $issue->{borrowernumber} && $issue->{borrowernumber} eq $borrower->{'borrowernumber'} ) - { + if ( $issue->{borrowernumber} && $issue->{borrowernumber} eq $borrower->{'borrowernumber'} ){ # Already issued to current borrower. Ask whether the loan should # be renewed. diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index 558a395..51593df 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -334,7 +334,7 @@ Circulation: choices: yes: ask no: "do not ask" - - a confirmation to check-out. + - "for confirmation." - - On checkin route the returned item to - pref: HomeOrHoldingBranchReturn -- 1.7.9.5