<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="CLOSE" onclick="window.close();">
		<?php echo $this->data->meja->nm_merek ?>
	</div>
	<div id="_detBill">
		
	</div>
	<form id="postItem">
		<input type="hidden" id="kodemeja">
	</form>
	<input type="hidden" id="baseUrl" value="<?php echo $this->baseUrl ?>">
</body>
</html>
<script>
$(document).ready(function(){	
	$('#kodemeja').val('<?php echo $this->data->meja->kd_merek ?>');
	
	_loadOrder = false;
	loadOrder = function(){
		_meja = $('#kodemeja').val();
		if(_loadOrder != false){
			_loadOrder.abort();
		}
		$('#_detBill').html('Loading...');
		
		_loadOrder = $.ajax({
			url: $('#baseUrl').val()+'posr/loadOrder/&kode='+_meja,
			type : 'POST',
			data : $('#postItem').serialize(),
			success: function(data){
				$('#_detBill').html(data);
			}
		});
	}
	loadOrder();
	
	_makeCheckItem = false;
	makeCheckItem = function(_kode, _status = "T"){
		_meja = $('#kodemeja').val();
		if(_makeCheckItem != false){
			_makeCheckItem.abort();
		}
		$('#_detBill').html('Loading...');
		
		_makeCheckItem = $.ajax({
			url: $('#baseUrl').val()+'posr/checkItem/&kode='+_meja+'&no_item='+_kode+'&status='+_status,
			type : 'POST',
			data : $('#postItem').serialize(),
			success: function(data){
				$('#_detBill').html(data);
			}
		});
	}
})
</script>