{% 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_income.total_amount_day or character.ess_income.total_amount_day or character.mission_income.total_amount_day or character.mining.total_amount_day %}
    {% if character.bounty_income.total_amount_day %}
        <div class="row description-row">
            <div class="col-sm-6">{% trans "Current Day" %} - {% trans "Ratting" %}:</div>
            <div class='col-sm-4 text-end'><span class="text-warning">{{ character.bounty_income.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 - {% trans "Ratting" %}:</div>
            <div class='col-sm-4 text-end'><span class="text-warning">{{ character.bounty_income.current_day_tick|floatformat:0|intcomma }}</span> ISK</div>
        </div>
    {% endif %}

    {% if character.ess_income.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_income.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" %} - ESS {% trans "Stolen" %}:</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_income.total_amount_day %}
        <div class="row description-row">
            <div class="col-sm-6">{% trans "Current Day" %} - {% trans "Mission Reward" %}:</div>
            <div class='col-sm-4 text-end'><span class="text-warning">{{ character.mission_income.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 %}

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

{% endif %}

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

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

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

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

    {% if character.insurance_income.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_income.total_amount_day|floatformat:0|intcomma }}</span> ISK</div>
        </div>
    {% endif %}

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

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

    {% if character.citadel_income.total_amount_day %}
        <div class="row description-row">
            <div class="col-sm-6">{% trans "Current Day" %} - {% trans "Citadel" %}:</div>
            <div class='col-sm-4 text-end'><span class="text-warning">{{ character.citadel_income.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.market_cost.total_amount_day %}
        <div class="row description-row">
            <div class="col-sm-6">{% trans "Current Day" %} - {% trans "Market 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.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.lp_cost.total_amount_day %}
        <div class="row description-row">
            <div class="col-sm-6">{% trans "Current Day" %} - {% trans "Loyality Point Cost" %}:</div>
            <div class='col-sm-4 text-end'><span class="text-warning">{{ character.lp_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.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_income.total_amount_day or character.mission_income.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.market_income.total_amount_day or character.contract_income.total_amount_day or character.insurance_income.total_amount_day or character.milestone_income.total_amount_day or character.donation_income.total_amount_day or character.incursion_income.total_amount_day %}
<hr>
{% endif %}
