<?php
require('../config/dbcon.php');
if (isset($_POST["id"])) {
	$output = array();
	$query = "SELECT * FROM customer_mst WHERE id =" . $_POST["id"] . "";
	if (mysqli_query($connect, $query)) {
		$result = mysqli_query($connect, $query);
		while ($row = mysqli_fetch_array($result)) {
			$output['acc_type'] = $row["acc_type"];
			$output['customer_code'] = $row["customer_code"];
			$output['customer_name'] = $row["customer_name"];
			$output['cust_address_one'] = $row["cust_address_one"];
			$output['cust_address_two'] = $row["cust_address_two"];
			$output['cust_address_three'] = $row["cust_address_three"];
			$output['cust_place'] = $row["cust_place"];
			$output['cust_pin_code'] = $row["cust_pin_code"];
			$output['cust_st_code'] = $row["cust_st_code"];
			$output['cust_st_name'] = $row["cust_st_name"];
			$output['cont_person'] = $row["cont_person"];
			$output['cust_phone'] = $row["cust_phone"];
			$output['cust_mobile'] = $row["cust_mobile"];
			$output['cust_email'] = $row["cust_email"];
			$output['cust_gstno'] = $row["cust_gstno"];
			$output['cust_pan_no'] = $row["cust_pan_no"];
			$output['cust_aadhar_no'] = $row["cust_aadhar_no"];
			$output['tax_code'] = $row["tax_code"];
			$output['opening'] = $row["opening"];
			$output['debit'] = $row["debit"];
			$output['credit'] = $row["credit"];
			$output['clbalance'] = $row["clbalance"];
			$output['transporter_name'] = $row["transporter_name"];
			$output['bankname'] = $row["bankname"];
			$output['bankaccno'] = $row["bankaccno"];
			$output['bankaccname'] = $row["bankaccname"];
			$output['ifsccode'] = $row["ifsccode"];
			$output['due_days'] = $row["due_days"];
			$output['remarks'] = $row["remarks"];
		}
		echo json_encode($output);
	}
}
