Lines 1325-1330
Returns the empty string if no email address.
Link Here
|
1325 |
|
1325 |
|
1326 |
sub notice_email_address{ |
1326 |
sub notice_email_address{ |
1327 |
my ( $self ) = @_; |
1327 |
my ( $self ) = @_; |
|
|
1328 |
my $address; |
1329 |
my $guarantor_address; |
1328 |
|
1330 |
|
1329 |
my $which_address = C4::Context->preference("AutoEmailPrimaryAddress"); |
1331 |
my $which_address = C4::Context->preference("AutoEmailPrimaryAddress"); |
1330 |
# if syspref is set to 'first valid' (value == OFF), look up email address |
1332 |
# if syspref is set to 'first valid' (value == OFF), look up email address |
Lines 1334-1340
sub notice_email_address{
Link Here
|
1334 |
$address = $self->$which_address || ''; |
1336 |
$address = $self->$which_address || ''; |
1335 |
} |
1337 |
} |
1336 |
|
1338 |
|
1337 |
return $self->$which_address || ''; |
1339 |
my $use_guarantor = C4::Context->preference('RedirectGuaranteeEmail'); |
|
|
1340 |
if ($use_guarantor) { |
1341 |
my $guarantor = $self->guarantor; |
1342 |
if ($guarantor) { |
1343 |
if ( $which_address eq 'OFF' ) { |
1344 |
$guarantor_address = $guarantor->first_valid_email_address; |
1345 |
} else { |
1346 |
$guarantor_address = $guarantor->$which_address || ''; |
1347 |
} |
1348 |
if ($address){ |
1349 |
$address .= ', '; |
1350 |
} |
1351 |
$address .= $guarantor_address if $guarantor_address; |
1352 |
} |
1353 |
} |
1354 |
return $address; |
1338 |
} |
1355 |
} |
1339 |
|
1356 |
|
1340 |
=head3 first_valid_email_address |
1357 |
=head3 first_valid_email_address |
1341 |
- |
|
|