From 027516bf79bf4618f8e6a19dff0d8165f338a706 Mon Sep 17 00:00:00 2001 From: tipaul Date: Wed, 15 Sep 2004 16:42:42 +0000 Subject: [PATCH] reservation is impossible if the borrower has a card lost, is gonenoaddress or is suspended --- koha-tmpl/opac-tmpl/css/en/opac-reserve.tmpl | 3 +++ opac/opac-reserve.pl | 23 +++++++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/opac-tmpl/css/en/opac-reserve.tmpl b/koha-tmpl/opac-tmpl/css/en/opac-reserve.tmpl index c477f57edd..f824b4b92a 100644 --- a/koha-tmpl/opac-tmpl/css/en/opac-reserve.tmpl +++ b/koha-tmpl/opac-tmpl/css/en/opac-reserve.tmpl @@ -9,6 +9,9 @@
  • you already have a reserve placed on this item.
  • you must select at least on item type!
  • you must select a branch for pickup!
  • +
  • You are gone without address. Reservation is forbidden. Please contact the library
  • +
  • This card has been declared lost. Reserve impossible. Please contact the library
  • +
  • Your account is temporarily suspended. Please contact the library
  • diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index 93adabf698..47c5b9cc03 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -29,15 +29,15 @@ my ($template, $borrowernumber, $cookie) # get borrower information .... my ($borr, $flags) = getpatroninformation(undef, $borrowernumber); -my @bordat; -$bordat[0] = $borr; +# my @bordat; +# $bordat[0] = $borr; # get biblionumber..... my $biblionumber = $query->param('bib'); my $bibdata = bibdata($biblionumber); $template->param($bibdata); - $template->param(BORROWER_INFO => \@bordat, biblionumber => $biblionumber); +# $template->param(BORROWER_INFO => \@bordat, biblionumber => $biblionumber); # get the rank number.... my ($rank,$reserves) = FindReserves($biblionumber,''); @@ -59,7 +59,6 @@ $template->param(branch => $branch); my $branches = getbranches(); $template->param(branchname => $branches->{$branch}->{'branchname'}); - # make branch selection options... #my $branchoptions = ''; my @branches; @@ -200,7 +199,6 @@ if ($query->param('item_types_selected')) { $fee = 1; $proceed = 1; } - warn "branch :$branch:"; if ($proceed && $branch) { $fee = sprintf "%.02f", $fee; $template->param(fee => $fee); @@ -237,6 +235,21 @@ if ($query->param('item_types_selected')) { $noreserves = 1; $template->param(too_much_oweing => $amount); } + if ($borr->{gonenoaddress} eq 1) { + $noreserves = 1; + $template->param(message => 1, + GNA => 1); + } + if ($borr->{lost} eq 1) { + $noreserves = 1; + $template->param(message => 1, + lost => 1); + } + if ($borr->{debarred} eq 1) { + $noreserves = 1; + $template->param(message => 1, + debarred => 1); + } my ($resnum, $reserves) = FindReserves('', $borrowernumber); $template->param(RESERVES => $reserves); if ($resnum >= $MAXIMUM_NUMBER_OF_RESERVES) { -- 2.39.5