<?php
include('../../sys/phpcore.inc');
include('../../sys/session.inc');
include('../../sys/master.php');

$navid = "Penjualan";
$pageid = "so";

$autoid = $conn->real_escape_string($_GET['id']);


if($autoid){
	$sql = "SELECT * FROM posheader WHERE pos_autoid = '$autoid'";
	$dcon 	= $conn->query($sql) or die($sql);
	$rs 	= $dcon->fetch_array();
	
	$transno 		= $rs['pos_transno'];
	$transdate 		= dtostr($rs['pos_transdate']);
	$order_type 	= dtostr($rs['pos_order_type']);
	$table_no 		= dtostr($rs['pos_tableno']);

	$gtotal = $rs['pos_gtotal'];
	$outlet_autoid 	= $rs['outlet_autoid'];



}


$sql_inv = "SELECT SUM(log_inqty -log_outqty) as stok, pm_autoid from invlog WHERE outlet_id = '$user_outlet' GROUP BY pm_autoid";
	$dcon_inv 	= $conn->query($sql_inv) or die($sql_inv);
	while($rs_inv 	= $dcon_inv->fetch_array()){
		$pm_id = $rs_inv['pm_autoid'];
		$_stok_qty[$pm_id] = $rs_inv['stok'];
		}
	

?>