Fix for bug 1164, child branch not defaulting to guarantor's on add child

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Chris Cormack 2007-12-26 21:23:16 -06:00 committed by Joshua Ferraro
parent 4426fb52fc
commit c8e13ff834
2 changed files with 9 additions and 9 deletions

View File

@ -458,7 +458,7 @@ patron <!-- TMPL_VAR NAME="surname" --> <!-- TMPL_VAR name="firstname" --><!-- /
<!-- TMPL_IF NAME="mandatoryaltcontactfirstname" -->
<label for="altcontactfirstname" class="required">
<!-- TMPL_ELSE -->
<label for "altcontactfirstname">
<label for="altcontactfirstname">
<!-- /TMPL_IF -->
Firstname:</label>
<input type="text" name="altcontactfirstname" value="<!-- TMPL_VAR NAME="altcontactfirstname" -->">
@ -468,7 +468,7 @@ patron <!-- TMPL_VAR NAME="surname" --> <!-- TMPL_VAR name="firstname" --><!-- /
<!-- TMPL_IF NAME="mandatoryaltcontactsurname" -->
<label for="altcontactsurname" class="required">
<!-- TMPL_ELSE -->
<label for "altcontactsurname">
<label for="altcontactsurname">
<!-- /TMPL_IF -->
Surname:</label>
<input type="text" name="altcontactsurname" value="<!-- TMPL_VAR NAME="altcontactsurname" -->">
@ -478,7 +478,7 @@ patron <!-- TMPL_VAR NAME="surname" --> <!-- TMPL_VAR name="firstname" --><!-- /
<!-- TMPL_IF NAME="mandatoryaltcontactaddress1" -->
<label for="altcontactaddress1" class="required">
<!-- TMPL_ELSE -->
<label for "altcontactaddress1">
<label for="altcontactaddress1">
<!-- /TMPL_IF -->
Address line 1:</label>
<input type="text" name="altcontactaddress1" value="<!-- TMPL_VAR NAME="altcontactaddress1" -->" size="40">
@ -488,7 +488,7 @@ patron <!-- TMPL_VAR NAME="surname" --> <!-- TMPL_VAR name="firstname" --><!-- /
<!-- TMPL_IF NAME="mandatoryaltcontactaddress2" -->
<label for="altcontactaddress2" class="required">
<!-- TMPL_ELSE -->
<label for "altcontactaddress2">
<label for="altcontactaddress2">
<!-- /TMPL_IF -->
Address line 2:</label>
<input type="text" name="altcontactaddress2" value="<!-- TMPL_VAR NAME="altcontactaddress2" -->" size="40">
@ -498,7 +498,7 @@ patron <!-- TMPL_VAR NAME="surname" --> <!-- TMPL_VAR name="firstname" --><!-- /
<!-- TMPL_IF NAME="mandatoryaltcontactaddress3" -->
<label for="altcontactaddress3" class="required">
<!-- TMPL_ELSE -->
<label for "altcontactaddress3">
<label for="altcontactaddress3">
<!-- /TMPL_IF -->
City, State:</label>
<input type="text" name="altcontactaddress3" value="<!-- TMPL_VAR NAME="altcontactaddress3" -->" size="40">
@ -508,7 +508,7 @@ patron <!-- TMPL_VAR NAME="surname" --> <!-- TMPL_VAR name="firstname" --><!-- /
<!-- TMPL_IF NAME="mandatoryaltcontactzipcode" -->
<label for="altcontactzipcode" class="required">
<!-- TMPL_ELSE -->
<label for "altcontactzipcode">
<label for="altcontactzipcode">
<!-- /TMPL_IF -->
ZIP/Post code:</label>
<input type="text" name="altcontactzipcode" value="<!-- TMPL_VAR NAME="altcontactzipcode" -->" size="5">
@ -518,7 +518,7 @@ patron <!-- TMPL_VAR NAME="surname" --> <!-- TMPL_VAR name="firstname" --><!-- /
<!-- TMPL_IF NAME="mandatoryaltcontactphone" -->
<label for="altcontactphone" class="required">
<!-- TMPL_ELSE -->
<label for "altcontactphone">
<label for="altcontactphone">
<!-- /TMPL_IF -->
Phone:</label>
<input type="text" name="altcontactphone" value="<!-- TMPL_VAR NAME="altcontactphone" -->">

View File

@ -155,7 +155,7 @@ if (($category_type eq 'C' || $category_type eq 'P') and $guarantorid ne '' ){
$data{'contactfirstname'}= $guarantordata->{'firstname'};
$data{'contactname'} = $guarantordata->{'surname'};
$data{'contacttitle'} = $guarantordata->{'title'};
foreach (qw(streetnumber address streettype address2 zipcode city phone phonepro mobile fax email emailpro)) {
foreach (qw(streetnumber address streettype address2 zipcode city phone phonepro mobile fax email emailpro branchcode)) {
$data{$_} = $guarantordata->{$_};
}
}
@ -407,7 +407,7 @@ foreach my $branch (sort keys %$branches) {
# --------------------------------------------------------------------------------------------------------
#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');
$default=$data{'branchcode'} if ($op eq 'modify' || ($op eq 'add' && $category_type eq 'C'));
my $CGIbranch = CGI::scrolling_list(-id => 'branchcode',
-name => 'branchcode',
-values => \@select_branch,