diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index 7e50d9be61..8c3deaff48 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -25,7 +25,7 @@ def execute(filters=None): account_details.setdefault(acc.name, acc) if filters.get('party'): - parties = str(filters.get("party")).strip() + parties = cstr(filters.get("party")).strip() filters.party = [d.strip() for d in parties.split(',') if d] validate_filters(filters, account_details) @@ -60,11 +60,11 @@ def validate_filters(filters, account_details): frappe.throw(_("From Date must be before To Date")) if filters.get('project'): - projects = str(filters.get("project")).strip() + projects = cstr(filters.get("project")).strip() filters.project = [d.strip() for d in projects.split(',') if d] if filters.get('cost_center'): - cost_centers = str(filters.get("cost_center")).strip() + cost_centers = cstr(filters.get("cost_center")).strip() filters.cost_center = [d.strip() for d in cost_centers.split(',') if d] diff --git a/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.py b/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.py index c399f3eee2..5aff6bacae 100644 --- a/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.py +++ b/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.py @@ -65,8 +65,8 @@ def get_quantity_list(item): if item: qty_list = frappe.db.sql("""select distinct qty from `tabSupplier Quotation Item` - where ifnull(item_code,'')=%s and docstatus < 2""", item, as_dict=1) - qty_list.sort(reverse=False) + where ifnull(item_code,'')=%s and docstatus < 2 order by qty""", item, as_dict=1) + for qt in qty_list: col = frappe._dict({ "key": str(qt.qty), diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.js b/erpnext/hr/doctype/salary_structure/salary_structure.js index 033938de36..79d75bfdf6 100755 --- a/erpnext/hr/doctype/salary_structure/salary_structure.js +++ b/erpnext/hr/doctype/salary_structure/salary_structure.js @@ -124,6 +124,7 @@ frappe.ui.form.on('Salary Structure', { "label":__("Employee"), "fieldname":"employee", "fieldtype":"Select", + "reqd": true, options: employees }, { fieldname:"fetch",