View | Details | Raw Unified | Return to bug 17981
Collapse All | Expand All

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

Return to bug 17981