<?php 
//ini_set('display_errors', 1);
//ini_set('display_startup_errors', 1);
//error_reporting(E_ALL);  
include_once 'db_functions.php';
$modelid=$_REQUEST['model_id'];

$db = new DB_Functions();     
$users = $db->getpartmaster($modelid);     
$a = array();     
$b = array(); 

if ($users != false){         
while ($row = mysqli_fetch_array($users)) 
{  
$mrp=$row["location_price"]*18/100;
$b["id"] = $row["id"];
$b["partcode"] = $row["partcode"];
$b["partname"] = $row["part_name"];
$b["vendor_partcode"] = $row["vendor_partcode"];
$price=$mrp+$row["location_price"];
$b["price"] =number_format((float)$price, 2, '.', ''); 
$b["avl_qty"] =0;

$b["status"]=$row["status"];

       
array_push($a,$b);         
}         
echo json_encode($a);     
} 
?>