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

$formname = "VAT Report";
$action = "vatrep_fr.php";

$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");
?>
<style>
    .align{
        margin-left: -15px;
    }
</style>
</head>
<body>
    <div class="panel panel-widget forms-panel fiftyperc my-div width col-lg-6" >
        <div class="forms">
            <div class="form-grids widget-shadow" data-example-id="basic-forms"> 
                <div class="form-title">
                    <h4><?php echo $formname ?> </h4>
                </div>
                <form name="vatreg" class="validation" action="<?= $action ?>" method="post" >
                    <div class="row">
                        <div class="form-body">                            

                            <div class="form-group text-right">
                                <label class="col-sm-3 control-label">From Date</label>
                                <div class="col-sm-9">
                                    <div class="col-sm-6 align">
                                        <input type="date" class="form-control " id="date" name="frmdt" value="<?php echo $mfrdate ?>" >
                                    </div>
                                </div>
                            </div>
                            <div class="form-group text-right">
                                <label class="col-sm-3 control-label">To Date</label>
                                <div class="col-sm-9">
                                    <div class="col-sm-6 align">
                                        <input type="date" class="form-control " id="todt" name="todt" value="<?php echo $mtodate ?>" >
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3  text-right control-label">Type</label>
                                <div class="col-sm-9">
                                    <div class="col-sm-8 align">
                                        <select id="dtype" name="dtype" class="select2 form-control " style="height: 33px;">
                                            <option value="">All</option>
                                            <option value="1" selected="">With VAT</option>
                                            <option value="2">With No VAT</option>
                                            
                                        </select>
                                    </div>
                                </div>
                            </div>

                        </div>
                    </div>
                    <div class="row">
                        <?php include("includes/but_rep.php"); ?>
                    </div>
                </form> 
            </div>
        </div>
    </div>            
    <!--//grids-->
    <!--<script type="text/javascript">
    
        $(document).ready(function(){
        $('.date').mask('00/00/0000');
                $('.time').mask('00:00:00');
                $('.date_time').mask('00/00/0000 00:00:00');
                $('.cep').mask('00000-000');
                $('.mobile').mask('0000-0000');
                $('.phone_with_ddd').mask('(00) 0000-0000');
                $('.phone_us').mask('(000) 000-0000');
                $('.mixed').mask('AAA 000-S0S');
                $('.cpf').mask('000.000.000-00', {reverse: true});
                $('.money').mask('000.000.000.000.000,00', {reverse: true});
                $('.money2').mask("#.##0,00", {reverse: true});
                $('.ip_address').mask('0ZZ.0ZZ.0ZZ.0ZZ', {
        translation: {
        'Z': {
        pattern: /[0-9]/, optional: true
        }
        }
        });
                $('.ip_address').mask('099.099.099.099');
                $('.percent').mask('##0,00%', {reverse: true});
                $('.clear-if-not-match').mask("00/00/0000", {clearIfNotMatch: true});
                $('.placeholder').mask("00/00/0000", {placeholder: "__/__/____"});
                $('.fallback').mask("00r00r0000", {
        translation: {
        'r': {
        pattern: /[\/]/,
                fallback: '/'
        },
                placeholder: "__/__/____"
        }
        });
                $('.selectonfocus').mask("00/00/0000", {selectOnFocus: true});
                );
    </script>-->
    <!--//validator js-->
    <?php
    include("includes/linksfoot.php");
    ?>
</body>
</html>
