Skip to content
Snippets Groups Projects
Commit 04aa1731 authored by Tom French's avatar Tom French Committed by James Long
Browse files

fix: use Math.round in place of truncating digits

parent bb9c9927
No related branches found
No related tags found
No related merge requests found
......@@ -110,7 +110,7 @@ async function fillPrimaryChecking(handlers, account, payees, groups) {
transactions.push(transaction);
if (Math.random() < 0.2) {
let a = (transaction.amount / 3) | 0;
let a = Math.round(transaction.amount / 3);
let pick = () =>
payee === incomePayee
? incomeGroup.categories.find(c => c.name === 'Income').id
......
......@@ -185,7 +185,7 @@ export async function set3MonthAvg({ month }) {
'sum-amount-' + cat.id
);
const avg = ((spent1 + spent2 + spent3) / 3) | 0;
const avg = Math.round((spent1 + spent2 + spent3) / 3);
setBudget({ category: cat.id, month, amount: -avg });
}
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment