ee9fa268 by 周伟奇

fix result_col

1 parent 2a723026
...@@ -299,6 +299,7 @@ class BSWorkbook(Workbook): ...@@ -299,6 +299,7 @@ class BSWorkbook(Workbook):
299 add_col = ['金额', '核对结果'] 299 add_col = ['金额', '核对结果']
300 amount_cell_idx = len(header) 300 amount_cell_idx = len(header)
301 header.extend(add_col) 301 header.extend(add_col)
302 result_idx = len(header) - 1
302 303
303 tmp_ws = self.create_sheet('tmp_ws') 304 tmp_ws = self.create_sheet('tmp_ws')
304 for month in sorted(month_mapping.keys()): 305 for month in sorted(month_mapping.keys()):
...@@ -392,10 +393,10 @@ class BSWorkbook(Workbook): ...@@ -392,10 +393,10 @@ class BSWorkbook(Workbook):
392 amount_col_letter = get_column_letter(amount_cell_idx + 1) 393 amount_col_letter = get_column_letter(amount_cell_idx + 1)
393 over_col_letter = get_column_letter(over_cell_idx + 1) 394 over_col_letter = get_column_letter(over_cell_idx + 1)
394 if is_reverse: 395 if is_reverse:
395 rows[consts.RESULT_IDX].value = '=IF({2}{0}=ROUND(SUM({2}{1},{3}{0}),4), "{4}", "{5}")'.format( 396 rows[result_idx].value = '=IF({2}{0}=ROUND(SUM({2}{1},{3}{0}),4), "{4}", "{5}")'.format(
396 amount_cell.row - 1, amount_cell.row, over_col_letter, amount_col_letter, *self.proof_res) 397 amount_cell.row - 1, amount_cell.row, over_col_letter, amount_col_letter, *self.proof_res)
397 else: 398 else:
398 rows[consts.RESULT_IDX].value = '=IF({2}{0}=ROUND(SUM({2}{1},{3}{0}),4), "{4}", "{5}")'.format( 399 rows[result_idx].value = '=IF({2}{0}=ROUND(SUM({2}{1},{3}{0}),4), "{4}", "{5}")'.format(
399 amount_cell.row, amount_cell.row - 1, over_col_letter, amount_col_letter, *self.proof_res) 400 amount_cell.row, amount_cell.row - 1, over_col_letter, amount_col_letter, *self.proof_res)
400 401
401 # 3.6.同一天相同进出账高亮 402 # 3.6.同一天相同进出账高亮
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!