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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc (-1 / +1 lines)
Lines 19-25 Link Here
19
                </div>
19
                </div>
20
            [% END %]
20
            [% END %]
21
            <div class="btn-group">
21
            <div class="btn-group">
22
                <a class="btn btn-small" title="Duplicate this saved report" href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create report from SQL&amp;sql=[% sql |uri %]&amp;reportname=[% reportname |uri %]&amp;notes=[% notes |uri %]">
22
                <a class="btn btn-small" title="Duplicate this saved report" href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create report from SQL&amp;sql=[% original_sql || sql |uri %]&amp;reportname=[% reportname |uri %]&amp;notes=[% notes |uri %]">
23
                    <i class="fa fa-copy"></i> Duplicate
23
                    <i class="fa fa-copy"></i> Duplicate
24
                </a>
24
                </a>
25
            </div>
25
            </div>
(-)a/reports/guided_reports.pl (-3 / +3 lines)
Lines 638-646 elsif ($phase eq 'Run this report'){ Link Here
638
        'report_id' => $report_id,
638
        'report_id' => $report_id,
639
    );
639
    );
640
640
641
    my ( $sql, $type, $name, $notes );
641
    my ( $sql, $original_sql, $type, $name, $notes );
642
    if (my $report = get_saved_report($report_id)) {
642
    if (my $report = get_saved_report($report_id)) {
643
        $sql   = $report->{savedsql};
643
        $sql   = $original_sql = $report->{savedsql};
644
        $name  = $report->{report_name};
644
        $name  = $report->{report_name};
645
        $notes = $report->{notes};
645
        $notes = $report->{notes};
646
646
Lines 790-795 elsif ($phase eq 'Run this report'){ Link Here
790
            $template->param(
790
            $template->param(
791
                'results' => \@rows,
791
                'results' => \@rows,
792
                'sql'     => $sql,
792
                'sql'     => $sql,
793
                original_sql => $original_sql,
793
                'id'      => $report_id,
794
                'id'      => $report_id,
794
                'execute' => 1,
795
                'execute' => 1,
795
                'name'    => $name,
796
                'name'    => $name,
796
- 

Return to bug 16816