<!DOCTYPE HTML>
<?php 
$act = "add";
$pagename = "Input Purchase Order";
$act_desc = "Simpan Data";

include('config.php');

	$xbln = $bln + 0;
	$sql = "SELECT COUNT(*) as num FROM poheader WHERE YEAR(po_transdate) = '$thn'";
	$dcon = $conn->query($sql) or die($sql);
	$rs = $dcon->fetch_array();
	$transno 	= transno($rs['num'] + 1)."/PN/".$ar_month[$xbln]."/".$thn;
	$transdate = dtostr($tanggal);


?>
<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 type="text/javascript" src="../../lib/jquery-migrate-1.0.0.js"></script>
	<script type="text/javascript" src="local.js"></script>
	<link rel="stylesheet" href="../../lib/jquery.autocomplete.css">
    <script type="text/javascript" src="../../lib/jquery.autocomplete.js"></script>
    

    <script>
    $().ready(function(e) {

	    $('.select-autocomplete').select2();

	        add_detailrow();	
	
    });
	
    </script>
</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>
							<?php include('content_detail.php')?>
        	            </div>
                	    <div class="py-2 px-2" style="border-top:1px solid silver">
	            		    <input type="button" class="btn btn-sm btn-success" 
            	        	value="<?php echo $act_desc?>"  onclick="validation('save')">
	        	            <input type="hidden" name="act" value="<?php echo $act?>">
    		                <input type="hidden" name="autoid" id="autoid" value="<?php echo $autoid?>">
							<input type="button" class="btn btn-danger btn-sm" value="Back" onclick="dosubmit('index<?php echo $page_filter?>')">
            	        </div>
                    </div>
                </div>
            </div>
        </div>
        
    </div><!-- end wrapper -->
</form>
</body>

</html>