<?php
require("includes/check_auth_user.php");
require("includes/dbconnect.php");
include ('includes/function.php');

$zdb = $_SESSION["zdbyear_" . $dbname];
mysqli_select_db($conn, $zdb);

$myvouch  = $_REQUEST["myvouch"];
$visano  = trim($_REQUEST["visano"]);
//browse($voucher);
//browse($visano);

$getbroker1 = mysqli_query($conn, "SELECT `visano`,`myvouch`,DATE_FORMAT(`vouchdt`, '%d-%m-%Y') as vouchdt,`manualno` FROM `visamain` WHERE visano = '$visano' and `myvouch` != '$myvouch'") or die(mysqli_error($conn));
$r = mysqli_fetch_array($getbroker1); 
//browse($r);
     $myvouch = $r['myvouch'];
     $vouchdt = $r['vouchdt'];
     $manualno = $r['manualno'];
     
header("Content-type: application\json");
echo json_encode($r);

?>