<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>
		RASIO - POS
	</title>
	<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $this->baseUrl ?>/assets/thema/posr/css/pos.css?ver=<?php echo date("ymdHis") ?>">
	<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $this->baseUrl ?>/assets/thema/posr/css/pos_theme_black.css">
	<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $this->baseUrl ?>/assets/css/flexigrid/flexigrid.css">
	<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $this->baseUrl ?>/assets/css/jquery.apank.popUp.css">
	<script type="text/javascript" src="<?php echo $this->baseUrl ?>assets/js/jquery-1.7.2.min.js" ></script>
	<script type="text/javascript" src="<?php echo $this->baseUrl ?>assets/js/jquery-ui-1.8.19.custom.min.js" ></script>
	<script type="text/javascript" src="<?php echo $this->baseUrl ?>assets/js/jquery.shortcuts.min.js" ></script>
	<script type="text/javascript" src="<?php echo $this->baseUrl ?>assets/js/apank.js"></script>
	<script type="text/javascript" src="<?php echo $this->baseUrl ?>assets/js/jquery.meio.mask.js"></script>
	<script type="text/javascript" src="<?php echo $this->baseUrl ?>assets/js/accounting.js"></script>
	<script type="text/javascript" src="<?php echo $this->baseUrl ?>assets/js/md5.js"></script>
	<script type="text/javascript" src="<?php echo $this->baseUrl ?>assets/thema/posr/js/pos.js"></script>
	<script type="text/javascript" src="<?php echo $this->baseUrl ?>assets/js/flexigrid.js"></script>
	<script type="text/javascript" src="<?php echo $this->baseUrl ?>assets/js/md5.js"></script>
</head>
<body>
	<div id="_hedBill">
		<input class="_menu _back2" type="button" value="B A C K" onclick="location.href='<?php echo $this->baseUrl ?>application/index/MIS';">
		Print Jobs - <?php echo $this->data->sesi ?>
		<br>
		Pastikan halaman ini selalu dibuka di komputer yang melakukan print, halaman ini bisa dibiarkan buka di tab baru dan anda dapat tetap bekerja di POS utama tanpa masalah
	</div>
	<div id="_detBill">
		
	</div>
	<form id="postItem">
		<input type="hidden" id="sesi">
	</form>
	<input type="hidden" id="baseUrl" value="<?php echo $this->baseUrl ?>">
</body>
</html>
<script>
$(document).ready(function(){	
    $('#sesi').val('<?php echo $this->data->sesi ?>');
    
	_loadPrint = false;
	loadPrint = function(){
	    _sesi = $('#sesi').val();
		if(_loadPrint != false){
			_loadPrint.abort();
		}
		$('#_detBill').html('Loading...');
		
		_loadOrder = $.ajax({
			url: $('#baseUrl').val()+'posprint/loadPrint/&sesi='+_sesi,
			type : 'POST',
			data : $('#postItem').serialize(),
			success: function(data){
				$('#_detBill').html(data);
			}
		});
	}
	setInterval(loadPrint, 1500);
	
	_makeCheckPrint = false;
	makeCheckPrint = function(_kode, _status = "T"){
		if(_makeCheckPrint != false){
			_makeCheckPrint.abort();
		}
		
		_makeCheckPrint = $.ajax({
			url: $('#baseUrl').val()+'posprint/checkPrint/&no_print='+_kode+'&status='+_status,
			type : 'POST',
			data : $('#postItem').serialize(),
			success: function(data){}
		});
	}
})
</script>