diff --git a/smart_service/transactions/doctype/variant_mapping/__pycache__/variant_mapping.cpython-38.pyc b/smart_service/transactions/doctype/variant_mapping/__pycache__/variant_mapping.cpython-38.pyc index 6e86c68..60e7f91 100644 Binary files a/smart_service/transactions/doctype/variant_mapping/__pycache__/variant_mapping.cpython-38.pyc and b/smart_service/transactions/doctype/variant_mapping/__pycache__/variant_mapping.cpython-38.pyc differ diff --git a/smart_service/transactions/doctype/variant_mapping/variant_mapping.js b/smart_service/transactions/doctype/variant_mapping/variant_mapping.js index 3e6309f..2852380 100644 --- a/smart_service/transactions/doctype/variant_mapping/variant_mapping.js +++ b/smart_service/transactions/doctype/variant_mapping/variant_mapping.js @@ -4,7 +4,6 @@ cur_frm.fields_dict['variant'].get_query = function(doc, cdt, cdn) { return { query:"smart_service.transactions.doctype.variant_mapping.variant_mapping.variant", - // filters: {'doc': doc.name} } } diff --git a/smart_service/transactions/doctype/variant_mapping/variant_mapping.py b/smart_service/transactions/doctype/variant_mapping/variant_mapping.py index e83b24f..5fde3e8 100644 --- a/smart_service/transactions/doctype/variant_mapping/variant_mapping.py +++ b/smart_service/transactions/doctype/variant_mapping/variant_mapping.py @@ -12,4 +12,4 @@ def variant(doctype, txt, searchfield, start, page_len, filters): #return frappe.db.sql("""SELECT name,variant,vehicle,vehicle_segment,active_status FROM _d6463952657fa86c.tabVariant order by creation desc""") return frappe.db.sql(""" select name,variant,vehicle,vehicle_segment,active_status FROM _d6463952657fa86c.tabVariant where - (name like "%%%(txt)s%%" or variant like "%%%(txt)s%%") limit %(start)s, %(page_len)s order by creation"""%{'txt': txt, 'start': start, 'page_len': page_len}) + (name like "%%%(txt)s%%" or variant like "%%%(txt)s%%") order by creation desc limit %(start)s, %(page_len)s """%{'txt': txt, 'start': start, 'page_len': page_len}) diff --git a/smart_service/transactions/report/audit_report/__pycache__/audit_report.cpython-38.pyc b/smart_service/transactions/report/audit_report/__pycache__/audit_report.cpython-38.pyc index 801ff6a..8a93756 100644 Binary files a/smart_service/transactions/report/audit_report/__pycache__/audit_report.cpython-38.pyc and b/smart_service/transactions/report/audit_report/__pycache__/audit_report.cpython-38.pyc differ diff --git a/smart_service/transactions/report/audit_report/audit_report.py b/smart_service/transactions/report/audit_report/audit_report.py index 1b7172a..a85ffd1 100644 --- a/smart_service/transactions/report/audit_report/audit_report.py +++ b/smart_service/transactions/report/audit_report/audit_report.py @@ -130,9 +130,9 @@ def appendToDic2(mapData, indent, header): for c in custom_lang: other_proc = da['procedure'] other_proc = other_proc[:-2]+c['lang_code'] - others = frappe.db.sql('''select tabProcedure.active_status,count(distinct(`tabProcedure_Details`.procedure_name)) as syscount,tabProcedure.workflow_state + others = frappe.db.sql('''select `tabProcedure`.active_status,count(distinct(`tabProcedure_Details`.procedure_name)) as syscount,`tabProcedure`.workflow_state from ({0}.`tabProcedure_Details` inner join {0}.`tabProcedure` on `tabProcedure_Details`.`parent` = `tabProcedure`.`name`) - where `tabProcedure`.name = '{1}'; '''.format(current_db_name ,other_proc), as_dict=True) + where `tabProcedure`.`name` = '{1}'; '''.format(current_db_name ,other_proc), as_dict=True) if len(others) > 0: others = others[0] @@ -162,7 +162,7 @@ def appendToDic3(mapData, procSize, j, indent, header, procedure): procedure = procedure[:-2]+c['lang_code'] colmodified = c['lang_code'] + '_modified' other_step_count = frappe.db.sql( - '''select count(distinct(step_name)) as count, modified as {1} from {0}.tabProcedure_Details where parent= '{2}' group by(procedure_name) order by idx;'''.format(current_db_name,colmodified,procedure), as_list=True) + '''select count(distinct(step_name)) as count, modified as {1} from {0}.`tabProcedure_Details` where parent= '{2}' group by(procedure_name) order by idx;'''.format(current_db_name,colmodified,procedure), as_list=True) for l in other_step_count: list2.append(l)