diff --git a/frontend/src/components/dashboard/BudgetLimitRow.vue b/frontend/src/components/dashboard/BudgetLimitRow.vue index 2762557363..d26762a4ef 100644 --- a/frontend/src/components/dashboard/BudgetLimitRow.vue +++ b/frontend/src/components/dashboard/BudgetLimitRow.vue @@ -31,8 +31,6 @@ {{ $t('firefly.spent_x_of_y', {amount: Intl.NumberFormat(locale, {style: 'currency', currency: budgetLimit.currency_code}).format(budgetLimit.spent), total: Intl.NumberFormat(locale, {style: 'currency', currency: budgetLimit.currency_code}).format(budgetLimit.amount)}) }} - -
amount) { - pctOrange = (spentFloatPos / amount) * 100; + //console.log('Spent ' + name + ' OVER budget'); + pctOrange = (amount / spentFloatPos) * 100; pctRed = 100 - pctOrange; + //console.log('orange is ' + pctOrange); + //console.log('red is ' + pctRed); } // spent exactly on budget if (0.0 !== spentFloatPos && spentFloatPos === amount) { - pctOrange = 0; - pctRed = 100; + pctOrange = 100; + pctRed = 0; } let obj = {