@@ -, +, @@ end of generic email template. --- Koha/Illrequest.pm | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) --- a/Koha/Illrequest.pm +++ a/Koha/Illrequest.pm @@ -750,8 +750,22 @@ EOF Please let us know if you are able to supply this to us. Kind Regards + EOF + my $branch = Koha::Libraries->find($params->{current_branchcode}) + || die "Invalid current branchcode. Are you logged in as the database user?"; + my @address = map { $branch->$_ } + qw/ branchname branchaddress1 branchaddress2 branchaddress3 + branchzip branchcity branchstate branchcountry branchphone + branchemail /; + my $address = ""; + foreach my $line ( @address ) { + $address .= $line . "\n" if $line; + } + + $draft->{body} .= $address; + my $partners = Koha::Patrons->search({ categorycode => $self->_config->partner_code }); @@ -774,8 +788,6 @@ EOF $to =~ s/\x00/; /; # Replace others with '; ' die "No target email addresses found. Either select at least one partner or check your ILL partner library records." if ( !$to ); # Create the from, replyto and sender headers - $branch = Koha::Libraries->find($params->{current_branchcode}) - || die "Invalid current branchcode. Are you logged in as the database user?"; my $from = $branch->branchemail; my $replyto = $branch->branchreplyto || $from; die "Your branch has no email address. Please set it." --