Bugzilla – Attachment 61748 Details for
Bug 17560
Hold fee placement at point of checkout
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17560: Add a message when a patron checking in using the self checkout
Bug-17560-Add-a-message-when-a-patron-checking-in-.patch (text/plain), 3.51 KB, created by
Marcel de Rooy
on 2017-03-31 06:55:00 UTC
(
hide
)
Description:
Bug 17560: Add a message when a patron checking in using the self checkout
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-03-31 06:55:00 UTC
Size:
3.51 KB
patch
obsolete
>From 719da658d8a26b88fb88f1076b0d113fc3567690 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Sun, 6 Nov 2016 19:41:47 +0000 >Subject: [PATCH] Bug 17560: Add a message when a patron checking in using the > self checkout >Content-Type: text/plain; charset=utf-8 > >Sponsored-by: Cheshire Libraries > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 3 +++ > opac/sco/sco-main.pl | 23 ++++++++++++++++------ > 2 files changed, 20 insertions(+), 6 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 d97c5f1..ad5bb8f 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 >@@ -167,6 +167,9 @@ > [% IF ( validuser ) %] > <div class="alert alert-info">You are logged in as [% borrowername %].</div> > [% INCLUDE 'opac-note.inc' %] >+ [% IF patron_has_hold_fee %] >+ <div class="alert">You have been charged for collecting this item.</div> >+ [% END %] > [% END %] > > [% IF ( nouser ) %] >diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl >index fadb633..e4c77e0 100755 >--- a/opac/sco/sco-main.pl >+++ b/opac/sco/sco-main.pl >@@ -44,6 +44,7 @@ use C4::Output; > use C4::Members; > use C4::Biblio; > use C4::Items; >+use Koha::DateUtils qw( dt_from_string ); > use Koha::Acquisition::Currencies; > use Koha::Patron::Images; > use Koha::Patron::Messages; >@@ -199,13 +200,23 @@ elsif ( $op eq "checkout" ) { > } > } else { > if ( $confirmed || $issuenoconfirm ) { # we'll want to call getpatroninfo again to get updated issues. >- # warn "issuing book?"; >+ my $hold_existed; >+ if ( C4::Context->preference('HoldFeeMode') eq 'any_time_is_collected' ) { >+ # There is no easy way to know if the patron has been charged for this item. >+ # So we check if a hold existed for this item before the check in >+ my $item = Koha::Items->find({ barcode => $barcode }); >+ $hold_existed = Koha::Holds->search({ -or => { 'biblionumber' => $item->biblionumber, 'itemnumber' => $item->itemnumber}})->count; >+ } > AddIssue( $borrower, $barcode ); >- # ($borrower, $flags) = getpatroninformation(undef,undef, $patronid); >- # $template->param( >- # patronid => $patronid, >- # validuser => 1, >- # ); >+ >+ if ( $hold_existed ) { >+ my $dtf = Koha::Database->new->schema->storage->datetime_parser; >+ $template->param( >+ # If the hold existed before the check in, let's confirm that the charge line exists >+ # Note that this should not be needed but since we do not have proper exception handling here we do it this way >+ patron_has_hold_fee => Koha::Account::Lines->search({ borrowernumber => $borrower->{borrowernumber}, accounttype => 'Res', date => $dtf->format_date( dt_from_string ) })->count, >+ ); >+ } > } else { > $confirm_required = 1; > #warn "issue confirmation"; >-- >2.1.4
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 17560
:
57233
|
57234
|
57235
|
57236
|
57237
|
57241
|
57242
|
57243
|
57244
|
57245
|
60993
|
61301
|
61669
|
61691
|
61744
|
61745
|
61746
|
61747
| 61748 |
61749
|
61750