From 3e0f47b0968f406a8018e920a3bab22fbd172873 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 29 Mar 2017 14:13:57 -0300 Subject: [PATCH] Bug 17560: Add a message when a patron collecting a hold (staff interface) --- circ/circulation.pl | 9 +++++++++ koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 3 +++ 2 files changed, 12 insertions(+) diff --git a/circ/circulation.pl b/circ/circulation.pl index 5db1001..f6e25bf 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -398,8 +398,17 @@ if (@$barcodes) { } unless($confirm_required) { my $switch_onsite_checkout = exists $messages->{ONSITE_CHECKOUT_WILL_BE_SWITCHED}; + my $item = Koha::Items->find({ barcode => $barcode }); + my $had_an_hold_placed_on_it = Koha::Holds->search({ borrowernumber => $borrower->{borrowernumber}, itemnumber => $item->itemnumber })->count; my $issue = AddIssue( $borrower, $barcode, $datedue, $cancelreserve, undef, undef, { onsite_checkout => $onsite_checkout, auto_renew => $session->param('auto_renew'), switch_onsite_checkout => $switch_onsite_checkout, } ); $template_params->{issue} = $issue; + if ( $had_an_hold_placed_on_it and C4::Context->preference('HoldFeeMode') eq 'any_time_is_collected' ) { + my $patron = Koha::Patrons->find( $borrowernumber ); + my $reservefee = $patron->category->reservefee; + if ( $reservefee > 0){ + $template->param( RESERVE_CHARGE => sprintf("%.2f",$reservefee)); + } + } $session->clear('auto_renew'); $inprocess = 1; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 114f2e7..4b0f854 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -692,6 +692,9 @@ No patron matched [% message | html %] [% IF ( issue ) %]

Checked out: [% issue.item.biblioitemnumber.biblionumber.title %] ([% issue.item.barcode %]). Due on [% issue.date_due | $KohaDates %]

+ [% IF RESERVE_CHARGE %] +

A hold fee of [% RESERVE_CHARGE %] has been charged for collecting this item.

+ [% END %]
[% END %] -- 2.9.3