Browse Source

Audit repor index error fix

master
venkataakhil 11 months ago
parent
commit
5959a39765
  1. 16
      smart_service/transactions/report/audit_report/audit_report.py

16
smart_service/transactions/report/audit_report/audit_report.py

@ -49,7 +49,6 @@ def get_data(filters):
if validation_flag:
return data
else:
frappe.log_error('Audit report',str(data))
return []
return data
@ -99,11 +98,13 @@ def modify_data(data_input, filter_parent):
for j in ss_map_append:
val = j['procedure_name']
proc = j['procedure']
proc_map, proc_size = get_parent_map(ss_map[val], 'procedure_name')
proc_map, proc_size = get_parent_map(
ss_map[val], 'procedure_name')
proc_values_dic = append_to_dic3(
proc_map, proc_size, j, indent=3, header=0, procedure=proc)
proc_length = status_length_append(proc_values_dic, 'Procedure')
proc_length = status_length_append(
proc_values_dic, 'Procedure')
j['active_status'] = j['active_status'] + ' / ' + proc_length
list1.append(j)
@ -122,10 +123,12 @@ def modify_data(data_input, filter_parent):
append_data = add_duplicate_data(list1)
append_data = remove_duplicate_and_header(append_data)
# frappe.msgprint(str(append_data))
return True, append_data
except Exception as e:
frappe.log_error('Audit report_modify ',str(e))
return False, str(e)
frappe.log_error('Audit report', frappe.get_traceback())
False, None
def append_to_dic1(map_data, indent, header):
map_data_append = []
@ -231,7 +234,8 @@ def append_to_dic3(map_data, proc_size, j, indent, header, procedure):
for cus in range(len(custom_lang)):
if len(list1[cus]) > 0:
if i<len(list1[cus]):
# frappe.msgprint(str(list1[cus]))
if list1[cus][i][0] == 1:
dic1['{}_active_status'.format(custom_lang[cus]['lang_code'])] = str(
list1[cus][i][0]) + " Step"

Loading…
Cancel
Save