<script type="text/javascript">	
$(document).ready(function() {	
	$("#tabs").tabs({selected:0});
	
	$("#hitung_brs").click(function(){
		var no  = 1;
				
		$.ajax({
			type	: "POST",
			url	    : "modul/reposting/hitung_rkj.php",
			data	: "no="+no,
			dataType: "json",
			success	: function(data){
				$("#t_jmlbrs").val(data.jmlbrs);
				$("#t_debet").val(data.debet);
				$("#t_kredit").val(data.kredit);
			}
		});		
	});
	
	$('#cek_balance').click(function(){
		var bulan = $("#t_bulan").val();
        var tahun = $("#t_tahun").val();
        
		$.ajax({
			type	: "POST",
			url	    : "modul/reposting/tampil_data_tdbl.php",
			data	: "bulan="+bulan+
			        "&tahun="+tahun,
			success	: function(data){				
				$("#tampil_data").html(data);
			}
		});
	});
	
	$("#post_rkj").click(function(){
		var no = 1;
		
		$.ajax({
			type	: "POST",
			url	    : "modul/reposting/post_rkj.php",
			data	: "no="+no,
			timeout	: 3000,
			beforeSend	: function(){		
				$("#info").html("<img src='loading.gif' />");			
			},				  
			success	: function(data){
				$("#info").html(data);				
			}
		});
	});
		
	$("#tutup").click(function(){
		document.location='?module=home';
	});	
});
</script>

<style type="text/css">
#info {
	font-size:12px;
	font-weight:bold;
	color:#F00;
}
</style>

<?php
echo "<div id='tabs'>";
	echo "<ul>
			<li><a href='#data'>Posting Ulang Data Jurnal</a></li>
		</ul>";
	  
	echo "<div id='data'>
		<div id='pencarian'>
			<table width='100%'>
				<tr>					
					<td><button id='hitung_brs'>Hitung Transaksi</button></td>
					<td>Record : <input type='text' id='t_jmlbrs' size='8'></td>
					<td>Total Debet : <input type='text' id='t_debet' size='16'></td>
					<td>Total Kredit : <input type='text' id='t_kredit' size='16'></td>
					<td>Bulan : <input type='text' id='t_bulan' size='2'></td>
					<td>Tahun : <input type='text' id='t_tahun' size='4'></td>
				</tr>
			</table>
			<table align='center'>
			    <tr>
					<td><button id='cek_balance'>Cek Tidak Balance</button>
					    <button id='post_rkj'>Posting Ulang</button>
						<button id='tutup'>Keluar</button>
					</td>
				</tr>
			</table>
		</div>

		<div id='tampil_data' align='center'></div>
	</div>";

	echo "<div id='info' align='center'></div>";

echo "</div>";
?>
