<?php
	$faktur = "";
	$faktur = $this->session->flashdata('faktur');
?> 

<!-- Widget ID (each widget will need unique ID)-->
<div class="jarviswidget" id="wid-id-6" data-widget-editbutton="false" data-widget-custombutton="false" data-widget-deletebutton="false">
	<!-- widget options:
		usage: <div class="jarviswidget" id="wid-id-0" data-widget-editbutton="false">
		
		data-widget-colorbutton="false"	
		data-widget-editbutton="false"
		data-widget-togglebutton="false"
		data-widget-deletebutton="false"
		data-widget-fullscreenbutton="false"
		data-widget-custombutton="false"
		data-widget-collapsed="true" 
		data-widget-sortable="false"
		
	-->
	<header>
		<span class="widget-icon"> <i class="fa fa-edit"></i> </span>
		<h2>Transaksi Uang Masuk</h2>		
	</header>

	<!-- widget div-->
	<div>
		
		<!-- widget edit box -->
		<div class="jarviswidget-editbox">
			<!-- This area used as dropdown edit box -->
			
		</div>
		<!-- end widget edit box -->
		
		<!-- widget content -->
		<div class="widget-body no-padding">
			<br>
			<div class="col-sm-12">
				<div class="alert alert-block">
					<!--<a class="close" href="#" data-dismiss="alert">×</a>-->
					<h4 class="alert-heading" style="color:black;" >Transaksi Sukses !</h4>
					<p class="text-align-left">
						<br>
						<a class="btn btn-sm btn-default" href="#kas_uang_keluar">
							<strong>Kembali</strong>
						</a>
						<?php 
							if ($faktur != "") {
						?>
						<a class="btn btn-sm btn-default" href="javascript:void(0)"  onclick="cetakFaktur('<?php echo $faktur; ?>')" >
							<strong>Cetak</strong>
						</a>
						<?php  
												} 
						?>
					</p>
				</div>				
			</div>
		</div>
		<!-- end widget content -->
		
	</div>
	<!-- end widget div -->
				
</div>

<script>
	function cetakFaktur(noFaktur) {
		var urlFaktur = '<?php echo base_url(); ?>index.php/kas_uang_keluar/printFaktur?faktur='+noFaktur;
		// redirect
		console.log(urlFaktur);
		//window.location = urlExport;
		window.open(urlFaktur,'_blank');
	}
</script>