<?php 
include "config.php";
session_start();
$user=$_SESSION['log'];
$ticket = $_POST['ticketedit'];
$vehicleno = $_POST['vehicleedit'];
$customer = $_POST['customeredit'];
$tripno = $_POST['tripedit'];
$delivery = $_POST['deliveryedit'];
$mattype = $_POST['matinedit'];
$product = $_POST['productedit'];
$salestype = $_POST['salestypeedit'];
$emptyweight = $_POST['emptyweightedit'];
$loadweight = $_POST['loadweightedit'];
$netweight = $_POST['netweightedit'];
$quantity = $_POST['quantityedit'];
$quantityori = $_POST['quantityeditori'];
$remark= $_POST['remarkedit'];
$entrydate =$_POST['entrydateedit'];
$entrytime =$_POST['entrytimeedit'];
$adjustment = $_POST['adjustmentedit'];
$financial_year = $_POST['financialyearedit'];

echo $entrydate;

              
             
//foreach ($productcode as $id => $value ){
    $update = "update single_transaction set status='deleted' where ticket = '$ticket'";
$sql = "insert into single_transaction (ticket,vehicleno,customer,trip,delivery,entrydate,entrytime,matentrytype,product,salestype,emptyweight,loadweight,netweight,quantity,quantityori,adjustment,remark,editby,edittime,editdate,status,financialyear) values('$ticket','$vehicleno','$customer','$tripno','$delivery','$entrydate','$entrytime','$mattype','$product','$salestype','$emptyweight','$loadweight','$netweight','$quantity','$quantityori','$adjustment','$remark','$user',CURTIME(),CURDATE(),'','$financial_year')";
echo $sql;
echo $update;
$upda = mysqli_query($connect,$update);
 $go = mysqli_query($connect,$sql);
// }
 header('Location:singleentry.php');

?>