fixed DivisionUndefined issues in combinedequipmentsaving
parent
30522bc75a
commit
75015e1417
|
@ -329,9 +329,9 @@ def generate_excel(report,
|
||||||
ws['D' + str(current_row_number)].font = name_font
|
ws['D' + str(current_row_number)].font = name_font
|
||||||
ws['D' + str(current_row_number)].alignment = c_c_alignment
|
ws['D' + str(current_row_number)].alignment = c_c_alignment
|
||||||
ws['D' + str(current_row_number)].border = f_border
|
ws['D' + str(current_row_number)].border = f_border
|
||||||
ws['D' + str(current_row_number)] = \
|
ws['D' + str(current_row_number)] = str(round(reporting_period_data['subtotals_in_kgce_saving'][i] /
|
||||||
str(round(reporting_period_data['subtotals_in_kgce_saving'][i] /
|
subtotals_in_kgce_saving_sum * 100, 2)) + '%'\
|
||||||
subtotals_in_kgce_saving_sum * 100, 2)) + '%'
|
if abs(subtotals_in_kgce_saving_sum) > 0 else '-'
|
||||||
|
|
||||||
current_row_number += 1
|
current_row_number += 1
|
||||||
|
|
||||||
|
@ -398,9 +398,9 @@ def generate_excel(report,
|
||||||
ws['D' + str(current_row_number)].font = name_font
|
ws['D' + str(current_row_number)].font = name_font
|
||||||
ws['D' + str(current_row_number)].alignment = c_c_alignment
|
ws['D' + str(current_row_number)].alignment = c_c_alignment
|
||||||
ws['D' + str(current_row_number)].border = f_border
|
ws['D' + str(current_row_number)].border = f_border
|
||||||
ws['D' + str(current_row_number)] = \
|
ws['D' + str(current_row_number)] = str(round(reporting_period_data['subtotals_in_kgco2e_saving'][i] /
|
||||||
str(round(reporting_period_data['subtotals_in_kgco2e_saving'][i] /
|
subtotals_in_kgco2e_saving_sum * 100, 2)) + '%'\
|
||||||
subtotals_in_kgco2e_saving_sum * 100, 2)) + '%'
|
if abs(subtotals_in_kgco2e_saving_sum) > 0 else '-'
|
||||||
|
|
||||||
current_row_number += 1
|
current_row_number += 1
|
||||||
|
|
||||||
|
|
|
@ -331,7 +331,7 @@ def generate_excel(report,
|
||||||
ws['D' + str(current_row_number)].border = f_border
|
ws['D' + str(current_row_number)].border = f_border
|
||||||
ws['D' + str(current_row_number)] = str(round(reporting_period_data['subtotals_in_kgce_saving'][i] /
|
ws['D' + str(current_row_number)] = str(round(reporting_period_data['subtotals_in_kgce_saving'][i] /
|
||||||
subtotals_in_kgce_saving_sum * 100, 2)) + '%' \
|
subtotals_in_kgce_saving_sum * 100, 2)) + '%' \
|
||||||
if subtotals_in_kgce_saving_sum > 0 else '-'
|
if abs(subtotals_in_kgce_saving_sum) > 0 else '-'
|
||||||
|
|
||||||
current_row_number += 1
|
current_row_number += 1
|
||||||
|
|
||||||
|
@ -400,7 +400,7 @@ def generate_excel(report,
|
||||||
ws['D' + str(current_row_number)].border = f_border
|
ws['D' + str(current_row_number)].border = f_border
|
||||||
ws['D' + str(current_row_number)] = str(round(reporting_period_data['subtotals_in_kgco2e_saving'][i] /
|
ws['D' + str(current_row_number)] = str(round(reporting_period_data['subtotals_in_kgco2e_saving'][i] /
|
||||||
subtotals_in_kgco2e_saving_sum * 100, 2)) + '%' \
|
subtotals_in_kgco2e_saving_sum * 100, 2)) + '%' \
|
||||||
if subtotals_in_kgco2e_saving_sum > 0 else '-'
|
if abs(subtotals_in_kgco2e_saving_sum) > 0 else '-'
|
||||||
|
|
||||||
current_row_number += 1
|
current_row_number += 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue