{% extends '../template.html' %}
{% block subcontent %}
<h2>Keuangan - Neraca {{tahun}}</h2>
<br/>
<h3>
	<table>
		<tr>
			<td>Pilih Tahun Buku :</td>
			<td>
				<select id="tahun" tabindex="-1">
					{% for t in listTahun %}
					<option value="{{t.tahun}}">{{t.tahun}}</option>
					{% endfor %}
				</select>
			</td>
		</tr>
	</table>
</h3>
<br/><br/>
{% if data.length > 0 %}
<table cellpadding="0" cellspacing="0" border="0" style="padding-left:30px">
	<tr>
		<td style="vertical-align:top;padding-right:50px;border-right:dotted 1px gray">
			<table cellpadding="5" cellspacing="0" border="0">
				{% for j in data.jenisdebit %}
				<tr>
					<td colspan=3><b>{{j.nama}}</b></td>
				</tr>
				{% for row in j.akun %}
				<tr>
					<td style="width:60px;padding-left:20px">{{row.kode}}</b></td>
					<td style="width:200px;">{{row.nama}}</td>
					<td style="width:80px;text-align:right">{%if row.nilai == 'minus'%}<span style="color:red">({{row.total | currency}})</span>{%else%}{{row.total | currency}}{%endif%}</td>
				</tr>
				{% endfor %}
				<tr>
					<td colspan=2 style="padding-bottom:50px"><b>SUBTOTAL</b></td>
					<td style="text-align:right;padding-bottom:50px;border-top:solid 1px gray"><b>{{j.total | currency}}</b></td>
				</tr>
				{% endfor %}
			</table>
		</td>
		<td style="vertical-align:top;padding-left:50px">
			<table cellpadding="5" cellspacing="0" border="0">
				{% for j in data.jeniskredit %}
				<tr>
					<td colspan=3><b>{{j.nama}}</b></td>
				</tr>
				{% for row in j.akun %}
				<tr>
					<td style="width:60px;padding-left:20px">{{row.kode}}</b></td>
					<td style="width:200px;">{{row.nama}}</td>
					<td style="width:80px;text-align:right">{%if row.nilai == 'minus'%}<span style="color:red">({{row.total | currency}})</span>{%else%}{{row.total | currency}}{%endif%}</td>
				</tr>
				{% endfor %}
				<tr>
					<td colspan=2 style="padding-bottom:50px"><b>SUBTOTAL</b></td>
					<td style="text-align:right;padding-bottom:50px;border-top:solid 1px gray"><b>{{j.total | currency}}</b></td>
				</tr>
				{% endfor %}
			</table>
		</td>
	</tr>
	<tr>
		<td style="vertical-align:top;padding-right:50px">
			<table cellpadding="5" cellspacing="0" border="0" style="width:100%;font-size:16px">
				<tr>
					<td><b>TOTAL</b></td>
					<td style="text-align:right"><b>{{data.totaldebit | currency}}</b></td>
				</tr>
			</table>
		</td>
		<td style="vertical-align:top;padding-left:50px">
			<table cellpadding="5" cellspacing="0" border="0" style="width:100%;font-size:16px">
				<tr>
					<td><b>TOTAL</b></td>
					<td style="text-align:right"><b>{{data.totalkredit | currency}}</b></td>
				</tr>
			</table>
		</td>
	</tr>
</table>
{% else %}
	- Data Masih Kosong -<br/><br/>
{% endif %}
<br/><br/><br/>
{% endblock %}
{% block script %}
<script type="text/javascript">
	$(document).ready(function() {
		menuSelected("mLaporan","smNeraca");
		$('#tahun').val('{{tahun}}');
		$('#tahun').on('change',function() {
			window.location = ("{% nav bendahara_keuangan_neraca %}?tahun="+$('#tahun').val());
		});
	});
</script>
{% endblock %}