add new table view
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
<div class="summaryTable">
|
||||
<div class="table-wrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>L.p.</th>
|
||||
<th>Country</th>
|
||||
<th>Income</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 key,tax in taxes %}
|
||||
{% if tax.country is defined %}
|
||||
{% set colspan = tax|length %}
|
||||
{% if tax.income > 0 %}
|
||||
<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|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 colspan="2"></td>
|
||||
<td>{{ incomePerc }}% - {{ value|price }}</td>
|
||||
<td colspan="3"></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% elseif key == "sum" %}
|
||||
{# <tr class="">#}
|
||||
{# <td colspan="{{ colspan-2 }}">Summary:</td>#}
|
||||
{# <td>{{ tax.profit|price("PLN",0) }}</td>#}
|
||||
{# <td>{{ tax.tax|price("PLN",0) }}</td>#}
|
||||
{# </tr>#}
|
||||
{% else %}
|
||||
<tr class="">
|
||||
<td colspan="{{ colspan-1 }}">Summary:</td>
|
||||
<td>{{ tax|price("PLN",0) }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2" class="foot-label">Podsumowanie</td>
|
||||
<td class="foot-label">{{ sum.profit|price("PLN",0) }}</td>
|
||||
<td class="foot-label">{{ sum.origin|price("PLN",0) }}</td>
|
||||
<td class="foot-label">{{ sum.destiny|price("PLN",0) }}</td>
|
||||
<td colspan="1"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="foot-label">Do zaplaty</td>
|
||||
<td class="foot-value" colspan="4">{{ sum.tax|price("PLN",0) }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{#{% if wynik.footNote %}#}
|
||||
<div class="note">Kwota do dopłaty w Polsce po uwzględnieniu podatku zapłaconego za granicą.</div>
|
||||
{#{% endif %}#}
|
||||
|
||||
<div class="actions">
|
||||
{# <button type="button" class="btn-accent" style="background: {{ wynik.accent }}">Eksportuj do PIT</button>#}
|
||||
<button type="button" class="btn-ghost" data-action="app#restart">Od nowa</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user