From b08be41d41b2c974ed338d7ed3fff31ffcd848bf Mon Sep 17 00:00:00 2001 From: Ian Walls Date: Thu, 21 Apr 2011 00:46:34 -0400 Subject: [PATCH] Bug 3202: creating new 'child' categorytype patrons doesn't set branch 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 Signed-off-by: Chris Cormack --- members/memberentry.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/members/memberentry.pl b/members/memberentry.pl index c665b6e957..a8e764cab0 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -549,7 +549,7 @@ if(scalar(@select_branch) > 0){ # -------------------------------------------------------------------------------------------------------- #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, -- 2.11.0