mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 04:09:11 +00:00
fix: Usability fixes in accounting dimensions
This commit is contained in:
@@ -33,3 +33,14 @@ frappe.query_reports["Customer Credit Balance"] = {
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
erpnext.dimension_filters.then((dimensions) => {
|
||||
dimensions.forEach((dimension) => {
|
||||
frappe.query_reports["Customer Credit Balance"].filters.push({
|
||||
"fieldname": dimension["fieldname"],
|
||||
"label": __(dimension["label"]),
|
||||
"fieldtype": "Link",
|
||||
"options": dimension["document_type"]
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -6,6 +6,7 @@ import frappe
|
||||
from frappe import _
|
||||
from frappe.utils import flt
|
||||
from erpnext.selling.doctype.customer.customer import get_customer_outstanding, get_credit_limit
|
||||
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import get_accounting_dimensions
|
||||
|
||||
def execute(filters=None):
|
||||
if not filters: filters = {}
|
||||
@@ -13,6 +14,12 @@ def execute(filters=None):
|
||||
customer_naming_type = frappe.db.get_value("Selling Settings", None, "cust_master_name")
|
||||
columns = get_columns(customer_naming_type)
|
||||
|
||||
accounting_dimensions = get_accounting_dimensions()
|
||||
|
||||
if accounting_dimensions:
|
||||
for dimension in accounting_dimensions:
|
||||
additional_conditions += """ and {0} in (%({0})s) """.format(dimension)
|
||||
|
||||
data = []
|
||||
|
||||
customer_list = get_details(filters)
|
||||
|
||||
Reference in New Issue
Block a user