<?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['ctr'])){
    $godown = $_REQUEST["godown"];
    $series = $_REQUEST["series"];
    
    $gettran = mysqli_query($conn, "SELECT * FROM `rawsacn` WHERE `godown`='$godown' and `series`='$series' and `source`='OP'")or die(mysqli_error($conn));
    $ctr = 1;
    while ($tran = mysqli_fetch_object($gettran)) {
        $ctr++;
    }
    Echo $ctr;
}
?>