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

(-)a/opac/opac-ics.pl (-4 / +5 lines)
Lines 50-62 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
50
# Create Calendar
50
# Create Calendar
51
my $calendar = Data::ICal->new();
51
my $calendar = Data::ICal->new();
52
52
53
# get issued items ....
53
my $patron = Koha::Patrons->find( $borrowernumber );
54
my $issues = GetPendingIssues($borrowernumber);
54
my $pending_checkouts = $patron->pending_checkouts;
55
55
56
foreach my $issue ( @$issues ) {
56
while ( my $c = $pending_checkouts->next ) {
57
    my $issue = $c->unblessed_all_relateds;
57
    my $vevent = Data::ICal::Entry::Event->new();
58
    my $vevent = Data::ICal::Entry::Event->new();
58
    my $timestamp = DateTime->now(); # Defaults to UTC
59
    my $timestamp = DateTime->now(); # Defaults to UTC
59
    # Send some values to the template to generate summary and description
60
    # Send some values to the template to generate summary and description
61
    $issue->{overdue} = $c->is_overdue;
60
    $template->param(
62
    $template->param(
61
        overdue => $issue->{'overdue'},
63
        overdue => $issue->{'overdue'},
62
        title   => $issue->{'title'},
64
        title   => $issue->{'title'},
63
- 

Return to bug 19935