Lines 177-187
if ( $op eq 'modify' or $op eq 'save' or $op eq 'duplicate' ) {
Link Here
|
177 |
|
177 |
|
178 |
my $categorycode = $input->param('categorycode') || $borrower_data->{'categorycode'}; |
178 |
my $categorycode = $input->param('categorycode') || $borrower_data->{'categorycode'}; |
179 |
my $category_type = $input->param('category_type') || ''; |
179 |
my $category_type = $input->param('category_type') || ''; |
180 |
unless ($category_type or !($categorycode)){ |
180 |
my $category; |
181 |
my $borrowercategory = Koha::Patron::Categories->find($categorycode); |
181 |
if ( !$category_type && $categorycode ) { |
182 |
$category_type = $borrowercategory->category_type; |
182 |
$category = Koha::Patron::Categories->find($categorycode); |
183 |
my $category_name = $borrowercategory->description; |
183 |
$category_type = $category->category_type; |
184 |
$template->param("categoryname"=>$category_name); |
184 |
$template->param( patron_category => $category ); |
185 |
} |
185 |
} |
186 |
$category_type="A" unless $category_type; # FIXME we should display a error message instead of a 500 error ! |
186 |
$category_type="A" unless $category_type; # FIXME we should display a error message instead of a 500 error ! |
187 |
|
187 |
|
188 |
- |
|
|