From c68918bc1823051575c5e0d0caacb229775ecae8 Mon Sep 17 00:00:00 2001 From: khushi8112 Date: Mon, 1 Jun 2026 13:13:29 +0530 Subject: [PATCH] fix: set a fallback value if no fiscal year set --- .../number_card/total_incoming_bills/total_incoming_bills.json | 2 +- .../total_incoming_payment/total_incoming_payment.json | 2 +- .../number_card/total_outgoing_bills/total_outgoing_bills.json | 2 +- .../total_outgoing_payment/total_outgoing_payment.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/number_card/total_incoming_bills/total_incoming_bills.json b/erpnext/accounts/number_card/total_incoming_bills/total_incoming_bills.json index dd30f372d25..34e42ac7cfe 100644 --- a/erpnext/accounts/number_card/total_incoming_bills/total_incoming_bills.json +++ b/erpnext/accounts/number_card/total_incoming_bills/total_incoming_bills.json @@ -4,7 +4,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Purchase Invoice", - "dynamic_filters_json": "[[\"Purchase Invoice\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"], [\"Purchase Invoice\",\"posting_date\",\"Between\",\"[frappe.boot.current_fiscal_year[1], frappe.boot.current_fiscal_year[2]]\"]]", + "dynamic_filters_json": "[[\"Purchase Invoice\", \"company\", \"=\", \"frappe.defaults.get_user_default(\\\"Company\\\")\"], [\"Purchase Invoice\", \"posting_date\", \"Between\", \"(frappe.boot.current_fiscal_year || [null, `${frappe.datetime.get_today().slice(0,4)}-01-01`, `${frappe.datetime.get_today().slice(0,4)}-12-31`]).slice(1)\"]]", "filters_json": "[[\"Purchase Invoice\",\"docstatus\",\"=\",\"1\"]]", "function": "Sum", "idx": 0, diff --git a/erpnext/accounts/number_card/total_incoming_payment/total_incoming_payment.json b/erpnext/accounts/number_card/total_incoming_payment/total_incoming_payment.json index 0b7beeca24a..d0f125df5bf 100644 --- a/erpnext/accounts/number_card/total_incoming_payment/total_incoming_payment.json +++ b/erpnext/accounts/number_card/total_incoming_payment/total_incoming_payment.json @@ -4,7 +4,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Payment Entry", - "dynamic_filters_json": "[[\"Payment Entry\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"], [\"Payment Entry\",\"posting_date\",\"Between\",\"[frappe.boot.current_fiscal_year[1], frappe.boot.current_fiscal_year[2]]\"]]", + "dynamic_filters_json": "[[\"Payment Entry\", \"company\", \"=\", \"frappe.defaults.get_user_default(\\\"Company\\\")\"], [\"Payment Entry\", \"posting_date\", \"Between\", \"(frappe.boot.current_fiscal_year || [null, `${frappe.datetime.get_today().slice(0,4)}-01-01`, `${frappe.datetime.get_today().slice(0,4)}-12-31`]).slice(1)\"]]", "filters_json": "[[\"Payment Entry\",\"docstatus\",\"=\",\"1\"],[\"Payment Entry\",\"payment_type\",\"=\",\"Receive\"]]", "function": "Sum", "idx": 0, diff --git a/erpnext/accounts/number_card/total_outgoing_bills/total_outgoing_bills.json b/erpnext/accounts/number_card/total_outgoing_bills/total_outgoing_bills.json index 6b189224edb..5eff4005fda 100644 --- a/erpnext/accounts/number_card/total_outgoing_bills/total_outgoing_bills.json +++ b/erpnext/accounts/number_card/total_outgoing_bills/total_outgoing_bills.json @@ -4,7 +4,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Sales Invoice", - "dynamic_filters_json": "[[\"Sales Invoice\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"], [\"Sales Invoice\",\"posting_date\",\"Between\",\"[frappe.boot.current_fiscal_year[1], frappe.boot.current_fiscal_year[2]]\"]]", + "dynamic_filters_json": "[[\"Sales Invoice\", \"company\", \"=\", \"frappe.defaults.get_user_default(\\\"Company\\\")\"], [\"Sales Invoice\", \"posting_date\", \"Between\", \"(frappe.boot.current_fiscal_year || [null, `${frappe.datetime.get_today().slice(0,4)}-01-01`, `${frappe.datetime.get_today().slice(0,4)}-12-31`]).slice(1)\"]]", "filters_json": "[[\"Sales Invoice\",\"docstatus\",\"=\",\"1\"]]", "function": "Sum", "idx": 0, diff --git a/erpnext/accounts/number_card/total_outgoing_payment/total_outgoing_payment.json b/erpnext/accounts/number_card/total_outgoing_payment/total_outgoing_payment.json index 90ff43a328a..a78f73c1dc5 100644 --- a/erpnext/accounts/number_card/total_outgoing_payment/total_outgoing_payment.json +++ b/erpnext/accounts/number_card/total_outgoing_payment/total_outgoing_payment.json @@ -4,7 +4,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Payment Entry", - "dynamic_filters_json": "[[\"Payment Entry\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"], [\"Payment Entry\",\"posting_date\",\"Between\",\"[frappe.boot.current_fiscal_year[1], frappe.boot.current_fiscal_year[2]]\"]]", + "dynamic_filters_json": "[[\"Payment Entry\", \"company\", \"=\", \"frappe.defaults.get_user_default(\\\"Company\\\")\"], [\"Payment Entry\", \"posting_date\", \"Between\", \"(frappe.boot.current_fiscal_year || [null, `${frappe.datetime.get_today().slice(0,4)}-01-01`, `${frappe.datetime.get_today().slice(0,4)}-12-31`]).slice(1)\"]]", "filters_json": "[[\"Payment Entry\",\"docstatus\",\"=\",\"1\"],[\"Payment Entry\",\"payment_type\",\"=\",\"Pay\"]]", "function": "Sum", "idx": 0,