<?php 
//ini_set('display_errors', 1);
//ini_set('display_startup_errors', 1);
//error_reporting(E_ALL);
include_once 'db_functions.php'; 
$db = new DB_Functions(); 
$json = $_REQUEST["soJSON"];
if (get_magic_quotes_gpc()){ 
	$json = stripslashes($json); 
}
//Decode JSON into an Array 
$data = json_decode($json,true);  
//Util arrays to create response JSON 
//print_r($data);
$a=array();

$uid = $data["uid"];
$retailer_code=$data["retailer_code"];
 $prodList = $data["part_List"];
//print_r($prodList);

//// get retailer basic details

//// store in db
$res = $db-> stockReturn($uid,$retailer_code,$prodList);
//Based on inserttion, create JSON response     
array_push($a,$res);

echo json_encode($a); 
?>