<?php
include('config.php');
$quotation_no=$_POST['qtn'];
$sql="select * from quotation_details where quotation_no='".$quotation_no."'";
$query=mysqli_query($con,$sql);
$data1=array();
while($result= mysqli_fetch_array($query,MYSQLI_ASSOC)){
	if(is_null($result['freight'])){
		$result['freight']=0;
	}
	if(!is_numeric($result['freight'])){
		$result['freight']=0;
	}
    array_push($data1,$result);
    
}
$sql="select * from quotation_details_all where quotation_no='".$quotation_no."'";
$query=mysqli_query($con,$sql);
$data=array();
while($result= mysqli_fetch_array($query,MYSQLI_ASSOC)){
    array_push($data,$result);
    
}


echo json_encode(array(
    "cust_data"=>$data1,
        "product_data"=>$data

));



?>