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

(-)a/reports/guided_reports.pl (-1 / +8 lines)
Lines 991-996 if ( $op eq 'run' ) { Link Here
991
                $total = nb_rows($sql) || 0;
991
                $total = nb_rows($sql) || 0;
992
                my $headers = header_cell_loop($sth);
992
                my $headers = header_cell_loop($sth);
993
                $template->param( header_row => $headers );
993
                $template->param( header_row => $headers );
994
                my $needs_biblio_objects = grep { $_ eq 'biblionumber' } map { $_->{cell} } @$headers;
994
                while ( my $row = $sth->fetchrow_arrayref() ) {
995
                while ( my $row = $sth->fetchrow_arrayref() ) {
995
                    my @cells = map { +{ cell => $_ } } @$row;
996
                    my @cells = map { +{ cell => $_ } } @$row;
996
                    push @rows, { cells => \@cells };
997
                    push @rows, { cells => \@cells };
Lines 1017-1022 if ( $op eq 'run' ) { Link Here
1017
                    my $notice_template = Koha::Notice::Templates->find($template_id);
1018
                    my $notice_template = Koha::Notice::Templates->find($template_id);
1018
                    my ( $sth2, $errors2 ) = execute_query( { sql => $sql, report_id => $report_id } );
1019
                    my ( $sth2, $errors2 ) = execute_query( { sql => $sql, report_id => $report_id } );
1019
                    my $data = $sth2->fetchall_arrayref( {} );
1020
                    my $data = $sth2->fetchall_arrayref( {} );
1021
                    if ($needs_biblio_objects) {
1022
                        $data = [
1023
                            map {
1024
                                { %$_, biblio => Koha::Biblios->find( $_->{biblionumber} ) }
1025
                            } @$data
1026
                        ];
1027
                    }
1020
                    my $notice_rendered =
1028
                    my $notice_rendered =
1021
                        process_tt( $notice_template->content, { data => $data, report_id => $report_id } );
1029
                        process_tt( $notice_template->content, { data => $data, report_id => $report_id } );
1022
                    my $title_rendered =
1030
                    my $title_rendered =
1023
- 

Return to bug 39296