This commit is contained in:
James Cole 2020-09-03 06:34:48 +02:00
parent 2bb6c48278
commit f0fe8bf5c7
2 changed files with 11 additions and 12 deletions

View File

@ -49,16 +49,11 @@ use Log;
class IndexController extends Controller class IndexController extends Controller
{ {
use DateCalculation; use DateCalculation;
/** @var AvailableBudgetRepositoryInterface */ private AvailableBudgetRepositoryInterface $abRepository;
private $abRepository; private BudgetLimitRepositoryInterface $blRepository;
/** @var BudgetLimitRepositoryInterface */ private CurrencyRepositoryInterface $currencyRepository;
private $blRepository; private OperationsRepositoryInterface $opsRepository;
/** @var CurrencyRepositoryInterface */ private BudgetRepositoryInterface $repository;
private $currencyRepository;
/** @var OperationsRepositoryInterface */
private $opsRepository;
/** @var BudgetRepositoryInterface The budget repository */
private $repository;
/** /**
* IndexController constructor. * IndexController constructor.

View File

@ -306,7 +306,7 @@
{% for spentInfo in budget.spent %} {% for spentInfo in budget.spent %}
{% set countLimit = 0 %} {% set countLimit = 0 %}
{% for budgetLimit in budget.budgeted %} {% for budgetLimit in budget.budgeted %}
{% if spentInfo.currency_id == budgetLimit.currency_id %} {% if spentInfo.currency_id == budgetLimit.currency_id and budgetLimit.in_range %}
{% set countLimit = countLimit + 1 %} {% set countLimit = countLimit + 1 %}
<span class="left_span" data-currency="{{ spentInfo.currency_id }}" data-limit="{{ budgetLimit.id }}" <span class="left_span" data-currency="{{ spentInfo.currency_id }}" data-limit="{{ budgetLimit.id }}"
data-value="{{ spentInfo.spent + budgetLimit.amount }}" class="amount_left"> data-value="{{ spentInfo.spent + budgetLimit.amount }}" class="amount_left">
@ -333,7 +333,11 @@
<span class="left_span" data-currency="{{ spentInfo.currency_id }}" data-limit="{{ budgetLimit.id }}" <span class="left_span" data-currency="{{ spentInfo.currency_id }}" data-limit="{{ budgetLimit.id }}"
data-value="{{ spentInfo.spent + budgetLimit.amount }}" class="amount_left"> data-value="{{ spentInfo.spent + budgetLimit.amount }}" class="amount_left">
{{ formatAmountBySymbol(budgetLimit.amount, budgetLimit.currency_symbol, budgetLimit.currency_decimal_places) }} {{ formatAmountBySymbol(budgetLimit.amount, budgetLimit.currency_symbol, budgetLimit.currency_decimal_places) }}
({{ formatAmountBySymbol(budgetLimit.amount / activeDaysLeft, budgetLimit.currency_symbol, budgetLimit.currency_decimal_places) }}) {% if budgetLimit.in_range %}
({{ formatAmountBySymbol(budgetLimit.amount / activeDaysLeft, budgetLimit.currency_symbol, budgetLimit.currency_decimal_places) }})
{% else %}
X
{% endif %}
</span> </span>
<br/> <br/>
{% endif %} {% endif %}