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

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

$party = $_REQUEST["party"];
$vouchno = $_REQUEST["vouchno"];
$vouchdt = $_REQUEST["vouchdt"];

$getdata2 = mysqli_query($conn, "SELECT sum(amount)as amt FROM `actran` WHERE `accode`='$party' AND `date`<='$vouchdt' ") or die(mysqli_error($conn));
$row = mysqli_fetch_array($getdata2);


echo "$row[amt]";


?>