From d424f0f8615ab0972151d7c8a2c9cf27a038f337 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 (cherry picked from commit 2341061852253c847a711631ad3c3fc5e418984a) # Conflicts: # erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.js # erpnext/accounts/report/profitability_analysis/profitability_analysis.js # erpnext/accounts/report/trial_balance/trial_balance.js # erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.js # erpnext/buying/report/procurement_tracker/procurement_tracker.js # erpnext/buying/report/purchase_analytics/purchase_analytics.js # erpnext/manufacturing/report/job_card_summary/job_card_summary.js # erpnext/manufacturing/report/production_analytics/production_analytics.js # erpnext/selling/report/sales_analytics/sales_analytics.js # erpnext/selling/report/sales_person_commission_summary/sales_person_commission_summary.js # erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js # erpnext/stock/report/incorrect_serial_no_valuation/incorrect_serial_no_valuation.js # erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js --- erpnext/accounts/doctype/account/account.js | 4 ++-- erpnext/accounts/doctype/account/account_tree.js | 4 ++-- .../asset_depreciations_and_balances.js | 4 ++-- .../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 | 4 ++++ .../profitability_analysis/profitability_analysis.js | 6 +++++- erpnext/accounts/report/trial_balance/trial_balance.js | 6 +++++- .../trial_balance_for_party/trial_balance_for_party.js | 6 +++++- .../report/procurement_tracker/procurement_tracker.js | 8 ++++++++ .../report/purchase_analytics/purchase_analytics.js | 8 ++++++++ .../crm/report/campaign_efficiency/campaign_efficiency.js | 4 ++-- .../report/lead_owner_efficiency/lead_owner_efficiency.js | 4 ++-- .../report/job_card_summary/job_card_summary.js | 8 ++++++++ .../report/production_analytics/production_analytics.js | 8 ++++++++ erpnext/public/js/utils.js | 2 +- .../customer_acquisition_and_loyalty.js | 4 ++-- erpnext/selling/report/sales_analytics/sales_analytics.js | 8 ++++++++ .../sales_person_commission_summary.js | 4 ++++ .../sales_person_wise_transaction_summary.js | 4 ++++ .../batch_item_expiry_status/batch_item_expiry_status.js | 2 +- .../batch_wise_balance_history.js | 2 +- .../incorrect_serial_no_valuation.js | 8 ++++++++ .../itemwise_recommended_reorder_level.js | 4 ++++ 25 files changed, 99 insertions(+), 23 deletions(-) diff --git a/erpnext/accounts/doctype/account/account.js b/erpnext/accounts/doctype/account/account.js index bc33dbaf4e0..6debcf9bcb1 100644 --- a/erpnext/accounts/doctype/account/account.js +++ b/erpnext/accounts/doctype/account/account.js @@ -123,8 +123,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 051e9795661..5c84ba432bf 100644 --- a/erpnext/accounts/doctype/account/account_tree.js +++ b/erpnext/accounts/doctype/account/account_tree.js @@ -286,8 +286,8 @@ frappe.treeview_settings["Account"] = { frappe.treeview_settings["Account"].treeview.page.fields_dict.company.get_value(), ======= "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() >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) }; 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 25df2616218..8539264aebe 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 @@ -29,14 +29,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 >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) }, 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 82787f96225..39ee8de6e8c 100644 --- a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js +++ b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js @@ -14,7 +14,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" >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) }, 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 11563f9d25b..6be862dd31e 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 @@ -52,14 +52,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 >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) }, diff --git a/erpnext/accounts/report/gross_profit/gross_profit.js b/erpnext/accounts/report/gross_profit/gross_profit.js index 0d1bf6f8b29..88ff9b79e5a 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.js +++ b/erpnext/accounts/report/gross_profit/gross_profit.js @@ -29,14 +29,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 >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) }, 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 2c469009d69..d9fb913d792 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,11 +15,15 @@ frappe.query_reports["Payment Period Based On Invoice Date"] = { fieldname: "from_date", label: __("From Date"), fieldtype: "Date", +<<<<<<< HEAD <<<<<<< HEAD default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], ======= default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) +======= + default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], +>>>>>>> 2341061852 (fix: Default year start and end date in reports) }, { fieldname: "to_date", diff --git a/erpnext/accounts/report/profitability_analysis/profitability_analysis.js b/erpnext/accounts/report/profitability_analysis/profitability_analysis.js index febcb4e3c91..ffb95d8a081 100644 --- a/erpnext/accounts/report/profitability_analysis/profitability_analysis.js +++ b/erpnext/accounts/report/profitability_analysis/profitability_analysis.js @@ -71,14 +71,18 @@ 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", +<<<<<<< HEAD "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[2], >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) +======= + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], +>>>>>>> 2341061852 (fix: Default year start and end date in reports) }, { 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 874afad9087..8dfd1dfa18d 100644 --- a/erpnext/accounts/report/trial_balance/trial_balance.js +++ b/erpnext/accounts/report/trial_balance/trial_balance.js @@ -49,14 +49,18 @@ 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", +<<<<<<< HEAD "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[2], >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) +======= + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], +>>>>>>> 2341061852 (fix: Default year start and end date in reports) }, { 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 00641e385b4..68891b6fbf7 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 @@ -48,14 +48,18 @@ 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", +<<<<<<< HEAD "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[2], >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) +======= + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], +>>>>>>> 2341061852 (fix: Default year start and end date in reports) }, { fieldname: "party_type", diff --git a/erpnext/buying/report/procurement_tracker/procurement_tracker.js b/erpnext/buying/report/procurement_tracker/procurement_tracker.js index 919edd9f71c..162740f16ff 100644 --- a/erpnext/buying/report/procurement_tracker/procurement_tracker.js +++ b/erpnext/buying/report/procurement_tracker/procurement_tracker.js @@ -27,21 +27,29 @@ frappe.query_reports["Procurement Tracker"] = { fieldname: "from_date", label: __("From Date"), fieldtype: "Date", +<<<<<<< HEAD <<<<<<< HEAD default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], ======= default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) +======= + default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], +>>>>>>> 2341061852 (fix: Default year start and end date in reports) }, { fieldname: "to_date", label: __("To Date"), fieldtype: "Date", +<<<<<<< HEAD <<<<<<< HEAD default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], ======= default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[2], >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) +======= + default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], +>>>>>>> 2341061852 (fix: Default year start and end date in reports) }, ], }; diff --git a/erpnext/buying/report/purchase_analytics/purchase_analytics.js b/erpnext/buying/report/purchase_analytics/purchase_analytics.js index 207e12c5339..6f4a5df4b29 100644 --- a/erpnext/buying/report/purchase_analytics/purchase_analytics.js +++ b/erpnext/buying/report/purchase_analytics/purchase_analytics.js @@ -35,11 +35,15 @@ frappe.query_reports["Purchase Analytics"] = { fieldname: "from_date", label: __("From Date"), fieldtype: "Date", +<<<<<<< HEAD <<<<<<< HEAD default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], 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], +>>>>>>> 2341061852 (fix: Default year start and end date in reports) reqd: 1 >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) }, @@ -47,11 +51,15 @@ frappe.query_reports["Purchase Analytics"] = { fieldname: "to_date", label: __("To Date"), fieldtype: "Date", +<<<<<<< HEAD <<<<<<< HEAD default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], 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], +>>>>>>> 2341061852 (fix: Default year start and end date in reports) reqd: 1 >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) }, diff --git a/erpnext/crm/report/campaign_efficiency/campaign_efficiency.js b/erpnext/crm/report/campaign_efficiency/campaign_efficiency.js index ba35bde8e31..cd806848685 100644 --- a/erpnext/crm/report/campaign_efficiency/campaign_efficiency.js +++ b/erpnext/crm/report/campaign_efficiency/campaign_efficiency.js @@ -20,13 +20,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], } ] >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) 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 bc300902436..aae23748e8f 100644 --- a/erpnext/crm/report/lead_owner_efficiency/lead_owner_efficiency.js +++ b/erpnext/crm/report/lead_owner_efficiency/lead_owner_efficiency.js @@ -24,13 +24,13 @@ frappe.query_reports["Lead Owner 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], } ]}; >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) 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 0c7f211babc..0f6235dc537 100644 --- a/erpnext/manufacturing/report/job_card_summary/job_card_summary.js +++ b/erpnext/manufacturing/report/job_card_summary/job_card_summary.js @@ -37,11 +37,15 @@ frappe.query_reports["Job Card Summary"] = { label: __("From Posting Date"), fieldname: "from_date", fieldtype: "Date", +<<<<<<< HEAD <<<<<<< HEAD default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], 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], +>>>>>>> 2341061852 (fix: Default year start and end date in reports) reqd: 1 >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) }, @@ -49,11 +53,15 @@ frappe.query_reports["Job Card Summary"] = { label: __("To Posting Date"), fieldname: "to_date", fieldtype: "Date", +<<<<<<< HEAD <<<<<<< HEAD default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], ======= default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[2], >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) +======= + default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], +>>>>>>> 2341061852 (fix: Default year start and end date in reports) reqd: 1, }, { diff --git a/erpnext/manufacturing/report/production_analytics/production_analytics.js b/erpnext/manufacturing/report/production_analytics/production_analytics.js index 36b2d8ebf22..723d34ecad8 100644 --- a/erpnext/manufacturing/report/production_analytics/production_analytics.js +++ b/erpnext/manufacturing/report/production_analytics/production_analytics.js @@ -16,11 +16,15 @@ frappe.query_reports["Production Analytics"] = { fieldname: "from_date", label: __("From Date"), fieldtype: "Date", +<<<<<<< HEAD <<<<<<< HEAD default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], 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], +>>>>>>> 2341061852 (fix: Default year start and end date in reports) reqd: 1 >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) }, @@ -28,11 +32,15 @@ frappe.query_reports["Production Analytics"] = { fieldname: "to_date", label: __("To Date"), fieldtype: "Date", +<<<<<<< HEAD <<<<<<< HEAD default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], 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], +>>>>>>> 2341061852 (fix: Default year start and end date in reports) reqd: 1 >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) }, diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index 03270197c4d..4ae6bb902af 100755 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -436,7 +436,7 @@ $.extend(erpnext.utils, { }); }, - get_fiscal_year: function(date, with_dates) { + get_fiscal_year: function(date, with_dates=false) { if(!date) { >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) 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 66654beb4f5..06206a7899a 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 @@ -38,14 +38,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 } >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) diff --git a/erpnext/selling/report/sales_analytics/sales_analytics.js b/erpnext/selling/report/sales_analytics/sales_analytics.js index c92ed2cf2cc..68864da42d1 100644 --- a/erpnext/selling/report/sales_analytics/sales_analytics.js +++ b/erpnext/selling/report/sales_analytics/sales_analytics.js @@ -43,11 +43,15 @@ frappe.query_reports["Sales Analytics"] = { fieldname: "from_date", label: __("From Date"), fieldtype: "Date", +<<<<<<< HEAD <<<<<<< HEAD default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], 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], +>>>>>>> 2341061852 (fix: Default year start and end date in reports) reqd: 1 >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) }, @@ -55,11 +59,15 @@ frappe.query_reports["Sales Analytics"] = { fieldname: "to_date", label: __("To Date"), fieldtype: "Date", +<<<<<<< HEAD <<<<<<< HEAD default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], 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], +>>>>>>> 2341061852 (fix: Default year start and end date in reports) reqd: 1 >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) }, 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 442f0d8ea08..dc8f869514c 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 @@ -21,11 +21,15 @@ frappe.query_reports["Sales Person Commission Summary"] = { fieldname: "from_date", label: __("From Date"), fieldtype: "Date", +<<<<<<< HEAD <<<<<<< HEAD default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], ======= default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) +======= + default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], +>>>>>>> 2341061852 (fix: Default year start and end date in reports) }, { 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 df747375fcf..d24ba815c67 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,11 +20,15 @@ frappe.query_reports["Sales Person-wise Transaction Summary"] = { fieldname: "from_date", label: __("From Date"), fieldtype: "Date", +<<<<<<< HEAD <<<<<<< HEAD default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], ======= default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) +======= + default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], +>>>>>>> 2341061852 (fix: Default year start and end date in reports) }, { 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 b7c8ae1456e..a2c5a2ce3cd 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 @@ -16,7 +16,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, >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) }, 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 8e3e8c668fd..88234adae14 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 @@ -24,7 +24,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 >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) }, 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 81b488e71ca..e7ccd45b796 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,23 +22,31 @@ frappe.query_reports["Incorrect Serial No Valuation"] = { fieldtype: "Date", fieldname: "from_date", reqd: 1, +<<<<<<< HEAD <<<<<<< HEAD default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], ======= default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) +======= + default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], +>>>>>>> 2341061852 (fix: Default year start and end date in reports) }, { label: __("To Date"), fieldtype: "Date", fieldname: "to_date", reqd: 1, +<<<<<<< HEAD <<<<<<< HEAD default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2], }, ], ======= 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], +>>>>>>> 2341061852 (fix: Default year start and end date in reports) } ] >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) 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 18c3ffcc819..31669f6ece6 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 @@ -13,8 +13,12 @@ frappe.query_reports["Itemwise Recommended Reorder Level"] = { "fieldname":"from_date", "label": __("From Date"), "fieldtype": "Date", +<<<<<<< HEAD "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), with_dates=true)[1], >>>>>>> 4496a6760e (fix: Default year start and end dates in reports) +======= + "default": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1], +>>>>>>> 2341061852 (fix: Default year start and end date in reports) }, { fieldname: "to_date",