From 74bb92fc0797786c93d2c43a65b2912033a83477 Mon Sep 17 00:00:00 2001 From: simith Date: Wed, 3 Sep 2014 08:57:26 -0400 Subject: [PATCH] Bug 11882 - Add a new button to the checkout confirmation dialog when checking out a reserved item This patch adds a "Don't Check Out and Print Slip" button to the dialog that appears when trying to checkout a reserved item. Test case : * Put a hold on an item for User A. * Try to check out it item with User B. * The "Please confirm checkout" box should appear. The "Don't Check Out and Print Slip" button should appear in this box. * Click on the "Don't Check Out and Print Slip" button. * A print popup will appear --- circ/circulation.pl | 11 +++++++++++ .../prog/en/modules/circ/circulation.tt | 21 +++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/circ/circulation.pl b/circ/circulation.pl index 6e9f449..dc41405 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -554,6 +554,17 @@ my $relatives_issues_count = Koha::Database->new()->schema()->resultset('Issue') ->count( { borrowernumber => \@relatives } ); +(my $returned, my $messages) = AddReturn( $barcode, $branch); +if ( $messages->{'ResFound'}) { + my $reserve = $messages->{'ResFound'}; + # get biblio description + my $biblio = GetBiblioFromItemNumber($reserve->{'itemnumber'}); + $template->param( + reserveborrowernumber => $reserve->{'borrowernumber'}, + itembiblionumber => $biblio->{'biblionumber'} + ); +} + $template->param( lib_messages_loop => $lib_messages_loop, bor_messages_loop => $bor_messages_loop, 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 b938724..65d31d6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -59,6 +59,9 @@ function toggle_onsite_checkout(){ } } +function Dopop(link) { + var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top'); +} $(document).ready(function() { [% IF !( CircAutoPrintQuickSlip == 'clear' ) %] // listen submit to trigger qslip on empty checkout @@ -316,6 +319,24 @@ $(document).ready(function() { [% END %] +[% IF ( RESERVED ) %] +
+ + + + +
+[% END %] + +[% IF ( RESERVE_WAITING ) %] +
+ + + + +
+[% END %] +
[% IF (forceallow) %][% END %] -- 1.9.1