Bug 17578: GetMemberDetails - Remove reservefee
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 8 Nov 2016 09:46:15 +0000 (09:46 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 16 Dec 2016 13:12:43 +0000 (13:12 +0000)
Same as other patches, reservefee is only used in opac-reserve.pl

Test plan;
Set reserve fee for a patron category
Place a hold at the OPAC with one of these patrons.
You must get a message about the reserve fee.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/Members.pm
opac/opac-reserve.pl

index b64ccb8..9a8d5fc 100644 (file)
@@ -146,7 +146,6 @@ sub GetMemberDetails {
             SELECT borrowers.*,
                    category_type,
                    categories.description,
-                   reservefee,
                    enrolmentperiod
             FROM borrowers
             LEFT JOIN categories ON borrowers.categorycode=categories.categorycode
@@ -159,7 +158,6 @@ sub GetMemberDetails {
             SELECT borrowers.*,
                    category_type,
                    categories.description,
-                   reservefee,
                    enrolmentperiod
             FROM borrowers
             LEFT JOIN categories ON borrowers.categorycode = categories.categorycode
index a725730..7363236 100755 (executable)
@@ -85,8 +85,9 @@ if ( $patron->category->effective_BlockExpiredPatronOpacActions ) {
 }
 
 # Pass through any reserve charge
-if ($borr->{reservefee} > 0){
-    $template->param( RESERVE_CHARGE => sprintf("%.2f",$borr->{reservefee}));
+my $reservefee = $patron->category->reservefee;
+if ( $reservefee > 0){
+    $template->param( RESERVE_CHARGE => sprintf("%.2f",$reservefee));
 }
 
 my $itemTypes = GetItemTypes();