From 2341061852253c847a711631ad3c3fc5e418984a Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Thu, 27 Jul 2023 21:03:32 +0530 Subject: [PATCH] fix: Default year start and end date in reports --- erpnext/accounts/doctype/account/account.js | 4 ++-- erpnext/accounts/doctype/account/account_tree.js | 4 ++-- .../asset_depreciations_and_balances.js | 4 ++-- .../report/bank_clearance_summary/bank_clearance_summary.js | 2 +- .../dimension_wise_accounts_balance_report.js | 4 ++-- erpnext/accounts/report/gross_profit/gross_profit.js | 4 ++-- .../payment_period_based_on_invoice_date.js | 2 +- .../report/profitability_analysis/profitability_analysis.js | 4 ++-- erpnext/accounts/report/trial_balance/trial_balance.js | 4 ++-- .../report/trial_balance_for_party/trial_balance_for_party.js | 4 ++-- .../buying/report/procurement_tracker/procurement_tracker.js | 4 ++-- .../buying/report/purchase_analytics/purchase_analytics.js | 4 ++-- erpnext/crm/report/campaign_efficiency/campaign_efficiency.js | 4 ++-- .../crm/report/lead_owner_efficiency/lead_owner_efficiency.js | 4 ++-- .../manufacturing/report/job_card_summary/job_card_summary.js | 4 ++-- .../report/production_analytics/production_analytics.js | 4 ++-- erpnext/public/js/utils.js | 2 +- .../customer_acquisition_and_loyalty.js | 4 ++-- erpnext/selling/report/sales_analytics/sales_analytics.js | 4 ++-- .../sales_person_commission_summary.js | 2 +- .../sales_person_wise_transaction_summary.js | 2 +- .../batch_item_expiry_status/batch_item_expiry_status.js | 2 +- .../batch_wise_balance_history/batch_wise_balance_history.js | 2 +- .../incorrect_serial_no_valuation.js | 4 ++-- .../itemwise_recommended_reorder_level.js | 2 +- 25 files changed, 42 insertions(+), 42 deletions(-) diff --git a/erpnext/accounts/doctype/account/account.js b/erpnext/accounts/doctype/account/account.js index e7b0ca530c0..f033b54dd0d 100644 --- a/erpnext/accounts/doctype/account/account.js +++ b/erpnext/accounts/doctype/account/account.js @@ -79,8 +79,8 @@ frappe.ui.form.on('Account', { frm.add_custom_button(__('General Ledger'), function () { frappe.route_options = { "account": frm.doc.name, - "from_date": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], - "to_date": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[2], + "from_date": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], + "to_date": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], "company": frm.doc.company }; frappe.set_route("query-report", "General Ledger"); diff --git a/erpnext/accounts/doctype/account/account_tree.js b/erpnext/accounts/doctype/account/account_tree.js index 0d74b125ee2..f240aa6e950 100644 --- a/erpnext/accounts/doctype/account/account_tree.js +++ b/erpnext/accounts/doctype/account/account_tree.js @@ -194,8 +194,8 @@ frappe.treeview_settings["Account"] = { click: function(node, btn) { frappe.route_options = { "account": node.label, - "from_date": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], - "to_date": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[2], + "from_date": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], + "to_date": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], "company": frappe.treeview_settings['Account'].treeview.page.fields_dict.company.get_value() }; frappe.set_route("query-report", "General Ledger"); diff --git a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.js b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.js index 0bcdd534383..5f78b779342 100644 --- a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.js +++ b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.js @@ -15,14 +15,14 @@ frappe.query_reports["Asset Depreciations and Balances"] = { "fieldname":"from_date", "label": __("From Date"), "fieldtype": "Date", - "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], "reqd": 1 }, { "fieldname":"to_date", "label": __("To Date"), "fieldtype": "Date", - "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[2], + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], "reqd": 1 }, { diff --git a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js index 081b9b0a12e..8a7d071a474 100644 --- a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js +++ b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js @@ -7,7 +7,7 @@ frappe.query_reports["Bank Clearance Summary"] = { "fieldname":"from_date", "label": __("From Date"), "fieldtype": "Date", - "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], "width": "80" }, { diff --git a/erpnext/accounts/report/dimension_wise_accounts_balance_report/dimension_wise_accounts_balance_report.js b/erpnext/accounts/report/dimension_wise_accounts_balance_report/dimension_wise_accounts_balance_report.js index 06f84afe28a..79e5a0997f7 100644 --- a/erpnext/accounts/report/dimension_wise_accounts_balance_report/dimension_wise_accounts_balance_report.js +++ b/erpnext/accounts/report/dimension_wise_accounts_balance_report/dimension_wise_accounts_balance_report.js @@ -38,14 +38,14 @@ frappe.require("assets/erpnext/js/financial_statements.js", function() { "fieldname": "from_date", "label": __("From Date"), "fieldtype": "Date", - "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], "reqd": 1 }, { "fieldname": "to_date", "label": __("To Date"), "fieldtype": "Date", - "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[2], + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], "reqd": 1 }, { diff --git a/erpnext/accounts/report/gross_profit/gross_profit.js b/erpnext/accounts/report/gross_profit/gross_profit.js index 0bd84eba9ec..752054834b4 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.js +++ b/erpnext/accounts/report/gross_profit/gross_profit.js @@ -15,14 +15,14 @@ frappe.query_reports["Gross Profit"] = { "fieldname": "from_date", "label": __("From Date"), "fieldtype": "Date", - "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], "reqd": 1 }, { "fieldname": "to_date", "label": __("To Date"), "fieldtype": "Date", - "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[2], + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], "reqd": 1 }, { diff --git a/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.js b/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.js index a762ec80eb9..5ec2c9880c3 100644 --- a/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.js +++ b/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.js @@ -15,7 +15,7 @@ frappe.query_reports["Payment Period Based On Invoice Date"] = { fieldname: "from_date", label: __("From Date"), fieldtype: "Date", - default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], + default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], }, { fieldname:"to_date", diff --git a/erpnext/accounts/report/profitability_analysis/profitability_analysis.js b/erpnext/accounts/report/profitability_analysis/profitability_analysis.js index da3eafccb0c..c9accef7a6e 100644 --- a/erpnext/accounts/report/profitability_analysis/profitability_analysis.js +++ b/erpnext/accounts/report/profitability_analysis/profitability_analysis.js @@ -66,13 +66,13 @@ frappe.require("assets/erpnext/js/financial_statements.js", function() { "fieldname": "from_date", "label": __("From Date"), "fieldtype": "Date", - "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], }, { "fieldname": "to_date", "label": __("To Date"), "fieldtype": "Date", - "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[2], + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], }, { "fieldname": "show_zero_values", diff --git a/erpnext/accounts/report/trial_balance/trial_balance.js b/erpnext/accounts/report/trial_balance/trial_balance.js index 6b78ba282ef..ee6b4fef213 100644 --- a/erpnext/accounts/report/trial_balance/trial_balance.js +++ b/erpnext/accounts/report/trial_balance/trial_balance.js @@ -37,13 +37,13 @@ frappe.require("assets/erpnext/js/financial_statements.js", function() { "fieldname": "from_date", "label": __("From Date"), "fieldtype": "Date", - "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], }, { "fieldname": "to_date", "label": __("To Date"), "fieldtype": "Date", - "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[2], + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], }, { "fieldname": "cost_center", diff --git a/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.js b/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.js index c51c1bdf0cd..33c644adcb9 100644 --- a/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.js +++ b/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.js @@ -36,13 +36,13 @@ frappe.query_reports["Trial Balance for Party"] = { "fieldname": "from_date", "label": __("From Date"), "fieldtype": "Date", - "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], }, { "fieldname": "to_date", "label": __("To Date"), "fieldtype": "Date", - "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[2], + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], }, { "fieldname":"party_type", diff --git a/erpnext/buying/report/procurement_tracker/procurement_tracker.js b/erpnext/buying/report/procurement_tracker/procurement_tracker.js index 3bcc219ca04..7e4822c31eb 100644 --- a/erpnext/buying/report/procurement_tracker/procurement_tracker.js +++ b/erpnext/buying/report/procurement_tracker/procurement_tracker.js @@ -27,13 +27,13 @@ frappe.query_reports["Procurement Tracker"] = { fieldname: "from_date", label: __("From Date"), fieldtype: "Date", - default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], + default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], }, { fieldname:"to_date", label: __("To Date"), fieldtype: "Date", - default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[2], + default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], }, ] } diff --git a/erpnext/buying/report/purchase_analytics/purchase_analytics.js b/erpnext/buying/report/purchase_analytics/purchase_analytics.js index 80ed9875580..250b334d65c 100644 --- a/erpnext/buying/report/purchase_analytics/purchase_analytics.js +++ b/erpnext/buying/report/purchase_analytics/purchase_analytics.js @@ -35,14 +35,14 @@ frappe.query_reports["Purchase Analytics"] = { fieldname: "from_date", label: __("From Date"), fieldtype: "Date", - default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], + default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], reqd: 1 }, { fieldname:"to_date", label: __("To Date"), fieldtype: "Date", - default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[2], + default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], reqd: 1 }, { diff --git a/erpnext/crm/report/campaign_efficiency/campaign_efficiency.js b/erpnext/crm/report/campaign_efficiency/campaign_efficiency.js index 44e80897634..0c4e7f2dabe 100644 --- a/erpnext/crm/report/campaign_efficiency/campaign_efficiency.js +++ b/erpnext/crm/report/campaign_efficiency/campaign_efficiency.js @@ -6,13 +6,13 @@ frappe.query_reports["Campaign Efficiency"] = { "fieldname": "from_date", "label": __("From Date"), "fieldtype": "Date", - "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], }, { "fieldname": "to_date", "label": __("To Date"), "fieldtype": "Date", - "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[2], + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], } ] }; diff --git a/erpnext/crm/report/lead_owner_efficiency/lead_owner_efficiency.js b/erpnext/crm/report/lead_owner_efficiency/lead_owner_efficiency.js index f0eff6b81de..6fc52a1afc9 100644 --- a/erpnext/crm/report/lead_owner_efficiency/lead_owner_efficiency.js +++ b/erpnext/crm/report/lead_owner_efficiency/lead_owner_efficiency.js @@ -6,12 +6,12 @@ "fieldname": "from_date", "label": __("From Date"), "fieldtype": "Date", - "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], }, { "fieldname": "to_date", "label": __("To Date"), "fieldtype": "Date", - "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[2], + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], } ]}; diff --git a/erpnext/manufacturing/report/job_card_summary/job_card_summary.js b/erpnext/manufacturing/report/job_card_summary/job_card_summary.js index 650721fda8a..4b3f86fcbff 100644 --- a/erpnext/manufacturing/report/job_card_summary/job_card_summary.js +++ b/erpnext/manufacturing/report/job_card_summary/job_card_summary.js @@ -37,14 +37,14 @@ frappe.query_reports["Job Card Summary"] = { label: __("From Posting Date"), fieldname:"from_date", fieldtype: "Date", - default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], + default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], reqd: 1 }, { label: __("To Posting Date"), fieldname:"to_date", fieldtype: "Date", - default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[2], + default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], reqd: 1, }, { diff --git a/erpnext/manufacturing/report/production_analytics/production_analytics.js b/erpnext/manufacturing/report/production_analytics/production_analytics.js index 586297bc6d9..77529a5e57e 100644 --- a/erpnext/manufacturing/report/production_analytics/production_analytics.js +++ b/erpnext/manufacturing/report/production_analytics/production_analytics.js @@ -16,14 +16,14 @@ frappe.query_reports["Production Analytics"] = { fieldname: "from_date", label: __("From Date"), fieldtype: "Date", - default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], + default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], reqd: 1 }, { fieldname:"to_date", label: __("To Date"), fieldtype: "Date", - default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[2], + default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], reqd: 1 }, { diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index 10e8431e34d..f456e5e500c 100755 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -400,7 +400,7 @@ $.extend(erpnext.utils, { }); }, - get_fiscal_year: function(date, with_dates) { + get_fiscal_year: function(date, with_dates=false) { if(!date) { date = frappe.datetime.get_today(); } diff --git a/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.js b/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.js index b81d415813c..744b5d982b5 100644 --- a/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.js +++ b/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.js @@ -23,14 +23,14 @@ frappe.query_reports["Customer Acquisition and Loyalty"] = { "fieldname":"from_date", "label": __("From Date"), "fieldtype": "Date", - "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], "reqd": 1 }, { "fieldname":"to_date", "label": __("To Date"), "fieldtype": "Date", - "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[2], + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], "reqd": 1 } ], diff --git a/erpnext/selling/report/sales_analytics/sales_analytics.js b/erpnext/selling/report/sales_analytics/sales_analytics.js index 8bc4030f093..abe4f011364 100644 --- a/erpnext/selling/report/sales_analytics/sales_analytics.js +++ b/erpnext/selling/report/sales_analytics/sales_analytics.js @@ -35,14 +35,14 @@ frappe.query_reports["Sales Analytics"] = { fieldname: "from_date", label: __("From Date"), fieldtype: "Date", - default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], + default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], reqd: 1 }, { fieldname:"to_date", label: __("To Date"), fieldtype: "Date", - default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[2], + default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], reqd: 1 }, { diff --git a/erpnext/selling/report/sales_person_commission_summary/sales_person_commission_summary.js b/erpnext/selling/report/sales_person_commission_summary/sales_person_commission_summary.js index 931d66d9374..9ed0b00187b 100644 --- a/erpnext/selling/report/sales_person_commission_summary/sales_person_commission_summary.js +++ b/erpnext/selling/report/sales_person_commission_summary/sales_person_commission_summary.js @@ -22,7 +22,7 @@ frappe.query_reports["Sales Person Commission Summary"] = { fieldname: "from_date", label: __("From Date"), fieldtype: "Date", - default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], + default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], }, { fieldname:"to_date", diff --git a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js index beb853eb60d..80c7b5f59d7 100644 --- a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js +++ b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js @@ -20,7 +20,7 @@ frappe.query_reports["Sales Person-wise Transaction Summary"] = { fieldname: "from_date", label: __("From Date"), fieldtype: "Date", - default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], + default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], }, { fieldname:"to_date", diff --git a/erpnext/stock/report/batch_item_expiry_status/batch_item_expiry_status.js b/erpnext/stock/report/batch_item_expiry_status/batch_item_expiry_status.js index e21ab0d8877..5ead48d4994 100644 --- a/erpnext/stock/report/batch_item_expiry_status/batch_item_expiry_status.js +++ b/erpnext/stock/report/batch_item_expiry_status/batch_item_expiry_status.js @@ -8,7 +8,7 @@ frappe.query_reports["Batch Item Expiry Status"] = { "label": __("From Date"), "fieldtype": "Date", "width": "80", - "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], "reqd": 1, }, { diff --git a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.js b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.js index f793477d0e8..2a65e38970f 100644 --- a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.js +++ b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.js @@ -16,7 +16,7 @@ frappe.query_reports["Batch-Wise Balance History"] = { "label": __("From Date"), "fieldtype": "Date", "width": "80", - "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], "reqd": 1 }, { diff --git a/erpnext/stock/report/incorrect_serial_no_valuation/incorrect_serial_no_valuation.js b/erpnext/stock/report/incorrect_serial_no_valuation/incorrect_serial_no_valuation.js index 4c327d83234..a061d045f0f 100644 --- a/erpnext/stock/report/incorrect_serial_no_valuation/incorrect_serial_no_valuation.js +++ b/erpnext/stock/report/incorrect_serial_no_valuation/incorrect_serial_no_valuation.js @@ -22,14 +22,14 @@ frappe.query_reports["Incorrect Serial No Valuation"] = { fieldtype: 'Date', fieldname: 'from_date', reqd: 1, - default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], + default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], }, { label: __('To Date'), fieldtype: 'Date', fieldname: 'to_date', reqd: 1, - default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[2], + default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], } ] }; diff --git a/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js b/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js index 889ab5c21e0..3f8d90ddaab 100644 --- a/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js +++ b/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js @@ -7,7 +7,7 @@ frappe.query_reports["Itemwise Recommended Reorder Level"] = { "fieldname":"from_date", "label": __("From Date"), "fieldtype": "Date", - "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], }, { "fieldname":"to_date",