fix: rename misleading filter labels in AR/AP reports

(cherry picked from commit e99425b7c4)
This commit is contained in:
Shllokkk
2026-07-24 15:32:51 +05:30
committed by Mergify
parent 1721c408eb
commit 60b4e6053d
5 changed files with 17 additions and 18 deletions

View File

@@ -13,7 +13,7 @@ frappe.query_reports["Accounts Payable"] = {
}, },
{ {
fieldname: "report_date", fieldname: "report_date",
label: __("Posting Date"), label: __("Report Date"),
fieldtype: "Date", fieldtype: "Date",
default: frappe.datetime.get_today(), default: frappe.datetime.get_today(),
}, },
@@ -69,10 +69,10 @@ frappe.query_reports["Accounts Payable"] = {
default: "Due Date", default: "Due Date",
}, },
{ {
fieldname: "calculate_ageing_with", fieldname: "age_as_on",
label: __("Calculate Ageing With"), label: __("Age as on"),
fieldtype: "Select", fieldtype: "Select",
options: "Report Date\nToday Date", options: "Report Date\nToday",
default: "Report Date", default: "Report Date",
}, },
{ {

View File

@@ -12,7 +12,7 @@ frappe.query_reports["Accounts Payable Summary"] = {
}, },
{ {
fieldname: "report_date", fieldname: "report_date",
label: __("Posting Date"), label: __("Report Date"),
fieldtype: "Date", fieldtype: "Date",
default: frappe.datetime.get_today(), default: frappe.datetime.get_today(),
}, },
@@ -24,10 +24,10 @@ frappe.query_reports["Accounts Payable Summary"] = {
default: "Due Date", default: "Due Date",
}, },
{ {
fieldname: "calculate_ageing_with", fieldname: "age_as_on",
label: __("Calculate Ageing With"), label: __("Age as on"),
fieldtype: "Select", fieldtype: "Select",
options: "Report Date\nToday Date", options: "Report Date\nToday",
default: "Report Date", default: "Report Date",
}, },
{ {

View File

@@ -15,7 +15,7 @@ frappe.query_reports["Accounts Receivable"] = {
}, },
{ {
fieldname: "report_date", fieldname: "report_date",
label: __("Posting Date"), label: __("Report Date"),
fieldtype: "Date", fieldtype: "Date",
default: frappe.datetime.get_today(), default: frappe.datetime.get_today(),
}, },
@@ -98,10 +98,10 @@ frappe.query_reports["Accounts Receivable"] = {
default: "Due Date", default: "Due Date",
}, },
{ {
fieldname: "calculate_ageing_with", fieldname: "age_as_on",
label: __("Calculate Ageing With"), label: __("Age as on"),
fieldtype: "Select", fieldtype: "Select",
options: "Report Date\nToday Date", options: "Report Date\nToday",
default: "Report Date", default: "Report Date",
}, },
{ {

View File

@@ -55,8 +55,7 @@ class ReceivablePayableReport:
self.filters.report_date = getdate(self.filters.report_date or nowdate()) self.filters.report_date = getdate(self.filters.report_date or nowdate())
self.age_as_on = ( self.age_as_on = (
getdate(nowdate()) getdate(nowdate())
if "calculate_ageing_with" not in self.filters if "age_as_on" not in self.filters or self.filters.age_as_on == "Today"
or self.filters.calculate_ageing_with == "Today Date"
else self.filters.report_date else self.filters.report_date
) )

View File

@@ -12,7 +12,7 @@ frappe.query_reports["Accounts Receivable Summary"] = {
}, },
{ {
fieldname: "report_date", fieldname: "report_date",
label: __("Posting Date"), label: __("Report Date"),
fieldtype: "Date", fieldtype: "Date",
default: frappe.datetime.get_today(), default: frappe.datetime.get_today(),
}, },
@@ -24,10 +24,10 @@ frappe.query_reports["Accounts Receivable Summary"] = {
default: "Due Date", default: "Due Date",
}, },
{ {
fieldname: "calculate_ageing_with", fieldname: "age_as_on",
label: __("Calculate Ageing With"), label: __("Age as on"),
fieldtype: "Select", fieldtype: "Select",
options: "Report Date\nToday Date", options: "Report Date\nToday",
default: "Report Date", default: "Report Date",
}, },
{ {