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


$formname = "Salary Summary";
$action = "salsumm_fr.php";
$admin = $_SESSION["admin_" . $dbname];
$zdb = $_SESSION["zdbyear_" . $dbname];



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


$myyear = $_SESSION[$myyear];
$zroot = $_SESSION["zdbroot"];

include("includes/linkshead.php");
?>
<script src="MyScript/salpd_sc.js" type="text/javascript"></script>

</head>
<body>
    <form method='POST' action="<?= $action; ?>">
        <!-- Default box -->
        <div>
            <div class="col-lg-5 col-md-12 col-sm-12 col-xs-12  pad">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title"><?php Echo $formname; ?></h3>

                    </div>
                    <div class="panel-body">

                        <div class="row">
                            <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 text-right pad">
                                <label class="label-control marg">Employee</label>
                            </div>
                            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 pad">
                                <select class=' party form-control select2 empname' name='empname'>
                                    <option value=''></option>
                                    <?php
                                    $getcust = mysqli_query($conn, "SELECT custcode,accode, name FROM `accmast` where  grpcode = '009' AND active = '1'  ORDER BY name")or die(mysqli_error($conn));
                                    while ($fetcust = mysqli_fetch_array($getcust)) {
                                        Echo "<option value='$fetcust[accode]'>$fetcust[name]</option>";
                                    }
                                    ?>
                                </select>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 text-right pad">
                                <label class="label-control marg">Department</label>
                            </div>
                            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 pad">
                                <select class=' party form-control depart select2 dept' name='depart'>
                                    <option value=''></option>
                                    <?php
                                    $getcust = mysqli_query($conn, "SELECT code,  name FROM `dept` ORDER BY name")or die(mysqli_error($conn));
                                    while ($fetcust = mysqli_fetch_array($getcust)) {
                                        Echo "<option value='$fetcust[code]'>$fetcust[name]</option>";
                                    }
                                    ?>


                                </select>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 text-right pad">
                                <label class="label-control marg">Month</label>
                            </div>
                            <div class="col-lg-4 col-md-4 col-sm-6 col-xs-6 pad">
                                <select class="form-control  select2 mon monname" required="" name="month">
                                    <option value=""></option>
                                    <option value="1">January</option>
                                    <option value="2">February</option>
                                    <option value="3">March</option>
                                    <option value='4'>April</option>
                                    <option value="5">May</option>
                                    <option value="6">June</option>
                                    <option value="7">July</option>
                                    <option value="8">August</option>
                                    <option value="9">September</option>
                                    <option value="10">October</option>
                                    <option value="11">November</option>
                                    <option value="12">December</option>
                                </select>
                            </div>
                        </div>
                        
                        <div class="row">
                            <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 text-right pad">
                                <label class="label-control marg">Year</label>
                            </div>
                            <div class="col-lg-2 col-md-2 col-sm-6 col-xs-6 pad">
                                <input type="text" name="year" class="form-control year" value="" required>
                            </div>
                        </div>

                        
                        <div class="row">
                            <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 text-right pad">
                                <label class="label-control marg">Status</label>
                            </div>
                            <div class="col-lg-2 col-md-2 col-sm-6 col-xs-6 pad">
                                <select class=' party form-control select2' name='status'>
                                    <option value=''>Both</option>
                                    <option value='Y'>Paid</option>
                                    <option value='N'>Unpaid</option>

                                </select>
                            </div>
                        </div>

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


