<?php
include('db_connection.php');
$Mainclass=new DB_Controller();
$Dealer_Code=$_REQUEST['dealer'];

$Product=substr($_REQUEST['prd'],0,-4);

$Get_Dealer_Zone=$Mainclass->Fetch_individual_data('dealer_master',"Dealer_Zone","Order_Code='".$Dealer_Code."'");
$Get_Gold_Purity=$Mainclass->Fetch_individual_data('gold_products_master',"GoldPurity","Productid='".$Product."'");

$Purity=$Get_Gold_Purity['GoldPurity'];

$Zone=$Get_Dealer_Zone['Dealer_Zone'];
$Current_Date=date("Y-m-d");

//$condition="Zone='".$Zone."' and Karat='".$Purity."' and Entry_Date='".$Current_Date."'";
echo $condition="Karat='".$Purity."' and Entry_Date like '%".$Current_Date."%' and Dealer_Rate>0";
$Check_Rate_Added=$Mainclass->num_check("gold_rate_master","SLN",$condition);
if($Check_Rate_Added==0)
{
	$msg=1;
}
else
{
	$msg="0";
}
echo $msg;
?>