Bugzilla – Attachment 154866 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: WIP
Bug-32256-WIP.patch (text/plain), 7.10 KB, created by
Aleisha Amohia
on 2023-08-28 04:58:53 UTC
(
hide
)
Description:
Bug 32256: WIP
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2023-08-28 04:58:53 UTC
Size:
7.10 KB
patch
obsolete
>From a418e53208885127f78313023f4b8df70a76d380 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Mon, 28 Aug 2023 04:58:26 +0000 >Subject: [PATCH] Bug 32256: WIP > >Not ready for testing >--- > .../bootstrap/en/modules/sco/sco-main.tt | 16 +++++++----- > opac/sco/sco-main.pl | 26 ++++++++++++++----- > 2 files changed, 30 insertions(+), 12 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 003c792402f..68a7c4eb9d7 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 >@@ -118,7 +118,7 @@ > <div class="alert alert-warning"><h2>Please confirm the checkout:</h2> > <span class="sco-alert-warning confirm"></span> > [% IF ( confirm_renew_issue ) %] >- <p>This item is already checked out to you.</p> >+ <p>This item is already checked out to you: <b>[% confirm | html %]</b> <i>([% barcode | html %])</i></p> > [% END %] > > [% IF ( renew && Koha.Preference('SCOAllowCheckin') ) %] >@@ -193,15 +193,19 @@ > [% END %] > > [% IF ( issued ) %] >+ [% FOREACH barcode IN newissues.split(',') %] > <span class="sco-alert-success issue"></span> > <div class="alert alert-info"> >- <p>Item checked out</p> >+ <p>Item checked out <i>([% barcode | html %])</i></p> > </div> >+ [% END %] > [% ELSIF ( renewed ) %] >+ [% FOREACH barcode IN newissues.split(',') %] > <span class="sco-alert-success renew"></span> > <div class="alert alert-info"> >- <p>Item renewed</p> >+ <p>Item renewed <i>([% barcode | html %])</i></p> > </div> >+ [% END %] > [% ELSIF ( renewed == 0) %] > <span class="sco-alert-warning renew"></span> > <div class="alert alert-info"> >@@ -215,7 +219,7 @@ > [% ELSIF ( returned == 1 ) %] > <span class="sco-alert-success return"></span> > <div class="alert alert-info"> >- <p>Item checked in</p> >+ <p>Item checked in <i>([% barcode | html %])</i></p> > </div> > [% END %] > >@@ -251,10 +255,10 @@ > </h2></legend> > <div class="row"> > <div class="col"> >- <label for="barcode">Scan a new item or enter its barcode:</label> >+ <label for="barcode">Scan a new item or enter its barcode <br>(or enter a barcode list, one barcode per line):</label> > </div> > <div class="col-3"> >- <input id="barcode" name="barcode" size="20" type="text" class="focus form-control" autocomplete="off" /> >+ <textarea id="barcode" name="barcode" rows="10" cols="30" class="focus form-control"></textarea> > </div> > <div class="col-auto"> > <button type="submit" class="btn btn-primary">Submit</button> >diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl >index 9f70a415cc4..688101572f3 100755 >--- a/opac/sco/sco-main.pl >+++ b/opac/sco/sco-main.pl >@@ -93,7 +93,7 @@ if (defined C4::Context->preference('SCOAllowCheckin')) { > } > > my $issuerid = $loggedinuser; >-my ($op, $patronlogin, $patronpw, $barcode, $confirmed, $newissues) = ( >+my ($op, $patronlogin, $patronpw, $barcodestr, $confirmed, $newissues) = ( > $query->param("op") || '', > $query->param("patronlogin")|| '', > $query->param("patronpw") || '', >@@ -109,7 +109,11 @@ if ($op eq "logout") { > undef $jwt; > } > >-$barcode = barcodedecode( $barcode ) if $barcode; >+my $barcodes = []; >+if ( $barcodestr ) { >+ push @$barcodes, split( /\s\n/, $barcodestr ); >+ $barcodes = [ map { $_ =~ /^\s*$/ ? () : barcodedecode( $_ ) } @$barcodes ]; >+} > > my @newissueslist = split /,/, $newissues; > my $issuenoconfirm = 1; #don't need to confirm on issue. >@@ -142,7 +146,7 @@ my $return_only = 0; > if ( $patron && $op eq "returnbook" && $allowselfcheckreturns ) { > my $success = 1; > >- >+ foreach my $barcode ( @$barcodes ) { > my $item = Koha::Items->find( { barcode => $barcode } ); > if ( $success && C4::Context->preference("CircConfirmItemParts") ) { > if ( defined($item) >@@ -162,10 +166,14 @@ if ( $patron && $op eq "returnbook" && $allowselfcheckreturns ) { > ($success) = AddReturn( $barcode, $branch ) > } > >- $template->param( returned => $success ); >+ $template->param( >+ returned => $success, >+ barcode => $barcode >+ ); >+ } # foreach barcode in barcodes > } > elsif ( $patron && ( $op eq 'checkout' ) ) { >- >+ foreach my $barcode ( @$barcodes ) { > my $item = Koha::Items->find( { barcode => $barcode } ); > my $impossible = {}; > my $needconfirm = {}; >@@ -208,14 +216,16 @@ elsif ( $patron && ( $op eq 'checkout' ) ) { > barcode => $barcode, > ); > } >+ last; > } elsif ( $needconfirm->{RENEW_ISSUE} ){ > $template->param( > renew => 1, > barcode => $barcode, >- confirm => 1, >+ confirm => $item->biblio->title, > confirm_renew_issue => 1, > hide_main => 1, > ); >+ last; > } elsif ( $confirm_required && !$confirmed ) { > $template->param( > impossible => 1, >@@ -225,6 +235,7 @@ elsif ( $patron && ( $op eq 'checkout' ) ) { > if ($issue_error eq 'DEBT') { > $template->param(DEBT => $needconfirm->{DEBT}); > } >+ last; > } else { > if ( $confirmed || $issuenoconfirm ) { # we'll want to call getpatroninfo again to get updated issues. > my ( $hold_existed, $item ); >@@ -273,9 +284,11 @@ elsif ( $patron && ( $op eq 'checkout' ) ) { > ); > } > } >+ } # foreach barcode in barcodes > } # $op > > if ( $patron && ( $op eq 'renew' ) ) { >+ foreach my $barcode ( @$barcodes ) { > my $item = Koha::Items->find({ barcode => $barcode }); > > if ( $patron->checkouts->find( { itemnumber => $item->itemnumber } ) ) { >@@ -294,6 +307,7 @@ if ( $patron && ( $op eq 'renew' ) ) { > } else { > $template->param( renewed => 0 ); > } >+ } # foreach barcode in barcodes > } > > if ( $patron) { >-- >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