From 53774e0f520defeb47d41d2fe3078ab26962f5a6 Mon Sep 17 00:00:00 2001 From: vishdha Date: Mon, 6 Jun 2022 13:07:39 +0530 Subject: [PATCH] chore: minor change in fetching start and end date --- .../consolidated_financial_statement.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.js b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.js index a5c5a67613..dd965a9813 100644 --- a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.js +++ b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.js @@ -53,9 +53,9 @@ frappe.require("assets/erpnext/js/financial_statements.js", function() { "reqd": 1, on_change: () => { frappe.model.with_doc("Fiscal Year", frappe.query_report.get_filter_value('from_fiscal_year'), function(r) { - let start_fy = frappe.model.get_doc("Fiscal Year", frappe.query_report.get_filter_value('from_fiscal_year')); + let year_start_date = frappe.model.get_value("Fiscal Year", frappe.query_report.get_filter_value('from_fiscal_year'), "year_start_date"); frappe.query_report.set_filter_value({ - period_start_date: start_fy.year_start_date + period_start_date: year_start_date }); }); } @@ -69,9 +69,9 @@ frappe.require("assets/erpnext/js/financial_statements.js", function() { "reqd": 1, on_change: () => { frappe.model.with_doc("Fiscal Year", frappe.query_report.get_filter_value('to_fiscal_year'), function(r) { - let to_fy = frappe.model.get_doc("Fiscal Year", frappe.query_report.get_filter_value('to_fiscal_year')); + let year_end_date = frappe.model.get_value("Fiscal Year", frappe.query_report.get_filter_value('to_fiscal_year'), "year_end_date"); frappe.query_report.set_filter_value({ - period_end_date: to_fy.year_end_date + period_end_date: year_end_date }); }); }