{% load i18n %}
{% load static %}
{% load humanize %}
{% load evelinks %}
{% load ledger %}

{% if mode == "TAX" %}
    {% trans "TAX" as mode_trans %}
{% else %}
    {% trans "Ratting" as mode_trans %}
{% endif %}

<!--##############################DAILY#######################-->
{% if character.bounty.total_amount_day or character.ess.total_amount_day or character.mission.total_amount_day or character.mining.total_amount_day %}
    {% if character.bounty.total_amount_day %}
        <div class="row description-row">
            <div class="col-sm-6">{% trans "Current Day" %} - {{ mode_trans }}:</div>
            <div class='col-sm-4 text-end'><span class="text-warning">{{ character.bounty.total_amount_day|floatformat:0|intcomma }}</span> ISK</div>
        </div>

        <div class="row description-row">
            <div class="col-sm-6">{% trans "Current Day" %} {% trans "Avg Tick" %} - {{ mode_trans }}:</div>
            <div class='col-sm-4 text-end'><span class="text-warning">{{ character.bounty.current_day_tick|floatformat:0|intcomma }}</span> ISK</div>
        </div>
    {% endif %}

    {% if character.ess.total_amount_day %}
        <div class="row description-row">
            <div class="col-sm-6">{% trans "Current Day" %} - ESS:</div>
            <div class='col-sm-4 text-end'><span class="text-warning">{{ character.ess.total_amount_day|floatformat:0|intcomma }}</span> ISK</div>
        </div>
    {% endif %}

    {% if character.stolen.total_amount_day %}
        <div class="row description-row">
            <div class="col-sm-6">{% trans "Current Day" %} - {% trans "Stolen ESS" %}:</div>
            <div class='col-sm-4 text-end'><span class="text-warning" data-bs-toggle="tooltip" data-bs-placement="left" title="{% trans "Estimated only" %}">{{ character.stolen.total_amount_day|floatformat:0|intcomma }}</span> ISK</div>
        </div>
    {% endif %}

    {% if character.mission.total_amount_day %}
        <div class="row description-row">
            <div class="col-sm-6">{% trans "Current Day" %} - {% trans "Mission Rewards" %}:</div>
            <div class='col-sm-4 text-end'><span class="text-warning">{{ character.mission.total_amount_day|floatformat:0|intcomma }}</span> ISK</div>
        </div>
    {% endif %}

    {% if character.mining.total_amount_day %}
        <div class="row description-row">
            <div class="col-sm-6">{% trans "Current Day" %} - {% trans "Mining" %}:</div>
            <div class='col-sm-4 text-end'><span class="text-warning">{{ character.mining.total_amount_day|floatformat:0|intcomma }}</span> ISK</div>
        </div>
    {% endif %}
{% endif %}

<!--############################## Misc #######################-->

{% if character.transaction.total_amount_day or character.contract.total_amount_day or character.donation.total_amount_day or character.insurance.total_amount_day %}
    <hr>
    {% if character.transaction.total_amount_day %}
        <div class="row description-row">
            <div class="col-sm-6">{% trans "Current Day" %} - {% trans "Trading" %}:</div>
            <div class='col-sm-4 text-end'><span class="text-warning">{{ character.transaction.total_amount_day|floatformat:0|intcomma }}</span> ISK</div>
        </div>
    {% endif %}

    {% if character.contract.total_amount_day %}
        <div class="row description-row">
            <div class="col-sm-6">{% trans "Current Day" %} - {% trans "Contracts" %}:</div>
            <div class='col-sm-4 text-end'><span class="text-warning">{{ character.contract.total_amount_day|floatformat:0|intcomma }}</span> ISK</div>
        </div>
    {% endif %}

    {% if character.donation.total_amount_day %}
        <div class="row description-row">
            <div class="col-sm-6">{% trans "Current Day" %} - {% trans "Donations" %}:</div>
            <div class='col-sm-4 text-end'><span class="text-warning">{{ character.donation.total_amount_day|floatformat:0|intcomma }}</span> ISK</div>
        </div>
    {% endif %}

    {% if character.insurance.total_amount_day %}
        <div class="row description-row">
            <div class="col-sm-6">{% trans "Current Day" %} - {% trans "Insurance" %}:</div>
            <div class='col-sm-4 text-end'><span class="text-warning">{{ character.insurance.total_amount_day|floatformat:0|intcomma }}</span> ISK</div>
        </div>
    {% endif %}
{% endif %}

<!--############################## COSTS #######################-->

{% if character.contract_cost.total_amount_day or character.production_cost.total_amount_day or character.market_cost.total_amount_day or character.traveling_cost.total_amount_day or character.asset_cost.total_amount_day or character.skill_cost.total_amount_day or character.insurance_cost.total_amount_day or character.planetary_cost.total_amount_day %}
    <hr>
    {% if character.contract_cost.total_amount_day %}
        <div class="row description-row">
            <div class="col-sm-6">{% trans "Current Day" %} - {% trans "Contract Cost" %}:</div>
            <div class='col-sm-4 text-end'><span class="text-warning">{{ character.contract_cost.total_amount_day|floatformat:0|intcomma }}</span> ISK</div>
        </div>
    {% endif %}

    {% if character.production_cost.total_amount_day %}
        <div class="row description-row">
            <div class="col-sm-6">{% trans "Current Day" %} - {% trans "Production Cost" %}:</div>
            <div class='col-sm-4 text-end'><span class="text-warning">{{ character.production_cost.total_amount_day|floatformat:0|intcomma }}</span> ISK</div>
        </div>
    {% endif %}

    {% if character.market_cost.total_amount_day %}
        <div class="row description-row">
            <div class="col-sm-6">{% trans "Current Day" %} - {% trans "Trading Cost" %}:</div>
            <div class='col-sm-4 text-end'><span class="text-warning">{{ character.market_cost.total_amount_day|floatformat:0|intcomma }}</span> ISK</div>
        </div>
    {% endif %}

    {% if character.traveling_cost.total_amount_day %}
        <div class="row description-row">
            <div class="col-sm-6">{% trans "Current Day" %} - {% trans "Traveling Cost" %}:</div>
            <div class='col-sm-4 text-end'><span class="text-warning">{{ character.traveling_cost.total_amount_day|floatformat:0|intcomma }}</span> ISK</div>
        </div>
    {% endif %}

    {% if character.asset_cost.total_amount_day %}
        <div class="row description-row">
            <div class="col-sm-6">{% trans "Current Day" %} - {% trans "Asset Safety Cost" %}:</div>
            <div class='col-sm-4 text-end'><span class="text-warning">{{ character.asset_cost.total_amount_day|floatformat:0|intcomma }}</span> ISK</div>
        </div>
    {% endif %}

    {% if character.skill_cost.total_amount_day %}
        <div class="row description-row">
            <div class="col-sm-6">{% trans "Current Day" %} - {% trans "Skillbook Cost" %}:</div>
            <div class='col-sm-4 text-end'><span class="text-warning">{{ character.skill_cost.total_amount_day|floatformat:0|intcomma }}</span> ISK</div>
        </div>
    {% endif %}

    {% if character.insurance_cost.total_amount_day %}
        <div class="row description-row">
            <div class="col-sm-6">{% trans "Current Day" %} - {% trans "Insurance Cost" %}:</div>
            <div class='col-sm-4 text-end'><span class="text-warning">{{ character.insurance_cost.total_amount_day|floatformat:0|intcomma }}</span> ISK</div>
        </div>
    {% endif %}

    {% if character.planetary_cost.total_amount_day %}
        <div class="row description-row">
            <div class="col-sm-6">{% trans "Current Day" %} - {% trans "Planetary Cost" %}:</div>
            <div class='col-sm-4 text-end'><span class="text-warning">{{ character.planetary_cost.total_amount_day|floatformat:0|intcomma }}</span> ISK</div>
        </div>
    {% endif %}
{% endif %}


<!--############################## SUMMARY Day #######################-->
{% if character.summary.total_current_day %}
    <hr>
    <div class="row description-row">
        <div class="col-sm-6">{% trans "Current Day" %} {% trans "Summary" %}:</div>
        <div class='col-sm-4 text-end'>
            <span class="text-warning">
            {{ character.summary.total_current_day|floatformat:0|intcomma }}
            </span> ISK
        </div>
    </div>
{% endif %}

{% if character.bounty.total_amount_day or character.mission.total_amount_day or character.mining.total_amount_day or character.contract_cost.total_amount_day or character.production_cost.total_amount_day or character.market_cost.total_amount_day or character.traveling_cost.total_amount_day or character.asset_cost.total_amount_day or character.skill_cost.total_amount_day or character.insurance_cost.total_amount_day or character.planetary_cost.total_amount_day or character.transaction.total_amount_day or character.contract.total_amount_day or character.donation.total_amount_day or character.insurance.total_amount_day %}
<hr>
{% endif %}
