From fb2c55677cb56f21a145cf0afeb4f39042f92bfa Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 17 Aug 2015 13:21:02 +0100 Subject: [PATCH] Bug 14685: Fix set guarantor for a child account Bug 13970 removed some useful code to automatically set the guarantor when creating a child. But finally there is a better way to do the job, we just need to assume that only a child can have a guarantor. Test plan: Create an adult patron and add a child. The guarantor info should be retrieved and set on the child creation page. Signed-off-by: Liz Rea Guarantor details now coming through and ability to add a guarantor restored. Thanks for the quick fix, Jonathan! --- members/memberentry.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/members/memberentry.pl b/members/memberentry.pl index 7904e55..d23ebfd 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -238,7 +238,8 @@ if ( ( $op eq 'insert' ) and !$nodouble ) { } #recover all data from guarantor address phone ,fax... -if ( $guarantorid and ( $category_type eq 'C' || $category_type eq 'P' )) { +if ( $guarantorid ) { + $category_type = 'C'; if (my $guarantordata=GetMember(borrowernumber => $guarantorid)) { $guarantorinfo=$guarantordata->{'surname'}." , ".$guarantordata->{'firstname'}; $newdata{'contactfirstname'}= $guarantordata->{'firstname'}; -- 1.9.1