Bugzilla – Attachment 165754 Details for
Bug 32256
Self checkout batch mode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32256: Display barcodes not checked out in batch
Bug-32256-Display-barcodes-not-checked-out-in-batc.patch (text/plain), 3.31 KB, created by
Andrew Fuerste-Henry
on 2024-04-29 16:53:27 UTC
(
hide
)
Description:
Bug 32256: Display barcodes not checked out in batch
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2024-04-29 16:53:27 UTC
Size:
3.31 KB
patch
obsolete
>From 8c0b658b566f27b2cabe8a319ce912b07b86955f Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Mon, 15 Apr 2024 00:52:58 +0000 >Subject: [PATCH] Bug 32256: Display barcodes not checked out in batch > >This patch encourages the user to check out certain items individually if they fail to be checked out in a batch. > >This way they will be presented with more useful error messages. > >To test: > >1 - Enable BatchCheckouts, select nothing in BatchCheckoutsValidCategories >2 - Find three barcodes >3 - log into SCO with a user in category Patron, paste the barcodes separated by newlines and submit. confirm one item is succcessfully checked out and the other two barcodes are listed in the pop-up, encouraged to try checking out individually. >4 - select Patron in BatchCheckoutsValidCategories >5 - log into SCO with your Patron user again, confirm you can check out multiple items at a time > >Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> >--- > .../bootstrap/en/modules/sco/sco-main.tt | 11 +++++++++++ > opac/sco/sco-main.pl | 16 ++++++++++++++-- > 2 files changed, 25 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >index 2ef8b7134d..13e510ce7b 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >@@ -241,6 +241,17 @@ > </div> > [% END %] > >+ [% IF ( circ_error_BATCH_CHECKOUT ) %] >+ <div class="alert alert-warning"> >+ <h3>Item cannot be checked out in a batch</h3> >+ <p>Check out the following item(s) individually:</p> >+ <ul> >+ [% FOREACH barcode IN circ_error_BATCH_CHECKOUT %] >+ <li><i>[% barcode | html %]</i></li> >+ [% END %] >+ </ul> >+ </div> >+ [% END %] > > [% UNLESS ( hide_main ) %] > >diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl >index 7f4593b71b..c049f2bb01 100755 >--- a/opac/sco/sco-main.pl >+++ b/opac/sco/sco-main.pl >@@ -145,15 +145,27 @@ if ( C4::Context->preference('BatchCheckouts') and $patron ) { > # do nothing - logged in patron is allowed to do batch checkouts > } else { > # patron category not allowed to do batch checkouts, only allow first barcode >+ my @error_barcodes; > while ( scalar @$barcodes > 1 ) { >- pop @$barcodes; >+ my $error_barcode = pop @$barcodes; >+ push @error_barcodes, $error_barcode; > } >+ >+ $template->param( >+ "circ_error_BATCH_CHECKOUT" => \@error_barcodes, >+ ) if @$barcodes; > } > } else { > # batch checkouts not enabled, only allow first barcode >+ my @error_barcodes; > while ( scalar @$barcodes > 1 ) { >- pop @$barcodes; >+ my $error_barcode = pop @$barcodes; >+ push @error_barcodes, $error_barcode; > } >+ >+ $template->param( >+ "circ_error_BATCH_CHECKOUT" => \@error_barcodes, >+ ) if @$barcodes; > } > > if ( $patron && $op eq "cud-returnbook" && $allowselfcheckreturns ) { >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 32256
:
154866
|
154893
|
158585
|
158586
|
163878
|
163879
|
164571
|
164572
|
164573
|
164637
|
164638
|
164639
|
164640
|
164869
|
165719
|
165751
|
165752
|
165753
|
165754
|
165755
|
165978
|
165979
|
165980
|
165981
|
165982
|
165983
|
166179
|
166225
|
166226
|
166227
|
166228
|
166229
|
166230
|
166231
|
166320
|
166321
|
166322
|
166323
|
166324
|
166325
|
166326