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

$zdb = $_SESSION["zdbyear_" . $dbname];
mysqli_select_db($conn, $zdb);
$formname = " Outstanding Receiveable";
$action = "osrecv_fr.php";
$hgrp = "R";
$group = "010";
include("includes/linkshead.php");
?>
<style>
    .align{
        margin-left: -15px;
    }
</style>
</head>
<body>
    <form name="salereg" class="validation" action="<?= $action ?>" method="post">

        <div class="panel panel-widget forms-panel my-div fiftyperc width col-lg-6" >
            <div class="panel panel-default">

                <div class="panel-heading">
                    <h3 class="panel-title"><?php echo $formname; ?></h3>
                    <div class="actions pull-right">
                        <i class="fa fa-chevron-down"></i>
                    </div>
                </div>
                <div class="panel-body">
                    <div class="row">
                        <label class="col-sm-3 control-label text-right">A/C Name</label>
                        <div class="col-sm-9">
                            <div class="col-sm-12 align">
                                <select class='form-control select2' name='acname' style="height:33px;">
                                    <option value=""></option>
                                    <?php
                                    $macc = mysqli_query($conn, "SELECT accode, `name` FROM `accmast`WHERE $group ORDER BY `name`") or die(mysqli_error($conn));
                                    while ($trow = mysqli_fetch_array($macc)) {
                                        echo "<option value='$trow[accode]'>$trow[name]</option>";
                                    }
                                    ?>
                                </select>
                            </div>
                        </div>

                    </div>
                    <div class="row">
                        <label class="col-sm-3 control-label text-right">As On Date</label>
                        <div class="col-sm-9">
                            <div class="col-sm-6 align">
                                <input type="date" id="frmdt" name="frmdt" class="form-control" style='height:33px;' value="<?php echo date("Y-m-d"); ?>" />  
                            </div>
                        </div>

                    </div>
                    <div class="row">    
                        <label class="col-sm-3 control-label text-right">Report Type</label>
                        <div class="col-sm-9">
                            <div class="col-sm-3 align">
                                <select name="dtype" class="form-control select2" style="width:110px;">
                                    <option value="1">Summary</option>
                                    <option value="2">Detail</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <label class="col-sm-2 control-label"></label>
                        <div class="col-sm-9">
                            <div class="col-sm-3 align">
                                <input type="hidden" name="hiddenval" class="form-control" value="<?= $hgrp ?>">
                            </div>
                        </div>
                    </div>

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

                    <?php include("includes/but_rep.php"); ?>
                </div>
            </div>
        </div>

        <?php
        include("includes/linksfoot.php");
        ?>
    </form> 
</body>
</html>
