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

(-)a/svc/letters/get (-1 / +3 lines)
Lines 47-53 Used to get letters with a given letter code. Link Here
47
our ( $query, $response ) = C4::Service->init( tools => 'edit_notices' );
47
our ( $query, $response ) = C4::Service->init( tools => 'edit_notices' );
48
48
49
sub get_letters {
49
sub get_letters {
50
    my $letters = GetLetters({ code => $query->param('code'), branchcode => $query->param('branchcode') });
50
    my $code = scalar $query->param('code');
51
    my $branchcode = scalar $query->param('branchcode');
52
    my $letters = GetLetters({ code => $code, branchcode => $branchcode });
51
    $response->param( letters => $letters );
53
    $response->param( letters => $letters );
52
    C4::Service->return_success( $response );
54
    C4::Service->return_success( $response );
53
}
55
}
(-)a/tools/letter.pl (-5 / +7 lines)
Lines 255-268 sub add_form { Link Here
255
            push @{$field_selection}, add_fields('issues');
255
            push @{$field_selection}, add_fields('issues');
256
        }
256
        }
257
257
258
        if ( $module eq 'circulation' and $code =~ /^AR_/  ) {
258
        if ( $module eq 'circulation' and $code and $code =~ /^AR_/  ) {
259
            push @{$field_selection}, add_fields('article_requests');
259
            push @{$field_selection}, add_fields('article_requests');
260
        }
260
        }
261
    }
261
    }
262
262
263
    my $preview_is_available = grep {/^$code$/} qw(
263
    my $preview_is_available = 0;
264
        CHECKIN CHECKOUT HOLD_SLIP
264
265
    );
265
    if ($code) {
266
        $preview_is_available = grep {/^$code$/} qw( CHECKIN CHECKOUT HOLD_SLIP );
267
    }
268
266
    $template->param(
269
    $template->param(
267
        module     => $module,
270
        module     => $module,
268
        SQLfieldnames => $field_selection,
271
        SQLfieldnames => $field_selection,
269
- 

Return to bug 7862