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