diff --git a/cope2n-api/billing_report.xlsx b/cope2n-api/billing_report.xlsx index 2723b16..b55b44c 100644 Binary files a/cope2n-api/billing_report.xlsx and b/cope2n-api/billing_report.xlsx differ diff --git a/cope2n-api/fwd_api/utils/file.py b/cope2n-api/fwd_api/utils/file.py index 71b175a..2df0d41 100755 --- a/cope2n-api/fwd_api/utils/file.py +++ b/cope2n-api/fwd_api/utils/file.py @@ -22,7 +22,7 @@ from ..celery_worker.client_connector import c_connector import imagesize import csv from openpyxl import load_workbook -from openpyxl.styles import Font, Border, Side, PatternFill, NamedStyle, numbers +from openpyxl.styles import Font, Border, Side, PatternFill, NamedStyle, numbers, Alignment s3_client = S3Util.MinioS3Client( endpoint=settings.S3_ENDPOINT, @@ -467,7 +467,7 @@ def dict2xlsx(input: json, _type='report'): fill_green = PatternFill(start_color=green, end_color=green, fill_type = "solid") fill_yellow = PatternFill(start_color=yellow, end_color=yellow, fill_type = "solid") fill_gray = PatternFill(start_color=gray, end_color=gray, fill_type = "solid") - + align_right = Alignment(horizontal='right') if _type == 'report': wb = load_workbook(filename = 'report.xlsx') ws = wb['Sheet1'] @@ -573,7 +573,8 @@ def dict2xlsx(input: json, _type='report'): ws[key + str(start_index)] = value ws[key + str(start_index)].border = border ws[key + str(start_index)].font = font_black - + if key in ['G', 'H']: + ws[key + str(start_index)].alignment = align_right start_index += 1 return wb