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

(-)a/C4/Suggestions.pm (-10 / +4 lines)
Lines 503-519 sub ModSuggestion { Link Here
503
        # fetch the entire updated suggestion so that we can populate the letter
503
        # fetch the entire updated suggestion so that we can populate the letter
504
        my $full_suggestion = GetSuggestion( $suggestion->{suggestionid} );
504
        my $full_suggestion = GetSuggestion( $suggestion->{suggestionid} );
505
        my $patron = Koha::Patrons->find( $full_suggestion->{suggestedby} );
505
        my $patron = Koha::Patrons->find( $full_suggestion->{suggestedby} );
506
        my $transport;
506
507
        #If FallbackToSMSIfNoEmail syspref is enabled and the patron has a smsalertnumber but no email address then set message_transport_type of suggestion notice to sms
507
        my $transport = 'email';
508
        if (C4::Context->preference("FallbackToSMSIfNoEmail")) {
508
        if (C4::Context->preference("FallbackToSMSIfNoEmail")) {
509
            if (($patron->smsalertnumber) && (!$patron->email)) {
509
            $transport = ($patron->smsalertnumber) && (!$patron->email) ? 'sms' : 'email';
510
                $transport="sms";
511
            } else {
512
                $transport="email";
513
            }
514
        } else {
515
            $transport = "email";
516
        }
510
        }
511
517
        if (
512
        if (
518
            my $letter = C4::Letters::GetPreparedLetter(
513
            my $letter = C4::Letters::GetPreparedLetter(
519
                module      => 'suggestions',
514
                module      => 'suggestions',
520
- 

Return to bug 21241