{% extends "base.html" %}
{% load ledger %}

{% block title %}Reports{% endblock %}

{% block content %}
<h2>Reports</h2>
<ul class='reports'>
	<li><a href="{% url profit_loss %}">Profit and Loss</a></li>
	<li><a href="{% url balance_sheet %}">Balance Sheet</a></li>
</ul>

<h3>Summary</h3>
<table class='alternating-rows'>
	<tr>
		<th>&nbsp;</th>
	{% for header in summary.headers %}
		<th>{{ header }}</th>
	{% endfor %}
	</tr>
	<tr class='o'>
		<td>
			<img class='icon' src='{{ MEDIA_URL }}images/icons/coins_add.png' style='height:16px; width:16px;' />
			Income
		</td>
	{% for sum in summary.revenue %}
		<td class='ledger number'>{{ sum|currency }}</td>
	{% endfor %}
	</tr>
	<tr class='e'>
		<td>
			<img class='icon' src='{{ MEDIA_URL }}images/icons/coins_delete.png' style='height:16px; width:16px;' />
			Expenses
		</td>
	{% for sum in summary.expenses %}
		<td class='ledger number'>{{ sum|currency }}</td>
	{% endfor %}
	</tr>
	<tr class='o'>
		<td>
			<img class='icon' src='{{ MEDIA_URL }}images/icons/coins.png' style='height:16px; width:16px;' />
			Net Profit
		</td>
	{% for sum in summary.totals %}
		<td class='ledger number'>{{ sum|currency }}</td>
	{% endfor %}
	</tr>
</table>
{% endblock %}