fix dividend view
This commit is contained in:
@@ -12,26 +12,60 @@
|
||||
<th>L.p.</th>
|
||||
<th>Country</th>
|
||||
<th>Income</th>
|
||||
<th>Cost</th>
|
||||
{% if taxes|first.cost is defined %}
|
||||
<th>Cost</th>
|
||||
{% endif %}
|
||||
{% if taxes|first.destiny_tax is defined %}
|
||||
<th>Origin tax</th>
|
||||
{% endif %}
|
||||
{% if taxes|first.tax_cost is defined %}
|
||||
<th>Deductable tax (15%)</th>
|
||||
{% endif %}
|
||||
{% if taxes|first.profit is defined %}
|
||||
<th>Profit/Loss</th>
|
||||
{% endif %}
|
||||
<th>Tax</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for tax in taxes %}
|
||||
{% if tax.country is defined %}
|
||||
{% set colspan = tax|length %}
|
||||
{% if tax.income > 0 %}
|
||||
<tr class="{% if tax.taxLoss < 0 %}table-danger{% else %}table-success{% endif %}">
|
||||
<tr class="{% if tax.profit is defined and tax.profit < 0 %}table-danger{% else %}table-success{% endif %}">
|
||||
<td>{{ loop.index }}</td>
|
||||
<td>{{ tax.country }}</td>
|
||||
<td>{{ tax.income }}zł</td>
|
||||
<td>{{ tax.cost }}zł</td>
|
||||
<td>{% if tax.taxLoss < 0 %} {{ tax.taxLoss }} {% else %} {{ tax.tax }} zł{% endif %}</td>
|
||||
<td>{{ tax.income|price }}</td>
|
||||
{% if tax.cost is defined %}
|
||||
<td>{{ tax.cost|price }}</td>
|
||||
{% endif %}
|
||||
{% if tax.destiny_tax is defined %}
|
||||
<td>{{ tax.destiny_tax|price }}</td>
|
||||
{% endif %}
|
||||
{% if tax.tax_cost is defined %}
|
||||
<td>{{ tax.tax_cost|price }}</td>
|
||||
{% endif %}
|
||||
{% if tax.profit is defined %}
|
||||
<td>{{ tax.profit|price }}</td>
|
||||
{% endif %}
|
||||
<td>{{ tax.tax|price }}</td>
|
||||
</tr>
|
||||
{% if tax.incomesArray is defined and tax.incomesArray|length > 0 %}
|
||||
{% set colspan = colspan-1 %}
|
||||
{% for incomePerc,value in tax.incomesArray %}
|
||||
<tr>
|
||||
<td>#</td>
|
||||
<td></td>
|
||||
<td>{{ incomePerc }}% - {{ value|price }}</td>
|
||||
<td colspan="3"></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<tr class="">
|
||||
<td colspan="4">Summary:</td>
|
||||
<td>{{ tax }}zł</td>
|
||||
<td colspan="{{ colspan-1 }}">Summary:</td>
|
||||
<td>{{ tax|price("PLN",0) }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
@@ -40,4 +74,12 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# {% if empty %}#}
|
||||
{# <div class="col col-md-6">#}
|
||||
{# {% for item in empty %}#}
|
||||
{# <div>{{ item }}</div>#}
|
||||
{# {% endfor %}#}
|
||||
{# </div>#}
|
||||
{# {% endif %}#}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user