<?php
include_once('database_connection.php');

if(isset($_GET['action']))
{

		if($_GET['action']=="geteVoucherType")
		{
			$ItemID=$_GET['ItemID'];
			$data=array();
	$sql="select ID,Name,StandardPrice2 as price,under,Attr1,Attr2 from inventory where ID=".$ItemID;
	$result=odbc_exec($connection, $sql) or die(odbc_error().$sql);
    while($row=odbc_fetch_array($result))
    {
    	$data['master'][]=$row;
    }
	$sql="select * from [eVoucher_Policy] where ItemID=$ItemID";
	$result=odbc_exec($connection, $sql) or die(odbc_error().$sql);
    while($row=odbc_fetch_array($result))
    {
	$data['details'][]=$row;

    }
    echo json_encode($data);
		}
}

?>