Lines 150-165
$template->param( "checked" => 1 ) if ( defined($nodouble) && $nodouble eq 1 );
Link Here
|
150 |
( $borrower_data = GetMember( 'borrowernumber' => $borrowernumber ) ) if ( $op eq 'modify' or $op eq 'save' or $op eq 'duplicate' ); |
150 |
( $borrower_data = GetMember( 'borrowernumber' => $borrowernumber ) ) if ( $op eq 'modify' or $op eq 'save' or $op eq 'duplicate' ); |
151 |
my $categorycode = $input->param('categorycode') || $borrower_data->{'categorycode'}; |
151 |
my $categorycode = $input->param('categorycode') || $borrower_data->{'categorycode'}; |
152 |
my $category_type = $input->param('category_type') || ''; |
152 |
my $category_type = $input->param('category_type') || ''; |
153 |
if ($category_type){ |
|
|
154 |
$template->{VARS}->{'type_only'} = 1; |
155 |
} |
156 |
my $new_c_type = $category_type; #if we have input param, then we've already chosen the cat_type. |
157 |
unless ($category_type or !($categorycode)){ |
153 |
unless ($category_type or !($categorycode)){ |
158 |
my $borrowercategory = GetBorrowercategory($categorycode); |
154 |
my $borrowercategory = GetBorrowercategory($categorycode); |
159 |
$category_type = $borrowercategory->{'category_type'}; |
155 |
$category_type = $borrowercategory->{'category_type'}; |
160 |
my $category_name = $borrowercategory->{'description'}; |
156 |
my $category_name = $borrowercategory->{'description'}; |
161 |
$template->param("categoryname"=>$category_name); |
157 |
$template->param("categoryname"=>$category_name); |
162 |
} |
158 |
} |
163 |
$category_type="A" unless $category_type; # FIXME we should display a error message instead of a 500 error ! |
159 |
$category_type="A" unless $category_type; # FIXME we should display a error message instead of a 500 error ! |
164 |
|
160 |
|
165 |
# if a add or modify is requested => check validity of data. |
161 |
# if a add or modify is requested => check validity of data. |
166 |
- |
|
|