From 7a0ad5a5878eb1877722ddcd77e705da11299be2 Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 20 May 2015 06:50:24 +0200 Subject: [PATCH] Fixed a chart [skip ci] --- public/js/budgets.js | 2 +- resources/twig/budgets/show.twig | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/public/js/budgets.js b/public/js/budgets.js index b4820c206d..9e189999c0 100644 --- a/public/js/budgets.js +++ b/public/js/budgets.js @@ -8,7 +8,7 @@ $(function () { if (typeof budgetID !== 'undefined' && typeof repetitionID === 'undefined') { - googleColumnChart('chart/budget/' + budgetID + '/spending', 'budgetOverview'); + googleColumnChart('chart/budget/' + budgetID, 'budgetOverview'); } if (typeof budgetID !== 'undefined' && typeof repetitionID !== 'undefined') { googleLineChart('chart/budget/' + budgetID + '/' + repetitionID, 'budgetOverview'); diff --git a/resources/twig/budgets/show.twig b/resources/twig/budgets/show.twig index 82b0b8b9a0..7ad2d0add7 100644 --- a/resources/twig/budgets/show.twig +++ b/resources/twig/budgets/show.twig @@ -51,14 +51,14 @@ Amount: {{ rep.amount|formatAmount }}
- Spent: {{ spentInRepetition(rep)|formatAmount }} + Spent: {{ spentInRepetitionCorrected(rep)|formatAmount }}
- {% set overspent = spentInRepetition(rep) > rep.amount %} + {% set overspent = spentInRepetitionCorrected(rep) > rep.amount %} {% if overspent %} - {% set spent = spentInRepetition(rep) %} + {% set spent = spentInRepetitionCorrected(rep) %} {% set pct = (spent != 0 ? (rep.amount / spent)*100 : 0) %}
@@ -66,7 +66,7 @@
{% else %} {% set amount = rep.amount %} - {% set pct = (amount != 0 ? (spentInRepetition(rep) / amount)*100 : 0) %} + {% set pct = (amount != 0 ? (spentInRepetitionCorrected(rep) / amount)*100 : 0) %}