Permalink
Browse files

Bug 3202: creating new 'child' categorytype patrons doesn't set branc…

…h properly

If a guarantor search is not being performed, the creation of any Child category_type patron will
not default to the currently logged in branch, but rather the first branch alphabetically.

Adding a test for the existence of any guarantor branch data before assigning it clears up this problem

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
  • Loading branch information...
1 parent 694f0fb commit b08be41d41b2c974ed338d7ed3fff31ffcd848bf Ian Walls committed with Apr 21, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 members/memberentry.pl
View
2 members/memberentry.pl
@@ -549,7 +549,7 @@ BEGIN
# --------------------------------------------------------------------------------------------------------
#in modify mod :default value from $CGIbranch comes from borrowers table
#in add mod: default value come from branches table (ip correspendence)
-$default=$data{'branchcode'} if ($op eq 'modify' || ($op eq 'add' && $category_type eq 'C'));
+$default=$data{'branchcode'} if ($op eq 'modify' || ($op eq 'add' && $category_type eq 'C' && $data{'branchcode'}));
$CGIbranch = CGI::scrolling_list(-id => 'branchcode',
-name => 'branchcode',
-values => \@select_branch,

0 comments on commit b08be41

Please sign in to comment.