Bug 24723: Update EmailPurchaseSuggestions to use inbound_email_address

This patch updates the EmailPurchaseSuggestions functionality to
use the inbound_email_address method to obtain the correct email address
for a branch when it is set to BranchEmail

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Martin Renvoize 2020-02-25 11:14:12 +00:00
parent 04de40cdcf
commit 7e1ebe8dde
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 1 additions and 5 deletions

View File

@ -473,11 +473,7 @@ sub NewSuggestion {
if ( $emailpurchasesuggestions eq "BranchEmailAddress" ) {
my $library =
Koha::Libraries->find( $full_suggestion->{branchcode} );
$toaddress =
$library->branchreplyto
|| $library->branchemail
|| C4::Context->preference('ReplytoDefault')
|| C4::Context->preference('KohaAdminEmailAddress');
$toaddress = $library->inbound_email_address;
}
elsif ( $emailpurchasesuggestions eq "KohaAdminEmailAddress" ) {
$toaddress = C4::Context->preference('ReplytoDefault')