Lines 688-705
sub SendAlerts {
Link Here
|
688 |
sub GetPreparedLetter { |
688 |
sub GetPreparedLetter { |
689 |
my %params = @_; |
689 |
my %params = @_; |
690 |
|
690 |
|
691 |
my $module = $params{module} or croak "No module"; |
691 |
my $letter = $params{letter}; |
692 |
my $letter_code = $params{letter_code} or croak "No letter_code"; |
|
|
693 |
my $branchcode = $params{branchcode} || ''; |
694 |
my $mtt = $params{message_transport_type} || 'email'; |
695 |
my $lang = $params{lang} || 'default'; |
696 |
|
697 |
my $letter = getletter( $module, $letter_code, $branchcode, $mtt, $lang ); |
698 |
|
692 |
|
699 |
unless ( $letter ) { |
693 |
unless ( $letter ) { |
700 |
$letter = getletter( $module, $letter_code, $branchcode, $mtt, 'default' ) |
694 |
my $module = $params{module} or croak "No module"; |
701 |
or warn( "No $module $letter_code letter transported by " . $mtt ), |
695 |
my $letter_code = $params{letter_code} or croak "No letter_code"; |
702 |
return; |
696 |
my $branchcode = $params{branchcode} || ''; |
|
|
697 |
my $mtt = $params{message_transport_type} || 'email'; |
698 |
my $lang = $params{lang} || 'default'; |
699 |
|
700 |
$letter = getletter( $module, $letter_code, $branchcode, $mtt, $lang ); |
701 |
|
702 |
unless ( $letter ) { |
703 |
$letter = getletter( $module, $letter_code, $branchcode, $mtt, 'default' ) |
704 |
or warn( "No $module $letter_code letter transported by " . $mtt ), |
705 |
return; |
706 |
} |
703 |
} |
707 |
} |
704 |
|
708 |
|
705 |
my $tables = $params{tables} || {}; |
709 |
my $tables = $params{tables} || {}; |
706 |
- |
|
|