fixed the selection of a wrong month

This commit is contained in:
Patrick 2025-10-16 02:15:00 +02:00
parent b7563a2274
commit c25f72b3ac
1 changed files with 1 additions and 1 deletions

View File

@ -361,7 +361,7 @@ export class User {
get_estimate_by_month(year: number, month: number): number {
const query = this._database.query(ESTIMATES_DATABASE_GET_QUART);
const res = query.get({ year: year, quarter: Math.floor((month-1) / 3) }) as EstimatesEntry;
const res = query.get({ year: year, quarter: Math.floor((month-1) / 3)+1 }) as EstimatesEntry;
return res?.[`estimate_${(month - 1) % 3}`] ?? NaN;
}