Browse Source

report update2

master
hns 3 years ago
parent
commit
60b32b9b8e
  1. BIN
      smart_service/transactions/doctype/variant_mapping/__pycache__/variant_mapping.cpython-38.pyc
  2. 1
      smart_service/transactions/doctype/variant_mapping/variant_mapping.js
  3. 2
      smart_service/transactions/doctype/variant_mapping/variant_mapping.py
  4. BIN
      smart_service/transactions/report/audit_report/__pycache__/audit_report.cpython-38.pyc
  5. 6
      smart_service/transactions/report/audit_report/audit_report.py

BIN
smart_service/transactions/doctype/variant_mapping/__pycache__/variant_mapping.cpython-38.pyc

Binary file not shown.

1
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}
}
}

2
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})

BIN
smart_service/transactions/report/audit_report/__pycache__/audit_report.cpython-38.pyc

Binary file not shown.

6
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)

Loading…
Cancel
Save