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:
parent
19d1a66b87
commit
92d7ac6875
|
|
@ -302,12 +302,12 @@ def get_bolme2_hisse2_data(company, year, quarter):
|
||||||
monthly_kompensasiya.append(flt(komp))
|
monthly_kompensasiya.append(flt(komp))
|
||||||
|
|
||||||
def build_row(monthly):
|
def build_row(monthly):
|
||||||
avg = round(sum(monthly) / 3, 2) if monthly else 0
|
total = round(sum(monthly), 2) if monthly else 0
|
||||||
return {
|
return {
|
||||||
"1ciay": monthly[0] if len(monthly) > 0 else 0,
|
"1ciay": monthly[0] if len(monthly) > 0 else 0,
|
||||||
"2ciay": monthly[1] if len(monthly) > 1 else 0,
|
"2ciay": monthly[1] if len(monthly) > 1 else 0,
|
||||||
"3cüay": monthly[2] if len(monthly) > 2 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)
|
row2 = build_row(monthly_emek)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue