From e022392e49b0c3c91eb3c05f1b48b9882aca8b0b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 23 Apr 2014 17:35:33 +0200 Subject: [PATCH] Bug 10832: Add the MTT in the warn message If no template is defined for a letter and the needed MTT, we should display the MTT. --- C4/Letters.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index 7b55762..0d5e352 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}; -- 1.7.10.4