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

$sql="select * from quotation_details_all where quotation_no='".$quotation_no."'";
$query=mysqli_query($con,$sql);
$data1=array();
while($result=mysqli_fetch_array($query,MYSQLI_ASSOC)){
   array_push($data1,$result) ;
    
}
echo json_encode(
        array(
            "data"=>$data,
             "production"=>$data1,
        )
        );
