<!DOCTYPE HTML>
<?php 
include('config.php');

$pagename = "Stok Produk";
$act = "view";
$act_desc = "Simpan Edit";

?>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title><?php echo $pagename?></title>
    <?php include('../../common/script_css.php');?>
	<script>
    function get_stock_his(){
		
		query = {
					fdate:$('#fdate').val(),
					tdate:$('#tdate').val(),
					pm:$('#pm_autoid').val(),
					outlet_id:$('#outlet_id').val(),
					ums:$('#ums').val()
				}
		$.post('stock_hisdata',query,function(data){
			$('#hisdata_output').html(data);
			})
		}

    $().ready(function(e) {
		get_stock_his();
	$('#fdate').datepicker({
    	format: 'dd/mm/yyyy',
	    startDate: '-3d'
	});	
		$('#tdate').datepicker({
    	format: 'dd/mm/yyyy',
	    startDate: '-3d'
	});	
	});
    </script>
</head>

</head>
<body>
<form id="iform">
    <div class="wrapper">
        <!-- Sidebar  -->
		<?php include('../../sys/sidenav.php');?>

        <!-- Page Content  -->
        <div id="content_wrapper">
			<?php include('../../sys/top_menu.php')?>


                <div id="main_content" class="px-3">
                	<div class="bg_white">
					<?php include('content.php')?>
                    </div>
                    <div class="bg_white" id="hisdata_output"></div>
                    <div class="bg_white px-2 py-2">
                    <input type="button" class="btn btn-danger btn-sm" value="Back" onclick="window.history.back()">
                    </div>
                </div>
            </div>
        </div>
        
    </div><!-- end wrapper -->
</form>
</body>

</html>