reservation is impossible if the borrower has a card lost, is gonenoaddress or is...
authortipaul <tipaul>
Wed, 15 Sep 2004 16:42:42 +0000 (16:42 +0000)
committertipaul <tipaul>
Wed, 15 Sep 2004 16:42:42 +0000 (16:42 +0000)
koha-tmpl/opac-tmpl/css/en/opac-reserve.tmpl
opac/opac-reserve.pl

index c477f57..f824b4b 100644 (file)
@@ -9,6 +9,9 @@
                <!-- TMPL_IF NAME="already_reserved" --><li>you already have a reserve placed on this item.</li><!-- /TMPL_IF -->
                <!-- TMPL_IF NAME="no_items_selected" --><li>you must select at least on item type!</li><!-- /TMPL_IF -->
                <!-- TMPL_IF NAME="no_branch_selected" --><li>you must select a branch for pickup!</li><!-- /TMPL_IF -->
+               <!-- TMPL_IF name="GNA" --><li>You are gone without address. Reservation is forbidden. Please contact the library</li><!-- /TMPL_IF -->
+               <!-- TMPL_IF name="lost" --><li>This card has been declared lost. Reserve impossible. Please contact the library</li><!-- /TMPL_IF -->
+               <!-- TMPL_IF name="debarred" --><li>Your account is temporarily suspended. Please contact the library</li><!-- /TMPL_IF -->
        </ul>
 <!-- /TMPL_IF -->
 
index 93adabf..47c5b9c 100755 (executable)
@@ -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) {