From 4057542c3545aa4c5ae743f8263e930dac820d05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= Date: Tue, 3 Nov 2015 21:32:34 +0100 Subject: [PATCH] Bug 15091: Batch Checkout: Tell the user what happens while checking out This patch slightly changes the behaviour of Batch checkout. - If an item is successfully checked out, it is marked as such in column "Information" - If checkouts are confirmed and an item can not be checked out because e.g. the user reaches the fines threshold, an information is displayed in column "Information" To test: - Watch video from comment #2 - Apply both patches - Set sysprefs to allow override while checking out - Prepare a batch with invalid barcodes, with valid barcodes and with enough items that the user will reach the threshold while checking out all items - Verify that a title appears above the tables while performing the batch checkout - The first table "Batch checkout confirmation" should show - Items that could be checked out - Items that are not checked out (e.g. invalid barcode) - Items that need confirmation (e.g. debt) - After confirmation, more items should be checked out (as long the threshold is not reached - Items above the threshold will have a message "The patron has a debt..." Maybe a more sophisticated solution could be possible, but this patch should address the main concerns from comment #2 Signed-off-by: Nicole Engard --- circ/circulation.pl | 1 + .../prog/en/modules/circ/circulation_batch_checkouts.tt | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index bac91d7..d791d48 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -410,6 +410,7 @@ if (@$barcodes) { } unless($confirm_required) { my $issue = AddIssue( $borrower, $barcode, $datedue, $cancelreserve, undef, undef, { onsite_checkout => $onsite_checkout, auto_renew => $session->param('auto_renew') } ); + $template_params->{CHECKOUT_OK} = 1; $template->param( issue => $issue ); $session->clear('auto_renew'); $inprocess = 1; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt index b7b6077..6b8aadd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt @@ -116,7 +116,9 @@ $(document).ready(function() { [% checkout_info.item.title |html %][% FOREACH subtitl IN checkout_info.item.subtitle %] [% subtitl.subfield %][% END %][% IF checkout_info.item.author %], by [% checkout_info.item.author %][% END %][% IF ( checkout_info.itme.itemnotes ) %]- [% checkout_info.item.itemnotes %][% END %] [% checkout_info.item.barcode %] - [% IF checkout_info.NEEDSCONFIRMATION %] + [% IF checkout_info.CHECKOUT_OK %] +

Checkout OK

+ [% ELSE %]

[% IF checkout_info.AGE_RESTRICTION %] Age restriction [% checkout_info.AGE_RESTRICTION %] @@ -179,6 +181,9 @@ $(document).ready(function() { [% END %] [% END %]

+

+ Not checked out. +

[% END %] -- 1.7.10.4