mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-04-24 17:48:41 +02:00
215 lines
11 KiB
HTML
215 lines
11 KiB
HTML
{% load tools %}
|
|
{% load month_name %}
|
|
{% load i18n %}
|
|
<div class="row row-cols-1 g-4 mb-3">
|
|
{% for currency_id, currency in totals.items %}
|
|
<div class="col">
|
|
{% if not single %}
|
|
<div class="tw-text-xl {% if not forloop.first %}mt-4 mb-3{% endif %}">
|
|
{{ currency.currency.name }} ({{ currency.currency.code }})
|
|
</div>
|
|
{% endif %}
|
|
<div class="d-flex justify-content-between align-items-baseline mt-2">
|
|
<div class="text-end font-monospace">
|
|
<div class="tw-text-gray-400">{% translate 'projected income' %}</div>
|
|
</div>
|
|
<div class="dotted-line flex-grow-1"></div>
|
|
<div class="text-end font-monospace tw-text-green-400">
|
|
<c-amount.display
|
|
:amount="currency.income_projected"
|
|
:prefix="currency.currency.prefix"
|
|
:suffix="currency.currency.suffix"
|
|
:decimal_places="currency.currency.decimal_places"></c-amount.display>
|
|
</div>
|
|
</div>
|
|
{% if currency.exchanged and currency.exchanged.income_projected %}
|
|
<div class="text-end font-monospace tw-text-gray-500">
|
|
<c-amount.display
|
|
:amount="currency.exchanged.currency.income_projected"
|
|
:prefix="currency.exchanged.currency.prefix"
|
|
:suffix="currency.exchanged.currency.suffix"
|
|
:decimal_places="currency.exchanged.currency.decimal_places"></c-amount.display>
|
|
</div>
|
|
{% endif %}
|
|
<div class="d-flex justify-content-between align-items-baseline mt-2">
|
|
<div class="text-end font-monospace">
|
|
<div class="tw-text-gray-400">{% translate 'projected expenses' %}</div>
|
|
</div>
|
|
<div class="dotted-line flex-grow-1"></div>
|
|
<div>
|
|
<div class="text-end font-monospace tw-text-red-400">
|
|
<c-amount.display
|
|
:amount="currency.expense_projected"
|
|
:prefix="currency.currency.prefix"
|
|
:suffix="currency.currency.suffix"
|
|
:decimal_places="currency.currency.decimal_places"></c-amount.display>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% if currency.exchanged and currency.exchanged.expense_projected %}
|
|
<div class="text-end font-monospace tw-text-gray-500">
|
|
<c-amount.display
|
|
:amount="currency.exchanged.expense_projected"
|
|
:prefix="currency.exchanged.currency.prefix"
|
|
:suffix="currency.exchanged.currency.suffix"
|
|
:decimal_places="currency.exchanged.currency.decimal_places"></c-amount.display>
|
|
</div>
|
|
{% endif %}
|
|
<div class="d-flex justify-content-between align-items-baseline mt-2">
|
|
<div class="text-end font-monospace">
|
|
<div class="tw-text-gray-400">{% translate 'projected total' %}</div>
|
|
</div>
|
|
<div class="dotted-line flex-grow-1"></div>
|
|
<div
|
|
class="text-end font-monospace">
|
|
<c-amount.display
|
|
:amount="currency.total_projected"
|
|
:prefix="currency.currency.prefix"
|
|
:suffix="currency.currency.suffix"
|
|
:decimal_places="currency.currency.decimal_places"
|
|
color="{% if currency.total_projected > 0 %}green{% elif currency.total_projected < 0 %}red{% endif %}"></c-amount.display>
|
|
</div>
|
|
</div>
|
|
{% if currency.exchanged.total_projected and currency.exchanged.total_projected %}
|
|
<div class="text-end font-monospace tw-text-gray-500">
|
|
<c-amount.display
|
|
:amount="currency.exchanged.total_projected"
|
|
:prefix="currency.exchanged.currency.prefix"
|
|
:suffix="currency.exchanged.currency.suffix"
|
|
:decimal_places="currency.exchanged.currency.decimal_places"></c-amount.display>
|
|
</div>
|
|
{% endif %}
|
|
<hr class="my-3">
|
|
<div class="d-flex justify-content-between align-items-baseline mt-2">
|
|
<div class="text-end font-monospace">
|
|
<div class="tw-text-gray-400">{% translate 'current income' %}</div>
|
|
</div>
|
|
<div class="dotted-line flex-grow-1"></div>
|
|
<div class="text-end font-monospace tw-text-green-400">
|
|
<c-amount.display
|
|
:amount="currency.income_current"
|
|
:prefix="currency.currency.prefix"
|
|
:suffix="currency.currency.suffix"
|
|
:decimal_places="currency.currency.decimal_places"></c-amount.display>
|
|
</div>
|
|
</div>
|
|
{% if currency.exchanged and currency.exchanged.income_current %}
|
|
<div class="text-end font-monospace tw-text-gray-500">
|
|
<c-amount.display
|
|
:amount="currency.exchanged.income_current"
|
|
:prefix="currency.exchanged.currency.prefix"
|
|
:suffix="currency.exchanged.currency.suffix"
|
|
:decimal_places="currency.exchanged.currency.decimal_places"></c-amount.display>
|
|
</div>
|
|
{% endif %}
|
|
<div class="d-flex justify-content-between align-items-baseline mt-2">
|
|
<div class="text-end font-monospace">
|
|
<div class="tw-text-gray-400">{% translate 'current expenses' %}</div>
|
|
</div>
|
|
<div class="dotted-line flex-grow-1"></div>
|
|
<div class="text-end font-monospace tw-text-red-400">
|
|
<c-amount.display
|
|
:amount="currency.expense_current"
|
|
:prefix="currency.currency.prefix"
|
|
:suffix="currency.currency.suffix"
|
|
:decimal_places="currency.currency.decimal_places"></c-amount.display>
|
|
</div>
|
|
</div>
|
|
{% if currency.exchanged and currency.exchanged.expense_current %}
|
|
<div class="text-end font-monospace tw-text-gray-500">
|
|
<c-amount.display
|
|
:amount="currency.exchanged.expense_current"
|
|
:prefix="currency.exchanged.currency.prefix"
|
|
:suffix="currency.exchanged.currency.suffix"
|
|
:decimal_places="currency.exchanged.currency.decimal_places"></c-amount.display>
|
|
</div>
|
|
{% endif %}
|
|
<div class="d-flex justify-content-between align-items-baseline mt-2">
|
|
<div class="text-end font-monospace">
|
|
<div class="tw-text-gray-400">{% translate 'current total' %}</div>
|
|
</div>
|
|
<div class="dotted-line flex-grow-1"></div>
|
|
<div
|
|
class="text-end font-monospace">
|
|
<c-amount.display
|
|
:amount="currency.total_current"
|
|
:prefix="currency.currency.prefix"
|
|
:suffix="currency.currency.suffix"
|
|
:decimal_places="currency.currency.decimal_places"
|
|
color="{% if currency.total_current > 0 %}green{% elif currency.total_current < 0 %}red{% endif %}"></c-amount.display>
|
|
</div>
|
|
</div>
|
|
{% if currency.exchanged and currency.exchanged.total_current %}
|
|
<div class="text-end font-monospace tw-text-gray-500">
|
|
<c-amount.display
|
|
:amount="currency.exchanged.total_current"
|
|
:prefix="currency.exchanged.currency.prefix"
|
|
:suffix="currency.exchanged.currency.suffix"
|
|
:decimal_places="currency.exchanged.currency.decimal_places"></c-amount.display>
|
|
</div>
|
|
{% endif %}
|
|
<div>
|
|
<hr class="my-3">
|
|
<div class="d-flex justify-content-between align-items-baseline mt-2">
|
|
<div class="text-end font-monospace">
|
|
<div class="tw-text-gray-400">{% translate 'final total' %}</div>
|
|
</div>
|
|
<div class="dotted-line flex-grow-1"></div>
|
|
<div class="text-end font-monospace">
|
|
<c-amount.display
|
|
:amount="currency.total_final"
|
|
:prefix="currency.currency.prefix"
|
|
:suffix="currency.currency.suffix"
|
|
:decimal_places="currency.currency.decimal_places"
|
|
color="{% if currency.total_final > 0 %}green{% elif currency.total_final < 0 %}red{% endif %}"></c-amount.display>
|
|
</div>
|
|
</div>
|
|
{% if currency.exchanged and currency.exchanged.total_final %}
|
|
<div class="text-end font-monospace tw-text-gray-500">
|
|
<c-amount.display
|
|
:amount="currency.exchanged.total_final"
|
|
:prefix="currency.exchanged.currency.prefix"
|
|
:suffix="currency.exchanged.currency.suffix"
|
|
:decimal_places="currency.exchanged.currency.decimal_places"></c-amount.display>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% with p=percentages|get_dict_item:currency_id %}
|
|
<div class="progress-stacked mt-3">
|
|
<div class="progress position-relative" role="progressbar" aria-label="{% trans 'Projected Income' %} ({{ p.percentages.income_projected|floatformat:2 }}%)" aria-valuenow="{{ p.percentages.expense_projected|floatformat:0 }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ p.percentages.income_projected|floatformat:0 }}%">
|
|
<div class="progress-bar progress-bar-striped !tw-bg-green-400"
|
|
data-bs-toggle="tooltip"
|
|
data-bs-placement="top"
|
|
title="{% trans 'Projected Income' %} ({{ p.percentages.income_projected|floatformat:2 }}%)">
|
|
</div>
|
|
</div>
|
|
<div class="progress position-relative" role="progressbar" aria-label="{% trans 'Current Income' %} ({{ percentage.income_current|floatformat:2 }}%)" aria-valuenow="{{ p.percentages.expense_projected|floatformat:0 }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ p.percentages.income_current|floatformat:0 }}%">
|
|
<div class="progress-bar !tw-bg-green-400"
|
|
data-bs-toggle="tooltip"
|
|
data-bs-placement="top"
|
|
title="{% trans 'Current Income' %} ({{ p.percentages.income_current|floatformat:2 }}%)">
|
|
</div>
|
|
</div>
|
|
<div class="progress position-relative" role="progressbar" aria-label="{% trans 'Projected Expenses' %} ({{ percentage.expense_projected|floatformat:2 }}%)" aria-valuenow="{{ p.percentages.expense_projected|floatformat:0 }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ p.percentages.expense_projected|floatformat:0 }}%">
|
|
<div class="progress-bar progress-bar-striped !tw-bg-red-400"
|
|
data-bs-toggle="tooltip"
|
|
data-bs-placement="top"
|
|
title="{% trans 'Projected Expenses' %} ({{ p.percentages.expense_projected|floatformat:2 }}%)">
|
|
</div>
|
|
</div>
|
|
<div class="progress position-relative" role="progressbar" aria-label="{% trans 'Current Expenses' %} ({{ percentage.expense_current|floatformat:2 }}%)" aria-valuenow="{{ p.percentages.expense_projected|floatformat:0 }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ p.percentages.expense_current|floatformat:0 }}%">
|
|
<div class="progress-bar !tw-bg-red-400"
|
|
data-bs-toggle="tooltip"
|
|
data-bs-placement="top"
|
|
title="{% trans 'Current Expenses' %} ({{ p.percentages.expense_current|floatformat:2 }}%)">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endwith %}
|
|
{% empty %}
|
|
<c-msg.empty
|
|
title="{% translate "No information to display" %}"></c-msg.empty>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|