Ver código fonte

fix: pdf report js issues (#8554)

* fix: pdf report js issues

* fix: template being set to null
version-14
Sun Howwrongbum 5 anos atrás
committed by mergify[bot]
pai
commit
b47b9ef5a8
1 arquivos alterados com 5 adições e 2 exclusões
  1. +5
    -2
      frappe/public/js/frappe/views/reports/query_report.js

+ 5
- 2
frappe/public/js/frappe/views/reports/query_report.js Ver arquivo

@@ -859,17 +859,20 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
const landscape = print_settings.orientation == 'Landscape'; const landscape = print_settings.orientation == 'Landscape';


const custom_format = this.report_settings.html_format || null; const custom_format = this.report_settings.html_format || null;
const columns = this.get_columns_for_print(print_settings, custom_format);
const data = this.get_data_for_print(); const data = this.get_data_for_print();
const applied_filters = this.get_filter_values(); const applied_filters = this.get_filter_values();


const filters_html = this.get_filters_html_for_print(); const filters_html = this.get_filters_html_for_print();
const content = frappe.render_template(print_settings.columns ? 'print_grid' : custom_format, {
const template =
print_settings.columns || !custom_format ? 'print_grid' : custom_format;
const content = frappe.render_template(template, {
title: __(this.report_name), title: __(this.report_name),
subtitle: filters_html, subtitle: filters_html,
filters: applied_filters, filters: applied_filters,
data: data, data: data,
original_data: this.data, original_data: this.data,
columns: this.get_columns_for_print(print_settings, custom_format),
columns: columns,
report: this report: this
}); });




Carregando…
Cancelar
Salvar