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


$para = $_GET["para"];
$series = $_GET["series"];

if ($para != "C") {
    $formname = 'Multiple E-Invoice Generation';
} else {
    $formname = 'Multiple E-Invoice Generation - Credit Note';
}
$action = "einvoicegen_fr.php";

$zseries = $_SESSION['user_series'];

$admin = $_SESSION["admin_" . $dbname];
$zdb = $_SESSION["zdbyear_" . $dbname];

$zyear = right($zdb, 4);
$mfrdate = getzdates($zyear, 'S');
$mtodate = getzdates($zyear, 'E');

$myyear = $_SESSION[$myyear];
mysqli_select_db($conn, $zdb);

include("includes/linkshead.php");
?>
<script>
    $(document).ready(function () {

        $("#excel").hide();
        $("#subpdf").hide();
    });
</script>

</head>
<body>
    <form action='<?= $action ?>' method='POST'>
        <!-- Default box -->
        <div class="row">
            <div class="col-lg-9 pad">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title" style="color :#05B2EA;"><?php Echo $formname; ?></h3>
                    </div>
                    <div class="panel-body">

<!--                        <div class='row'>
                            <div class='col-lg-5 col-md-3 col-sm-3 col-xs-3 pad text-right'>
                                <label class='label-control tmarg'>Series</label>
                            </div>
                            <div class="col-lg-1 col-md-3 col-sm-3 col-xs-3 pad">

                                <?php
                                if ($series != "") {
                                    ?>
                                <input type = "text" class = "form-control series" id = "series" name = "series" value = "<?php echo $series; ?>" readonly tabindex="-1">
                                <?php } else {
                                    ?>
                                    <select name="series" id="series" class="form-control select2" required>
                                        <option></option>
                                        <option value="LO">LOCAL</option>                                    
                                        <option value="DE">DEEMED</option>
                                        <option value="ON">ONLINE</option>

                                    </select>

                                <?php } ?>
                            </div>
                        </div>-->
                        <div class='row'>
                            <div class='col-lg-5 col-md-3 col-sm-3 col-xs-3 pad text-right'>
                                <label class='label-control tmarg'>Invoice Date</label>
                            </div>
                            <div class='col-lg-2 col-md-3 col-sm-3 col-xs-3 pad'>
                                <input type="date" class="form-control " id="date" name="invdate" value="<?php echo date("Y-m-d"); ?>" >
                                <input type="hidden" class="form-control " id="para" name="para" value="<?php echo $para; ?>" >
                            </div>
                        </div>

                    </div>
                    <div class="panel-footer">
                        <?php include("includes/but_rep.php"); ?>
                    </div>
                </div>
            </div>
        </div>
    </form>    
    <?php include("includes/linksfoot.php"); ?>
</body>
</html>
