From 7e1ebe8ddefe7a770e1404694c4fa56fc4a9abb9 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 25 Feb 2020 11:14:12 +0000 Subject: [PATCH] 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 Signed-off-by: Martin Renvoize --- C4/Suggestions.pm | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm index 8157e59024..86a8c904d9 100644 --- a/C4/Suggestions.pm +++ b/C4/Suggestions.pm @@ -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') -- 2.39.5