2 # NOTE: This file uses standard 8-space tabs
3 # DO NOT SET TAB SIZE TO 4
6 #script to set up screen for modification of borrower details
7 #written 20/12/99 by chris@katipo.co.nz
10 # Copyright 2000-2002 Katipo Communications
12 # This file is part of Koha.
14 # Koha is free software; you can redistribute it and/or modify it under the
15 # terms of the GNU General Public License as published by the Free Software
16 # Foundation; either version 2 of the License, or (at your option) any later
19 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
20 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
21 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
23 # You should have received a copy of the GNU General Public License along with
24 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
25 # Suite 330, Boston, MA 02111-1307 USA
38 my $dbh = C4::Context->dbh;
41 my ($template, $loggedinuser, $cookie)
42 = get_template_and_user({template_name => "members/borrowers_details.tmpl",
46 flagsrequired => {borrowers => 1},
51 my $categorycode=$input->param('categorycode');
52 my $borrowernumber=$input->param('borrowernumber');
53 my $description=$input->param('description');
54 my $category_type=$input->param('category_type');
56 if ( $data{'surname'} eq '')
58 $data=GetMember($borrowernumber,'borrowernumber');
61 my $borrowercategory = GetBorrowercategory($data{'categorycode'});
63 $template->param( borrowernumber => $borrowernumber,#register number
64 #transform value in capital or capital for first letter of the word
65 firstname => ucfirst($data{'firstname'}),
66 surname => uc($data{'surname'}),
67 categorycode => $data{'categorycode'},
68 title => $data{'title'},
69 category_type => $borrowercategory ->{'category_type'},
70 "title_".$data{'title'} => " SELECTED ",
71 dateofbirth => format_date($data{'dateofbirth'}),
72 description => $borrowercategory->{'description'}
74 $template->param(Institution => 1) if ($category_type eq "I");
75 output_html_with_http_headers $input, $cookie, $template->output;