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

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

if(isset($_REQUEST["flagqty"])){
    $vouchno        = $_REQUEST["vouchno"];
    $srno           = $_REQUEST["srno"];
    $actbatch       = $_REQUEST["actbatch"];
    $flag           = $_REQUEST["flag"];
    $flagqty        = $_REQUEST["flagqty"];
    $itemcode       = $_REQUEST["item"];

    
    mysqli_query($conn, "UPDATE `dumstock` SET `actbatch`='$actbatch', `flag`='$flag', `flagqty`='$flagqty', 
                        `itemcode`='$itemcode' WHERE `vouchno`='$vouchno' AND `srno`='$srno' AND `actbatch`='$actbatch'");
}