fix: bolme2_hisse2 last column is sum of 3 months, not average

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ali 2026-04-03 22:21:11 +04:00
parent 19d1a66b87
commit 92d7ac6875
1 changed files with 2 additions and 2 deletions

View File

@ -302,12 +302,12 @@ def get_bolme2_hisse2_data(company, year, quarter):
monthly_kompensasiya.append(flt(komp))
def build_row(monthly):
avg = round(sum(monthly) / 3, 2) if monthly else 0
total = round(sum(monthly), 2) if monthly else 0
return {
"1ciay": monthly[0] if len(monthly) > 0 else 0,
"2ciay": monthly[1] if len(monthly) > 1 else 0,
"3cüay": monthly[2] if len(monthly) > 2 else 0,
"rübüzrəortasay": avg,
"rübüzrəortasay": total,
}
row2 = build_row(monthly_emek)