From ca052b2558629052574c4a66425e9e6268392ca8 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 23 Apr 2014 17:35:33 +0200 Subject: [PATCH] Bug 10832: (follow-up) add the transport type in the warning message If no template is defined for a letter and the needed MTT, we should display the MTT. Signed-off-by: Galen Charlton --- C4/Letters.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index 7b5576208f..0d5e352b12 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -451,9 +451,10 @@ sub GetPreparedLetter { my $module = $params{module} or croak "No module"; my $letter_code = $params{letter_code} or croak "No letter_code"; my $branchcode = $params{branchcode} || ''; + my $mtt = $params{message_transport_type} || 'email'; - my $letter = getletter( $module, $letter_code, $branchcode, $params{message_transport_type} ) - or warn( "No $module $letter_code letter"), + my $letter = getletter( $module, $letter_code, $branchcode, $mtt ) + or warn( "No template $mtt for $module $letter_code letter"), return; my $tables = $params{tables}; -- 2.39.5