<?php
require("../connection.php");
include("../user.php");

$id = $_REQUEST['id'];
$ho_access = $_SESSION['ha'];

$item_details = mysqli_fetch_array(mysqli_query($con, "SELECT * FROM item_master WHERE id='$id' AND status=0"));

$response = [
    'division'   => $item_details['division'],
    'location'   => $item_details['branch'],     // or $item_details['location'] if needed
    'department' => $item_details['department']
];

echo json_encode($response);
?>
