<?php 
session_start();
include 'dbc.php';

date_default_timezone_set("Asia/Karachi");

$userid=$_SESSION["userid"];
$id=$_POST["id"];
$ven_name=$_POST["ven_name"];
$date=$_POST["date"];
$acc_name_dr=$_POST["acc_name_dr"];
$month_name=$_POST["month_name"];
$username=$_POST["username"];
$amount=$_POST["amount"];
$wh_tax=$_POST["wh_tax"];
$chequeno=$_POST["chequeno"];
$bankname=$_POST["bankname"];
$remarks=$_POST["remarks"];
 $whamount=$amount * $wh_tax / 100;
	 $netrecamount=$amount - $whamount;



$sql = "update cashpaid set 
 date='$date',netamount='$netrecamount',wh_tax='$wh_tax',whamount='$whamount',remarks='$remarks' where id='$id' and user_id='$userid'";
$conn->query($sql);

header("location:Open_Payment.php");

?>
