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

(-)a/C4/Letters.pm (-3 / +5 lines)
Lines 307-313 sub SendAlerts { Link Here
307
        # search the biblionumber
307
        # search the biblionumber
308
        my $strsth =  $type eq 'claimacquisition'
308
        my $strsth =  $type eq 'claimacquisition'
309
            ? qq{
309
            ? qq{
310
            SELECT aqorders.*,aqbasket.*,biblio.*,biblioitems.*,aqbooksellers.*
310
            SELECT aqorders.*,aqbasket.*,biblio.*,biblioitems.*,aqbooksellers.*,
311
            aqbooksellers.id AS booksellerid
311
            FROM aqorders
312
            FROM aqorders
312
            LEFT JOIN aqbasket ON aqbasket.basketno=aqorders.basketno
313
            LEFT JOIN aqbasket ON aqbasket.basketno=aqorders.basketno
313
            LEFT JOIN biblio ON aqorders.biblionumber=biblio.biblionumber
314
            LEFT JOIN biblio ON aqorders.biblionumber=biblio.biblionumber
Lines 316-322 sub SendAlerts { Link Here
316
            WHERE aqorders.ordernumber IN (
317
            WHERE aqorders.ordernumber IN (
317
            }
318
            }
318
            : qq{
319
            : qq{
319
            SELECT serial.*,subscription.*, biblio.*, aqbooksellers.*
320
            SELECT serial.*,subscription.*, biblio.*, aqbooksellers.*,
321
            aqbooksellers.id AS booksellerid
320
            FROM serial
322
            FROM serial
321
            LEFT JOIN subscription ON serial.subscriptionid=subscription.subscriptionid
323
            LEFT JOIN subscription ON serial.subscriptionid=subscription.subscriptionid
322
            LEFT JOIN biblio ON serial.biblionumber=biblio.biblionumber
324
            LEFT JOIN biblio ON serial.biblionumber=biblio.biblionumber
Lines 356-362 sub SendAlerts { Link Here
356
358
357
        # ... then send mail
359
        # ... then send mail
358
        my %mail = (
360
        my %mail = (
359
            To => join( ','. @email),
361
            To => join( ',', @email),
360
            From           => $userenv->{emailaddress},
362
            From           => $userenv->{emailaddress},
361
            Subject        => Encode::encode( "utf8", "" . $letter->{title} ),
363
            Subject        => Encode::encode( "utf8", "" . $letter->{title} ),
362
            Message        => Encode::encode( "utf8", "" . $letter->{content} ),
364
            Message        => Encode::encode( "utf8", "" . $letter->{content} ),
(-)a/acqui/lateorders.pl (-3 / +4 lines)
Lines 81-91 if ($op and $op eq "send_alert"){ Link Here
81
    my $err;
81
    my $err;
82
    eval {
82
    eval {
83
        $err = SendAlerts( 'claimacquisition', \@ordernums, $input->param("letter_code") );    # FIXME: Fallback value?
83
        $err = SendAlerts( 'claimacquisition', \@ordernums, $input->param("letter_code") );    # FIXME: Fallback value?
84
        AddClaim ( $_ ) for @ordernums;
84
        if ( not ref $err or not exists $err->{error} ) {
85
            AddClaim ( $_ ) for @ordernums;
86
        }
85
    };
87
    };
86
    if ( $@ ) {
88
    if ( $@ ) {
87
        $template->param(error_claim => $@);
89
        $template->param(error_claim => $@);
88
    } elsif ( defined $err->{error} and $err->{error} eq "no_email" ) {
90
    } elsif ( ref $err and exists $err->{error} and $err->{error} eq "no_email" ) {
89
        $template->{VARS}->{'error_claim'} = "no_email";
91
        $template->{VARS}->{'error_claim'} = "no_email";
90
    } else {
92
    } else {
91
        $template->{VARS}->{'info_claim'} = 1;
93
        $template->{VARS}->{'info_claim'} = 1;
92
- 

Return to bug 7756