<?php session_start();
include('accesscheck2.php');
require_once('Connections/courier.php'); 
require_once 'functions/functions.php';
mysql_select_db($database_courier, $courier);
$report_types = mysql_query("SELECT * FROM reports WHERE typeofrep='storereport'");
$branches = mysql_query("SELECT * FROM branches ORDER BY branch_name ASC");

?>
<div class="page-bar">
                        <ul class="page-breadcrumb">
                            <li>
                                <i class="icon-home"></i>
                                <a href="index.html">Home</a>
                                <i class="fa fa-angle-right"></i>
                            </li>
                            <li>
                                <span>Report Generation</span>
                                <i class="fa fa-angle-right"></i>
                            </li>
                            <li>
                                <span>Sales Report</span>
                            </li>
                        </ul>
                        <div class="page-toolbar">
                            <div class="btn-group pull-right">
                                <button type="button" class="btn btn-fit-height grey-salt dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-delay="1000" data-close-others="true"> Actions
                                    <i class="fa fa-angle-down"></i>
                                </button>
                                <ul class="dropdown-menu pull-right" role="menu">
                                    <li onclick="getstep('<?php echo $action; ?>');">
                                        <a href="#">
                                            <i class="icon-refresh"></i> Refresh</a>
                                    </li>
                                </ul>
                            </div>
                        </div>
</div>

<div class="row">
    <div class="col-lg-12 col-md-12 col-xs-12 col-sm-12">
        <div class="portlet light ">
            <div class="portlet-title">
                <div class="caption">
                    <span class="caption-subject bold uppercase font-dark">STORE REPORT</span>
                </div>
            </div>
            <div class="portlet-body form">
                 <form role="form" class="form-horizontal">
                    <div class="form-body">
                       <div class="row">
                            <div class="col-lg-12 col-xs-12 col-md-12">
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label class="col-md-3 control-label">Start Date</label>
                                        <div class="col-md-9">
                                             <input readonly="" required="" id="form_start_date" name="start_date" type="text" class="form-control date_time_picker" placeholder="Start Date">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-md-3 control-label">End Date</label>
                                        <div class="col-md-9">
                                            <input readonly="" required="" id="form_end_date" name="end_date" type="text" class="form-control date_time_picker" placeholder="End Date">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label class="col-md-3 control-label">Report Type</label>
                                        <div class="col-md-9">
                                            <table class="table table-bordered table-striped">
                                                <tr>
                                                    <td></td>
                                                    <td>Report Name</td>
                                                </tr>
                                                <?php
                                                $i=1;
                                                while($row = mysql_fetch_assoc($report_types)){ ?>
                                                <tr>
                                                    <td style="text-align: center;"><input type="radio" name="report_type" value="<?php echo $row['reportcode'].'@@@'.$row['reportname']; ?>"></td>
                                                   <td><?php echo $row['reportname']; ?></td>
                                                   </tr>
                                              <?php $i++; } ?>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                       
                        <div class="row">
                            <div class="col-lg-12 col-xs-12 col-md-12">
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label class="col-md-3 control-label">Branch Name</label>
                                        <div class="col-md-9">
                                            <select name="branch_id" class="form-control" id="branch_id" >
                                                <option selected="" value="cash"> Select Branch </option>
                                                <?php
                                                    while($row = mysql_fetch_assoc($branches)){ ?>
                                                        <option value="<?php echo $row['id'];?>"><?php echo $row['branch_name'];?></option>
                                                    <?php } ?>
                                            </select>
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>

                    </div>
                     <div class="form-actions">
                         <div class="row">
                             <div class="col-md-offset-3 col-md-9">
                                 <button type="submit" class="btn green" onclick="printReport('reports/print_store_report.php');return false;">Print Report <i class="fa fa-print"></i> </button>
                                 <button type="reset" class="btn default">Reset Selection  <i class="fa fa-refresh"></i> </button>
                             </div>
                         </div>
                     </div>
                 </form>
            </div>
        </div>
    </div>
</div>


