Bugzilla – Attachment 5390 Details for
Bug 6857
Show a warning if placing a reserve will incur a cost
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 6857: display a charge warning alert for reserves
SIGNED-OFF-Bug-6857-display-a-charge-warning-alert.patch (text/plain), 3.50 KB, created by
Nicole C. Engard
on 2011-09-09 19:01:21 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 6857: display a charge warning alert for reserves
Filename:
MIME Type:
Creator:
Nicole C. Engard
Created:
2011-09-09 19:01:21 UTC
Size:
3.50 KB
patch
obsolete
>From b0229d805980f2abca135737a435e4c2c53c0103 Mon Sep 17 00:00:00 2001 >From: Robin Sheat <robin@catalyst.net.nz> >Date: Thu, 8 Sep 2011 18:29:24 +1200 >Subject: [PATCH] [SIGNED-OFF] Bug 6857: display a charge warning alert for reserves > >If a user is placing a reserve on the OPAC, this'll let them know that >it's going to cost them. > >Author: Chris Cormack <chrisc@catalyst.net.nz> >Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> >--- > C4/Members.pm | 6 ++++-- > .../opac-tmpl/prog/en/modules/opac-reserve.tt | 5 +++++ > opac/opac-reserve.pl | 4 ++++ > 3 files changed, 13 insertions(+), 2 deletions(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index dcc168b..8d4a6c5 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -2,6 +2,7 @@ package C4::Members; > > # Copyright 2000-2003 Katipo Communications > # Copyright 2010 BibLibre >+# Parts Copyright 2010 Catalyst IT > # > # This file is part of Koha. > # >@@ -352,11 +353,11 @@ sub GetMemberDetails { > my $query; > my $sth; > if ($borrowernumber) { >- $sth = $dbh->prepare("select borrowers.*,category_type,categories.description from borrowers left join categories on borrowers.categorycode=categories.categorycode where borrowernumber=?"); >+ $sth = $dbh->prepare("SELECT borrowers.*,category_type,categories.description,reservefee FROM borrowers LEFT JOIN categories ON borrowers.categorycode=categories.categorycode WHERE borrowernumber=?"); > $sth->execute($borrowernumber); > } > elsif ($cardnumber) { >- $sth = $dbh->prepare("select borrowers.*,category_type,categories.description from borrowers left join categories on borrowers.categorycode=categories.categorycode where cardnumber=?"); >+ $sth = $dbh->prepare("SELECT borrowers.*,category_type,categories.description,reservefee FROM borrowers LEFT JOIN categories ON borrowers.categorycode=categories.categorycode WHERE cardnumber=?"); > $sth->execute($cardnumber); > } > else { >@@ -386,6 +387,7 @@ sub GetMemberDetails { > $sth->execute( $borrower->{'categorycode'} ); > my $enrolment = $sth->fetchrow; > $borrower->{'enrolmentperiod'} = $enrolment; >+ > return ($borrower); #, $flags, $accessflagshash); > } > >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt >index 4d81a17..12c5190 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt >@@ -220,6 +220,11 @@ > [% USER_INF.firstname %] [% USER_INF.surname %] ([% USER_INF.cardnumber %]) > [% END %] > </h3>[% END %] >+ [% IF (RESERVE_CHARGE) %] >+ <div class="dialog alert"> >+ There is a charge of [% RESERVE_CHARGE %] for placing this reserve >+ </div> >+ [% END %] > > <form action="/cgi-bin/koha/opac-reserve.pl" method="post"> > <input type="hidden" name="place_reserve" value="1"/> >diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl >index a92a976..ab02afe 100755 >--- a/opac/opac-reserve.pl >+++ b/opac/opac-reserve.pl >@@ -54,6 +54,10 @@ sub get_out ($$$) { > # get borrower information .... > my ( $borr ) = GetMemberDetails( $borrowernumber ); > >+# Pass through any reserve charge >+if ($borr->{reservefee} > 0){ >+ $template->param( RESERVE_CHARGE => sprintf("%.2f",$borr->{reservefee})); >+} > # get branches and itemtypes > my $branches = GetBranches(); > my $itemTypes = GetItemTypes(); >-- >1.7.2.3
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 6857
:
5352
| 5390 |
5391
|
5392