mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-04-25 10:08:36 +02:00
284 lines
12 KiB
HTML
284 lines
12 KiB
HTML
{% load i18n %}
|
|
{% load currency_display %}
|
|
<div class="row row-cols-1 g-4 mb-3">
|
|
{# Daily Spending#}
|
|
<div class="col">
|
|
<div class="card tw-relative h-100 shadow">
|
|
<div class="tw-absolute tw-h-8 tw-w-8 tw-right-2 tw-top-2 tw-bg-yellow-300 tw-text-yellow-800 text-center
|
|
align-items-center d-flex justify-content-center rounded-2">
|
|
<i class="fa-solid fa-calendar-day"></i>
|
|
</div>
|
|
<div class="card-body">
|
|
<h5 class="tw-text-yellow-400 fw-bold">{% translate 'Daily Spending Allowance' %}{% include 'includes/help_icon.html' with content=_('This is the final total divided by the remaining days in the month') %}</h5>
|
|
<div class="d-flex justify-content-between mt-3">
|
|
<div class="text-end font-monospace">
|
|
<div class="tw-text-gray-400">{% translate 'today' %}</div>
|
|
</div>
|
|
<div class="text-end font-monospace">
|
|
{% for currency in daily_spending_allowance.values %}
|
|
<div>
|
|
<c-amount.display
|
|
:amount="currency.amount"
|
|
:prefix="currency.currency.prefix"
|
|
:suffix="currency.currency.suffix"
|
|
:decimal_places="currency.currency.decimal_places"></c-amount.display>
|
|
</div>
|
|
{% if currency.exchanged %}
|
|
<div>
|
|
<c-amount.display
|
|
:amount="currency.exchanged.amount"
|
|
:prefix="currency.exchanged.currency.prefix"
|
|
:suffix="currency.exchanged.currency.suffix"
|
|
:decimal_places="currency.exchanged.currency.decimal_places"
|
|
color="gray"></c-amount.display>
|
|
</div>
|
|
{% endif %}
|
|
{% empty %}
|
|
<div>-</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{# Income#}
|
|
<div class="col">
|
|
<div class="card tw-relative h-100 shadow">
|
|
<div class="tw-absolute tw-h-8 tw-w-8 tw-right-2 tw-top-2 tw-bg-green-300 tw-text-green-800 text-center
|
|
align-items-center d-flex justify-content-center rounded-2">
|
|
<i class="fa-solid fa-arrow-right-to-bracket"></i>
|
|
</div>
|
|
<div class="card-body">
|
|
<h5 class="tw-text-green-400 fw-bold">{% translate 'Income' %}</h5>
|
|
<div class="d-flex justify-content-between mt-3">
|
|
<div class="text-end font-monospace">
|
|
<div class="tw-text-gray-400">{% translate 'current' %}</div>
|
|
</div>
|
|
<div class="text-end font-monospace">
|
|
{% for currency in income_current.values %}
|
|
<div>
|
|
<c-amount.display
|
|
:amount="currency.income_current"
|
|
:prefix="currency.currency.prefix"
|
|
:suffix="currency.currency.suffix"
|
|
:decimal_places="currency.currency.decimal_places"
|
|
color="green"></c-amount.display>
|
|
</div>
|
|
{% if currency.exchanged %}
|
|
<div>
|
|
<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"
|
|
color="gray"></c-amount.display>
|
|
</div>
|
|
{% endif %}
|
|
{% empty %}
|
|
<div>-</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
<hr class="my-1">
|
|
<div class="d-flex justify-content-between">
|
|
<div class="text-end font-monospace">
|
|
<div class="tw-text-gray-400">{% translate 'projected' %}</div>
|
|
</div>
|
|
<div class="text-end font-monospace">
|
|
{% for currency in income_projected.values %}
|
|
<div>
|
|
<c-amount.display
|
|
:amount="currency.income_projected"
|
|
:prefix="currency.currency.prefix"
|
|
:suffix="currency.currency.suffix"
|
|
:decimal_places="currency.currency.decimal_places"
|
|
color="green"></c-amount.display>
|
|
</div>
|
|
{% if currency.exchanged %}
|
|
<div>
|
|
<c-amount.display
|
|
:amount="currency.exchanged.income_projected"
|
|
:prefix="currency.exchanged.currency.prefix"
|
|
:suffix="currency.exchanged.currency.suffix"
|
|
:decimal_places="currency.exchanged.currency.decimal_places"
|
|
color="gray"></c-amount.display>
|
|
</div>
|
|
{% endif %}
|
|
{% empty %}
|
|
<div>-</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{# Expenses#}
|
|
<div class="col">
|
|
<div class="card tw-relative h-100 shadow">
|
|
<div class="tw-absolute tw-h-8 tw-w-8 tw-right-2 tw-top-2 tw-bg-red-300 tw-text-red-800 text-center
|
|
align-items-center d-flex justify-content-center rounded-2">
|
|
<i class="fa-solid fa-arrow-right-from-bracket"></i>
|
|
</div>
|
|
<div class="card-body">
|
|
<h5 class="tw-text-red-400 fw-bold">{% translate 'Expenses' %}</h5>
|
|
<div class="d-flex justify-content-between mt-3">
|
|
<div class="text-end font-monospace">
|
|
<div class="tw-text-gray-400">{% translate 'current' %}</div>
|
|
</div>
|
|
<div class="text-end font-monospace">
|
|
{% for currency in expense_current.values %}
|
|
<div>
|
|
<c-amount.display
|
|
:amount="currency.expense_current"
|
|
:prefix="currency.currency.prefix"
|
|
:suffix="currency.currency.suffix"
|
|
:decimal_places="currency.currency.decimal_places"
|
|
color="red"></c-amount.display>
|
|
</div>
|
|
{% if currency.exchanged %}
|
|
<div>
|
|
<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"
|
|
color="gray"></c-amount.display>
|
|
</div>
|
|
{% endif %}
|
|
{% empty %}
|
|
<div>-</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
<hr class="my-1">
|
|
<div class="d-flex justify-content-between">
|
|
<div class="text-end font-monospace">
|
|
<div class="tw-text-gray-400">{% translate 'projected' %}</div>
|
|
</div>
|
|
<div class="text-end font-monospace">
|
|
{% for currency in expense_projected.values %}
|
|
<div>
|
|
<c-amount.display
|
|
:amount="currency.expense_projected"
|
|
:prefix="currency.currency.prefix"
|
|
:suffix="currency.currency.suffix"
|
|
:decimal_places="currency.currency.decimal_places"
|
|
color="red"></c-amount.display>
|
|
</div>
|
|
{% if currency.exchanged %}
|
|
<div>
|
|
<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"
|
|
color="gray"></c-amount.display>
|
|
</div>
|
|
{% endif %}
|
|
{% empty %}
|
|
<div>-</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{# Total#}
|
|
<div class="col">
|
|
<div class="card tw-relative h-100 shadow">
|
|
<div class="tw-absolute tw-h-8 tw-w-8 tw-right-2 tw-top-2 tw-bg-blue-300 tw-text-blue-800 text-center
|
|
align-items-center d-flex justify-content-center rounded-2">
|
|
<i class="fa-solid fa-scale-balanced"></i>
|
|
</div>
|
|
<div class="card-body">
|
|
<h5 class="tw-text-blue-400 fw-bold">{% translate 'Total' %}</h5>
|
|
<div class="d-flex justify-content-between mt-3">
|
|
<div class="text-end font-monospace">
|
|
<div class="tw-text-gray-400">{% translate 'current' %}</div>
|
|
</div>
|
|
<div class="text-end font-monospace">
|
|
{% for currency in total_current.values %}
|
|
<div>
|
|
<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>
|
|
{% if currency.exchanged %}
|
|
<div>
|
|
<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"
|
|
color="gray"></c-amount.display>
|
|
</div>
|
|
{% endif %}
|
|
{% empty %}
|
|
<div>-</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
<div class="d-flex justify-content-between mt-3">
|
|
<div class="text-end font-monospace">
|
|
<div class="tw-text-gray-400">{% translate 'projected' %}</div>
|
|
</div>
|
|
<div class="text-end font-monospace">
|
|
{% for currency in total_projected.values %}
|
|
<div>
|
|
<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>
|
|
{% if currency.exchanged %}
|
|
<div>
|
|
<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"
|
|
color="gray"></c-amount.display>
|
|
</div>
|
|
{% endif %}
|
|
{% empty %}
|
|
<div>-</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
<hr class="my-1">
|
|
<div class="d-flex justify-content-end">
|
|
<div class="text-end font-monospace">
|
|
{% for currency in total_final.values %}
|
|
<div>
|
|
<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>
|
|
{% if currency.exchanged %}
|
|
<div>
|
|
<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"
|
|
color="gray"></c-amount.display>
|
|
</div>
|
|
{% endif %}
|
|
{% empty %}
|
|
<div>-</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|