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

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

$formname = 'Multiple E-Invoice Generation - Credit Note';
//if ($saltype != "") {
//    $saltype = "R";
//} else {
//    $saltype = "P";
//}
//browse($saltype);
$action = "einvoicegencred_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'>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; ?>" >
                                <input type="hidden" class="form-control " id="saltype" name="saltype" value="<?php echo $saltype; ?>" >
                            </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>
