Lines 1028-1033
Returns the empty string if no email address.
Link Here
|
1028 |
sub notice_email_address{ |
1028 |
sub notice_email_address{ |
1029 |
my ( $self ) = @_; |
1029 |
my ( $self ) = @_; |
1030 |
my $address; |
1030 |
my $address; |
|
|
1031 |
my $guarantor_address; |
1031 |
|
1032 |
|
1032 |
my $which_address = C4::Context->preference("AutoEmailPrimaryAddress"); |
1033 |
my $which_address = C4::Context->preference("AutoEmailPrimaryAddress"); |
1033 |
# if syspref is set to 'first valid' (value == OFF), look up email address |
1034 |
# if syspref is set to 'first valid' (value == OFF), look up email address |
Lines 1041-1051
sub notice_email_address{
Link Here
|
1041 |
if ($use_guarantor) { |
1042 |
if ($use_guarantor) { |
1042 |
my $guarantor = $self->guarantor; |
1043 |
my $guarantor = $self->guarantor; |
1043 |
if ($guarantor) { |
1044 |
if ($guarantor) { |
1044 |
my $guarantor_address = $guarantor->notice_email_address; |
1045 |
if ( $which_address eq 'OFF' ) { |
|
|
1046 |
$guarantor_address = $guarantor->first_valid_email_address; |
1047 |
} else { |
1048 |
$guarantor_address = $guarantor->$which_address || ''; |
1049 |
} |
1045 |
if ($address){ |
1050 |
if ($address){ |
1046 |
$address .= ', '; |
1051 |
$address .= ', '; |
1047 |
} |
1052 |
} |
1048 |
$address .= $guarantor_address if $guarantor_address; |
1053 |
$address .= $guarantor_address if $guarantor_address; |
1049 |
} |
1054 |
} |
1050 |
} |
1055 |
} |
1051 |
return $address; |
1056 |
return $address; |
1052 |
- |
|
|