chore: minor change in fetching start and end date
This commit is contained in:
parent
3513d54c0a
commit
53774e0f52
@ -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
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user