fixed the selection of a wrong month
This commit is contained in:
parent
b7563a2274
commit
c25f72b3ac
|
|
@ -361,7 +361,7 @@ export class User {
|
||||||
|
|
||||||
get_estimate_by_month(year: number, month: number): number {
|
get_estimate_by_month(year: number, month: number): number {
|
||||||
const query = this._database.query(ESTIMATES_DATABASE_GET_QUART);
|
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;
|
return res?.[`estimate_${(month - 1) % 3}`] ?? NaN;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue