<?php 
session_start();
include('../includes/dbcon.php');

$str=" ";

$error=0;

$edate=date("Y-m-d");
$userid=$_SESSION['hrm_id'];


$inv_no= trim($_POST['inv_no']);
$fdis= trim($_POST['fdis']);
//echo $inv_no;
	
if (empty($fdis)){
	//$invval=0;
}

else
{

if ( mysqli_query($con,"update inv_temp_header set discount = $fdis where invd_id=$inv_no  ")or die(mysqli_error($con)))			
	{   

     echo "<script>document.location='inv_new1.php?inv_no=$inv_no '</script>";
	} 


}  /// enf of else


?>