<?php 
include('accesscheck2.php');
require_once('Connections/courier.php'); 
require_once 'functions/functions.php';

mysql_select_db($database_courier, $courier);

$branches = mysql_query("SELECT * FROM branches WHERE type='branch' ORDER BY branch_name");
$report_types = mysql_query("SELECT * FROM reports WHERE typeofrep='salesreport'");
?>
<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">FRAMES AND ACCESSORIES REPORT GENERATION</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">Item Type</label>
                                    <div class="col-md-9">
                                        <select name="item_type[]" class="form-control" id="item_type" multiple="" style="height: 150px;">
                                            <option value="Optical Frame"> Frames </option>
                                            <option value="Optical Accessories"> Accessories </option>
                                        </select>
                                    </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">Branches</label>
                                        <div class="col-md-9">
                                            <select name="branches[]" class="form-control" id="branches" multiple="" style="height: 150px;">
                                                   <?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_frames_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>


