{% extends '../template.html' %}
{% block subcontent %}
<h1>Report - Gaji Dokter Bulan {{tgl}}</h1>
<form>
	<span class="monthly">
		{% date monthly year[2018-2030] nodate %}
	</span>
	<input type="submit" value="Go"/>
	<button type="submit" name="xls" value="y" style="margin-left:30px" class="btn-success btn"><i class="far fa-file"></i></button>
</form>
{% for n, d in data %}
<br/><br/><br/>
<h3>{{ d.nama }} ({{ d.poli }}) - <a href="{% nav bendahara_gaji_dokterdetail %}?bulan={{tgl}}&dokter={{n}}">Lihat detail</a></h3>
<table class="data">
	<tr>
		<th rowspan="3" style="text-align:center;border:1px solid #ccc">Tgl</th>
		<th colspan="8" style="text-align:center;border:1px solid #ccc">Konsultasi</th>
		<th colspan="8" style="text-align:center;border:1px solid #ccc">Tindakan</th>
		<th rowspan="3" style="text-align:center;border:1px solid #ccc">Sub Total</th>
	</tr>
	<tr>
		<th colspan="2" style="text-align:center;border:1px solid #ccc">Dhuafa</th>
		<th colspan="2" style="text-align:center;border:1px solid #ccc">Khusus</th>
		<th colspan="2" style="text-align:center;border:1px solid #ccc">Umum</th>
		<th colspan="2" style="text-align:center;border:1px solid #ccc">MoU</th>
		<th colspan="2" style="text-align:center;border:1px solid #ccc">Dhuafa</th>
		<th colspan="2" style="text-align:center;border:1px solid #ccc">Khusus</th>
		<th colspan="2" style="text-align:center;border:1px solid #ccc">Umum</th>
		<th colspan="2" style="text-align:center;border:1px solid #ccc">MoU</th>
	</tr>
	<tr>
		<th style="width:10px;border:1px solid #ccc">px</th>
		<th style="width:100px;border:1px solid #ccc">nominal</th>
		<th style="width:10px;border:1px solid #ccc">px</th>
		<th style="width:100px;border:1px solid #ccc">nominal</th>
		<th style="width:10px;border:1px solid #ccc">px</th>
		<th style="width:100px;border:1px solid #ccc">nominal</th>
		<th style="width:10px;border:1px solid #ccc">px</th>
		<th style="width:100px;border:1px solid #ccc">nominal</th>
		<th style="width:10px;border:1px solid #ccc">px</th>
		<th style="width:100px;border:1px solid #ccc">nominal</th>
		<th style="width:10px;border:1px solid #ccc">px</th>
		<th style="width:100px;border:1px solid #ccc">nominal</th>
		<th style="width:10px;border:1px solid #ccc">px</th>
		<th style="width:100px;border:1px solid #ccc">nominal</th>
		<th style="width:10px;border:1px solid #ccc">px</th>
		<th style="width:100px;border:1px solid #ccc">nominal</th>
	</tr>
	{% for t, d2 in d.detail %}
	<tr>
		<td style="border:1px solid #ccc">{{t}}</td>
		<td>{{d2.k1px}}</td>
		<td style="text-align:right">{{d2.k1nominal | currency}}</td>
		<td>{{d2.k2px}}</td>
		<td style="text-align:right">{{d2.k2nominal | currency}}</td>
		<td>{{d2.k3px}}</td>
		<td style="text-align:right">{{d2.k3nominal | currency}}</td>
		<td>{{d2.k4px}}</td>
		<td style="text-align:right">{{d2.k4nominal | currency}}</td>
		<td>{{d2.t1px}}</td>
		<td style="text-align:right">{{d2.t1nominal | currency}}</td>
		<td>{{d2.t2px}}</td>
		<td style="text-align:right">{{d2.t2nominal | currency}}</td>
		<td>{{d2.t3px}}</td>
		<td style="text-align:right">{{d2.t3nominal | currency}}</td>
		<td>{{d2.t4px}}</td>
		<td style="text-align:right">{{d2.t4nominal | currency}}</td>
		<td style="text-align:right;border:1px solid #ccc">{{d2.subtotal | currency}}</td>
	</tr>
	{% endfor %}
	<tr>
		<td colspan="17" style="border:1px solid #ccc"><b>Total</b></td>
		<td style="text-align:right"><b>{{d.total | currency}}</b></td>
	</tr>
</table>
{% endfor %}
{% endblock %}
{% block script %}
<script type="text/javascript">
	$(document).ready(function() {
		menuSelected("mGaji","smDokter");
		$("select[name=monthly_month]").val("{{bln}}").change();
		$("select[name=monthly_year]").val("{{thn}}").change();
	});
</script>
{% endblock %}