From 74d2962f1ee28f54725707d106eb88fac6606b40 Mon Sep 17 00:00:00 2001 From: Shaelyn Tolkamp <46355612+tolkamps1@users.noreply.github.com> Date: Thu, 12 Dec 2024 15:25:59 -0800 Subject: [PATCH] [Track-322] RF month grid fix quarter years (#2481) --- epictrack-api/src/api/reports/resource_forecast_report.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/epictrack-api/src/api/reports/resource_forecast_report.py b/epictrack-api/src/api/reports/resource_forecast_report.py index f5291c0d..b94fb655 100644 --- a/epictrack-api/src/api/reports/resource_forecast_report.py +++ b/epictrack-api/src/api/reports/resource_forecast_report.py @@ -953,17 +953,20 @@ def _get_quarter_section_meta_data( quarter1, remaining = divmod(report_start_date.month, 3) if remaining > 0: quarter1 += 1 + q1_year = report_start_date.year if quarter1 == 4: quarter2 = 1 + q2_year = q1_year + 1 else: quarter2 = quarter1 + 1 + q2_year = q1_year styles = [] cell_widths = [] section_headings = [ - f"{report_date.year} Q{quarter1}", + f"{q1_year} Q{quarter1}", "", "", - f"{self.end_date.year} Q{quarter2}", + f"{q2_year} Q{quarter2}", ] styles.append(("SPAN", (cell_index, 0), (cell_index + 2, 0))) styles.append(