<?php 
	$header_file=APPPATH.'views/include/header.php';
	require($header_file);
	$sidenav_file=APPPATH.'views/include/sidenav.php';
	require($sidenav_file);	?>
  
    <!-- BEGIN: Content-->
<div class="app-content content">
    <div class="content-overlay"></div>
        <div class="content-wrapper">
            <div class="content-header row">
              <div class="content-header-left col-md-12 col-12 mb-2 breadcrumb-new">
                <h3 class="content-header-title mb-0 d-inline-block">Report</h3>
                <div class="row breadcrumbs-top d-inline-block">
                  <div class="breadcrumb-wrapper col-12">
                    <ol class="breadcrumb">
                      <li class="breadcrumb-item"><a href="#">Home</a>
                      </li>
                      <li class="breadcrumb-item"><a href="#">Report</a>
                      </li>
                      <li class="breadcrumb-item active">Product Tax Issue Report
                      </li>
                    </ol>
                  </div>
                </div>
              </div>
            </div>
            <div class="content-body"><!-- Basic form layout section start -->
                <section id="basic-form-layouts">
                    <div class="row justify-content-md-center">
                        <div class="col-md-12">
                            <div class="card">
                                <!--/* search_issueReport*/exportIssueReport-->
                                <div class="card-content collapse show">
                                    <div class="card-body">
                                        <form method="post" autocomplete="off" action="<?php echo site_url('ExcelReport/search_issueReportPRev');?>" method="POST">
                                            <div class="row justify-content-md-center">
                                                <?php $umane = $_SESSION['username']; ?>
                                                <div class="col-md-3">
                                                    <div class="form-group">
                                                        <input class="form-control pickadate datepicker picker__input picker__input--active" type="text" name="from_date"  id="from_date" required data-uk-datepicker="{format:'DD-MM-YYYY'}" placeholder="From Date" >
                                                    </div>
                                                </div>
                                                <div class="col-md-3">
                                                    <div class="form-group">
                                                        <input class="form-control pickadate datepicker picker__input picker__input--active" type="text" name="to_date"  id="to_date" required data-uk-datepicker="{format:'DD-MM-YYYY'}" placeholder="To Date">
                                                        <input class="form-control " type="hidden" name="report_type"  id="report_type"  value="product_tax">
                                                    
                                                    </div>
                                                </div>
                                                <!--<div class="col-md-2">
                                                    <div class="form-group">
                                                        <select id="report_type" name="report_type" class="select2" >
                                                            <option value="">Select</option>
                                                            <option value="product_dc">Product DC Report</option>
                                                            <option value="product_tax">Product Tax Report</option>
                                                            <option value="item_dc">Item DC Report</option>
                                                            <option value="item_tax">Item Tax Report</option>
                                                        </select>
                                                    </div>
                                                </div>-->
                                                <div class="col-md-2">
                                                    <div class="form-group">
                                                        <select id="branch" name="branch" class="form-control select2" >
                                                            <option value="">Branch</option>
                                                            <option value="All">All</option>
                                                            <?php  foreach($outlet as $row)
                                                            {
                                                            ?>
                                                            <option value="<?php echo $row->outlet; ?>"><?php echo $row->outlet; ?></option>
                                                            <?php
                                                            } 
                                                            ?>
                                                        </select>
                                                    </div>
                                                </div>
                                                <div class="col-md-2">
                                                    <div class="form-group">
                                                        <select name="item_name" id="item_name" class="form-control select2" >
                                                            <option value="">Select Item</option>
                                                            <option value="All">All</option>
                                                            <?php  foreach($items as $row1)
                                                            {
                                                            ?>
                                                            <option value="<?php echo $row1->rname ?>"><?php echo $row1->rname ?></option>
                                                            <?php
                                                            } 
                                                            ?>
                                                        </select>
                                                    </div>
                                                </div>
                                                <div class="col-md-1">
                                                    <div class="form-group">
                                                        <input type="submit" name="submit" class="btn btn-primary " value="Search">
                                                    </div>
                                                </div>
                                            </div>
                                        </form>
                                        <div class="col-sm-12">
                                            <div class="table-responsive">
                                                <?php
                                                if(isset($_POST['submit'])) {
                                                ?>
                                
<?php
if (isset($result_display)) {
    //echo "<p><u>Result</u></p>";
    if ($result_display == 'No record found !') {
        echo $result_display;
    } else {
        ?>
        <div class="row">
                                    <div class="col-sm-2">
                                        <input type="text" name="from_date" id="from_date" class="form-control" readonly value="<?php echo $_POST['from_date']; ?>">
                                    </div>
                                    <div class="col-sm-2">	
                                        <input type="text" name="to_date" id="to_date" class="form-control" readonly value="<?php echo $_POST['to_date']; ?>">
                                    </div>
                                    <div class="col-sm-2">
                                        <input type="text" name="outlet_name" id="outlet_name1" class="form-control" readonly value="<?php echo $report_type; ?>">
                                    </div>
                                    <div class="col-sm-3">
                                        <input type="text" name="outlet_name" id="outlet_name1" class="form-control" readonly value="<?php echo $branch; ?>">
                                    </div>
                                    <div class="col-sm-3">
                                        <input type="text" name="outlet_name" id="outlet_name1" class="form-control" readonly value="<?php echo $item_name; ?>">
                                    </div>
                                </div>
        <?php
        
        if(isset($report_type) == 'product_tax')
        {
            if($branch == 'All' && $item_name == '')
            {
                //$query=$this->db->query("SELECT P.`invoice_no` as DC_NO,P.issue_date,sum(PI.basic_price) as basic_price,P.`outlet`,round(sum(CASE WHEN PI.`tax` = '0' THEN PI.basic_price ELSE 0 END),3) AS basic_0,round(sum(CASE WHEN PI.`tax` = '0' THEN PI.`tax_amount` ELSE 0 END),3) AS Tax_0,round(sum(CASE WHEN PI.`tax` = '5' THEN PI.basic_price ELSE 0 END),3) AS basic_5,round(sum(CASE WHEN PI.`tax` = '5' THEN PI.`tax_amount` ELSE 0 END),3) AS Tax_5,round(sum(CASE WHEN PI.`tax` = '12' THEN PI.basic_price ELSE 0 END),3) AS basic_12,round(sum(CASE WHEN PI.`tax` = '12' THEN PI.`tax_amount` ELSE 0 END),3) AS Tax_12,round(sum(CASE WHEN PI.`tax` = '18' THEN PI.basic_price ELSE 0 END),3) AS basic_18,round(sum(CASE WHEN PI.`tax` = '18' THEN PI.`tax_amount` ELSE 0 END),3) AS Tax_18,sum(PI.total_price) as total_price,P.issue_id FROM product_issues_creation P inner join product_issues_item PI on P.issue_id=PI.issue_id where P.`issue_date` between '$f_date' AND '$t_date' and P.invoice_type='tax_invoice23'  group by P.`issue_id`");
                //and P.issue_status!='Cancel' <h1>!TET</h1>
?>
            
            <table id="example" class="table table-striped table-bordered ">
                <thead class="thead-dark">
                    <tr>
                        <th>Sl No</th>
                        <th>Tax No</th>
                        <th>Date</th>
                        <th>Outlet</th>
                        <!--<th>Basic Price</th>-->
                        <th>Basic 0</th>
                        <th>Tax 0</th>
                        <th>Basic 5</th>
                        <th>Tax 5</th>
                        <th>Basic 12</th>
                        <th>Tax 12</th>
                        <th>Basic 18</th>
                        <th>Tax 18</th>
                        <th>Total</th>
                    </tr>
                </thead>
                <tbody>
                    <?php
                    $i=1;
                    foreach ($result_display as $record) { 
                    ?>
                        <tr >
                            <td><span ><?php echo $i; ?></span></td>
                            <td><span ><?php echo $record['DC_NO'] ?></span></td>
                            <td ><span ><?php echo $record['issue_date']; ?></span></td>
                            <td ><span ><?php //echo $record['outlet'];
                            $oname = $record['outlet'];
								//echo $oname;
								$query = $this->db->query("select * from address where outlet='$oname'");
        						foreach($query->result_array() as $row)
        						$org_names=$row['org_name'];
        						echo $org_names;
                            
                            ?></span></td>
                            <!--<td ><span ><?php 
                                //echo number_format((float)$record['basic_price'], 2, '.', '');
                                //echo $record['basic_price']; ?></span></td>-->
                            <td ><span ><?php echo number_format((float)$record['basic_0'], 2, '.', '');?></span></td>
                            <td ><span ><?php echo number_format((float)$record['Tax_0'], 2, '.', ''); ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['basic_5'], 2, '.', '');  ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['Tax_5'], 2, '.', ''); ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['basic_12'], 2, '.', ''); ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['Tax_12'], 2, '.', ''); ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['basic_18'], 2, '.', ''); ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['Tax_18'], 2, '.', '');    ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['total_price'], 2, '.', ''); ?></span></td>
                        </tr>
                    <?php
                    $i++;
                    } ?>
                </tbody>
            </table>
            <?php	
            }
            else if($branch == 'All' && $item_name != ''){
            //$query = $this->db->query("SELECT PI.`issue_item_name` as product_name,ANY_VALUE(P.`outlet`) as outlet_name,ANY_VALUE(sum(PI.`issued_qty`)) as quantity,ANY_VALUE(sum(PI.`issued_qty`)*PI.total_price) as total FROM product_issues_creation P inner join product_issues_item PI on P.issue_id=PI.issue_id where P.`issue_date` between '$f_date' AND '$t_date' and P.invoice_type='tax_invoice23'  PI.issue_item_name='$product_name'  group by P.outlet");
            //and P.issue_status!='Cancel' v <h1>!sdsdD</h1>
            ?>
               
                <table id="example2" class="table table-striped table-bordered ">
                    <thead class="thead-dark">
                        <tr>
                            <th>Sl No</th>
                            <th>Product Name</th>
                            <th>Outlet</th>
                            <th>Quantity</th>
                            <th>Price</th>
                            <th>Basic Price</th>
                            <th>Tax </th>
                            <th>Tax Amt</th>
                            <th>Total</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php
                        $i=1;
                        foreach ($result_display as $record) { 
                        ?>
                        <tr >
                            <td><span ><?php echo $i; ?></span></td>
                            <td><span ><?php echo $record['product_name'] ?></span></td>
                            <td ><span ><?php //echo $record['outlet_name'];
                             $oname = $record['outlet_name'];
								//echo $oname;
								$query = $this->db->query("select * from address where outlet='$oname'");
        						foreach($query->result_array() as $row)
        						$org_names=$row['org_name'];
        						echo $org_names;
                            
                            ?></span></td>
                            <td ><span ><?php echo $record['quantity']; ?></span></td>
                            <td ><span ><?php echo $record['price']; ?></span></td>
                            <td ><span ><?php   echo number_format((float)$record['basic'], 2, '.', ''); ?></span></td>
                            <td ><span ><?php echo $record['tax']; ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['tax_amt'], 2, '.', '');  ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['total'], 2, '.', ''); ?></span></td>
                        </tr>
                        <?php
                        $i++;
                        } ?>
                    </tbody>
                </table>
            <?php
            }
            else if($branch != 'All' && $item_name == 'All')
            {
                //$query = $this->db->query("SELECT PI.`issue_item_name` as product_name,ANY_VALUE(P.`outlet`) as outlet_name,ANY_VALUE(sum(PI.`issued_qty`)) as quantity,ANY_VALUE(sum(PI.`issued_qty`)*PI.total_price) as total FROM product_issues_creation P inner join product_issues_item PI on P.issue_id=PI.issue_id where P.`issue_date` between '$f_date' AND '$t_date' and P.outlet='$outlet_name' and P.invoice_type='tax_invoice23'  group by PI.issue_item_name");
                //and P.issue_status!='Cancel'  <h1>!allnulll</h1>
            ?>
               
                 <table id="example2" class="table table-striped table-bordered ">
                    <thead class="thead-dark">
                        <tr>
                            <th>Sl No</th>
                            <th>Product Name</th>
                            <th>Outlet</th>
                            <th>Quantity</th>
                            <th>Price</th>
                            <th>Basic Price</th>
                            <th>Tax </th>
                            <th>Tax Amt</th>
                            <th>Total</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php
                        $i=1;
                        foreach ($result_display as $record) { 
                        ?>
                        <tr >
                            <td><span ><?php echo $i; ?></span></td>
                            <td><span ><?php echo $record['product_name'] ?></span></td>
                            <td ><span ><?php //echo $record['outlet_name'];
                                $oname = $record['outlet_name'];
								//echo $oname;
								$query = $this->db->query("select * from address where outlet='$oname'");
        						foreach($query->result_array() as $row)
        						$org_names=$row['org_name'];
        						echo $org_names;
                            ?></span></td>
                            <td ><span ><?php echo $record['quantity']; ?></span></td>
                            <td ><span ><?php echo $record['price']; ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['basic'], 2, '.', ''); ?></span></td>
                            <td ><span ><?php echo $record['tax']; ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['tax_amt'], 2, '.', ''); ?></span></td>
                            <td ><span ><?php  echo number_format((float)$record['total'], 2, '.', '');  ?></span></td>
                        </tr>
                        <?php
                        $i++;
                        } ?>
                    </tbody>
                </table>
            <?php
            }
            else if($branch != 'All' && $item_name == ''){
                //$query=$this->db->query("SELECT P.`invoice_no` as DC_NO,P.issue_date,sum(PI.basic_price) as basic_price,P.`outlet`,round(sum(CASE WHEN PI.`tax` = '0' THEN PI.basic_price ELSE 0 END),3) AS basic_0,round(sum(CASE WHEN PI.`tax` = '0' THEN PI.`tax_amount` ELSE 0 END),3) AS Tax_0,round(sum(CASE WHEN PI.`tax` = '5' THEN PI.basic_price ELSE 0 END),3) AS basic_5,round(sum(CASE WHEN PI.`tax` = '5' THEN PI.`tax_amount` ELSE 0 END),3) AS Tax_5,round(sum(CASE WHEN PI.`tax` = '12' THEN PI.basic_price ELSE 0 END),3) AS basic_12,round(sum(CASE WHEN PI.`tax` = '12' THEN PI.`tax_amount` ELSE 0 END),3) AS Tax_12,round(sum(CASE WHEN PI.`tax` = '18' THEN PI.basic_price ELSE 0 END),3) AS basic_18,round(sum(CASE WHEN PI.`tax` = '18' THEN PI.`tax_amount` ELSE 0 END),3) AS Tax_18,sum(PI.total_price) as total_price,P.issue_id FROM product_issues_creation P inner join product_issues_item PI on P.issue_id=PI.issue_id where P.`issue_date` between '$f_date' AND '$t_date' and P.outlet='$outlet_name' and P.invoice_type='tax_invoice23'  group by P.`issue_id`");
                //and P.issue_status!='Cancel' <h1>!TEST</h1>
            ?>
            
            <table id="example" class="table table-striped table-bordered ">
                <thead class="thead-dark">
                    <tr>
                        <th>Sl No</th>
                        <th>Tax No</th>
                        <th>Date</th>
                        <th>Outlet</th>
                       <!-- <th>Basic Price</th>-->
                        <th>Basic 0</th>
                        <th>Tax 0</th>
                        <th>Basic 5</th>
                        <th>Tax 5</th>
                        <th>Basic 12</th>
                        <th>Tax 12</th>
                        <th>Basic 18</th>
                        <th>Tax 18</th>
                        <th>Total</th>
                    </tr>
                </thead>
                <tbody>
                    <?php
                    $i=1;
                    foreach ($result_display as $record) { 
                    ?>
                        <tr >
                            <td><span ><?php echo $i; ?></span></td>
                            <td><span ><?php echo $record['DC_NO'] ?></span></td>
                            <td ><span ><?php echo $record['issue_date']; ?></span></td>
                            <td ><span ><?php //echo $record['outlet'];
                            $oname = $record['outlet'];
								//echo $oname;
								$query = $this->db->query("select * from address where outlet='$oname'");
        						foreach($query->result_array() as $row)
        						$org_names=$row['org_name'];
        						echo $org_names;
                            ?></span></td>
                            <!--<td ><span ><?php 
                                //echo number_format((float)$record['basic_price'], 2, '.', '');
                                //echo $record['basic_price']; ?></span></td>-->
                            <td ><span ><?php  echo number_format((float)$record['basic_0'], 2, '.', '');  ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['Tax_0'], 2, '.', '');  ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['basic_5'], 2, '.', '');  ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['Tax_5'], 2, '.', '');  ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['basic_12'], 2, '.', '');  ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['Tax_12'], 2, '.', '');  ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['basic_18'], 2, '.', '');  ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['Tax_18'], 2, '.', '');  ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['total_price'], 2, '.', '');
                                 ?></span></td>
                        </tr>
                    <?php
                    $i++;
                    } ?>
                </tbody>
            </table>
            <?php
            }
            else if($branch != 'All' && $item_name != ''){
            //$query = $this->db->query("SELECT P.`issue_id`,P.`invoice_no`,P.`vehicle_name`, P.`issue_date`,P.`issue_time`, P.`outlet`, P.`branchname`,PI.`issue_item_name`, PI.`issue_uom`, PI.`hsn_code`, sum(PI.`issued_qty`) as quantity, PI.`price`, sum(PI.`basic_price`) as basic_price, PI.`tax`, sum(PI.`tax_amount`) as tax_amount, sum(PI.`total_price`) as total_price,PI.`recipe_id`, PI.`recipe_no`, PI.`pr_cat_id` FROM product_issues_creation P inner join product_issues_item PI on P.issue_id=PI.issue_id where P.issue_date between '$f_date' AND '$t_date' and P.outlet='$outlet_name' and PI.issue_item_name='$product_name' and P.invoice_type='tax_invoice23'  group by PI.issue_item_name");
            //and issue_status!='Cancel' <h1>!TETS</h1> 
            ?>
              
              <table id="example1" class="table table-striped table-bordered">
                    <thead class="thead-dark">
                        <tr>
                            <th>Sl No</th>
                            <th>Tax No</th>
                            <th>Date</th>
                            <th>Outlet</th>
                            <th>Product Name</th>
                            <th>UOM</th>
                            <th>HSN Code</th>
                            <th> Price</th>
                            <th>Basic Price</th>
                            <th>Tax </th>
                            <th>Tax Amount</th>
                            <th>Total</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php
                        $i=1;
                        foreach ($result_display as $record) { 
                        ?>
                        <tr >
                            <td><span ><?php echo $i; ?></span></td>
                            <td><span ><?php echo $record['invoice_no'] ?></span></td>
                            <td ><span ><?php echo $record['issue_date']; ?></span></td>
                            <td ><span ><?php //echo $record['outlet'];   
                                $oname = $record['outlet'];
								//echo $oname;
								$query = $this->db->query("select * from address where outlet='$oname'");
        						foreach($query->result_array() as $row)
        						$org_names=$row['org_name'];
        						echo $org_names;
                            ?></span></td>
                            <td ><span ><?php echo $record['issue_item_name']; ?></span></td>
                            <td ><span ><?php echo $record['issue_uom']; ?></span></td>
                            <td ><span ><?php echo $record['hsn_code']; ?></span></td>
                            <td ><span ><?php echo $record['quantity']; ?></span></td>
                            <td ><span ><?php echo $record['price']; ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['basic_price'], 2, '.', ''); ?></span></td>
                            <td ><span ><?php echo $record['tax']; ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['tax_amount'], 2, '.', '');  ?></span></td>
                            <td ><span ><?php  echo number_format((float)$record['total_price'], 2, '.', '');  ?></span></td>
                        </tr>
                        <?php
                        $i++;
                        } ?>
                    </tbody>
                </table>
            <?php
            }
            else if($branch == 'All' && $item_name == 'All')
            {
                //$query=$this->db->query("SELECT P.`invoice_no` as DC_NO,P.issue_date,sum(PI.basic_price) as basic_price,P.`outlet`,round(sum(CASE WHEN PI.`tax` = '0' THEN PI.`tax_amount` ELSE 0 END),3) AS Tax_0,round(sum(CASE WHEN PI.`tax` = '5' THEN PI.`tax_amount` ELSE 0 END),3) AS Tax_5,round(sum(CASE WHEN PI.`tax` = '12' THEN PI.`tax_amount` ELSE 0 END),3) AS Tax_12,round(sum(CASE WHEN PI.`tax` = '18' THEN PI.`tax_amount` ELSE 0 END),3) AS Tax_18,sum(PI.total_price) as total_price,P.issue_id FROM product_issues_creation P inner join product_issues_item PI on P.issue_id=PI.issue_id where P.`entry_date` between '$f_date' AND '$t_date' and P.invoice_type='tax_invoice23'  group by P.`issue_id`");
                //and P.issue_status!='Cancel' <h1>!FASFASF</h1>
                ?>
                
                <table id="example" class="table table-striped table-bordered ">
                    <thead class="thead-dark">
                        <tr>
                            <th>Sl No</th>
                            <th>Tax No</th>
                            <th>Date</th>
                            <th>Outlet</th>
                            <th>Basic Price</th>
                            <th>Basic 0</th>
                            <th>Tax 0</th>
                            <th>Basic 5</th>
                            <th>Tax 5</th>
                            <th>Basic 12</th>
                            <th>Tax 12</th>
                            <th>Basic 18</th>
                            <th>Tax 18</th>
                            <th>Total</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php
                        $i=1;
                        foreach ($result_display as $record) { 
                        ?>
                        <tr >
                            <td><span ><?php echo $i; ?></span></td>
                            <td><span ><?php echo $record['DC_NO'] ?></span></td>
                            <td ><span ><?php echo $record['issue_date']; ?></span></td>
                            <td ><span ><?php echo $record['outlet'];
                                $oname = $record['outlet'];
								//echo $oname;
								$query = $this->db->query("select * from address where outlet='$oname'");
        						foreach($query->result_array() as $row)
        						$org_names=$row['org_name'];
        						echo $org_names;
                            
                            ?></span></td>
                            <td ><span ><?php   echo number_format((float)$record['basic_price'], 2, '.', '');   ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['basic_0'], 2, '.', '');  ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['Tax_0'], 2, '.', '');  ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['basic_5'], 2, '.', '');  ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['Tax_5'], 2, '.', '');  ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['basic_12'], 2, '.', '');  ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['Tax_12'], 2, '.', '');  ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['basic_18'], 2, '.', ''); ; ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['Tax_18'], 2, '.', '');  ?></span></td>
                            <td ><span ><?php echo number_format((float)$record['total_price'], 2, '.', ''); ?></span></td>
                        </tr>
                        <?php
                        $i++;
                        } ?>
                    </tbody>
                </table>
            <?php
            }
        }
        ?>	
               
								<?php
									
								}
							}		
						} else { ?>	
						
					<?php } ?>
					<br/>
				 </div>
                    </div>
					</div>
				</div>
			</div>
		</div>
	</div>

</section>
<!-- // Basic form layout section end -->
        </div>
      </div>
    </div>
    <?php //require('include/theme_customizer.php');?>

   <?php 
  $footer_file=APPPATH.'views/include/footer.php';
	require($footer_file);
	?>
<script>
    
    $(document).ready(function() {
			$('#example').DataTable( {
				dom: 'Bfrtip',
					buttons: [
			{
				extend: 'csv',
				exportOptions: {
					columns: [0,1,2,3,4,5,6,7,8,9,10,11,12]
				}
			},
			{
				extend: 'copy',
				exportOptions: {
					columns: [0,1,2,3,4,5,6,7,8,9,10,11,12]
				}
			},
			{
				extend: 'excel',
				exportOptions: {
					columns: [0,1,2,3,4,5,6,7,8,9,10,11,12]
				}
			},
			{
				extend: 'pdf',
				orientation: 'landscape',
				exportOptions: {
					columns: [0,1,2,3,4,5,6,7,8,9,10,11,12]
				}
			},
			{
				extend: 'print',
				exportOptions: {
					columns: [0,1,2,3,4,5,6,7,8,9,10,11,12]
				}
			},
			]
			, "displayLength": 100
			, "order": [[0, 'asc']]
			} );
			
				$('#example1').DataTable( {
				dom: 'Bfrtip',
					buttons: [
			{
				extend: 'csv',
				exportOptions: {
					columns: [0,1,2,3,4,5,6,7,8,9,10,11]
				}
			},
			{
				extend: 'copy',
				exportOptions: {
					columns: [0,1,2,3,4,5,6,7,8,9,10,11]
				}
			},
			{
				extend: 'excel',
				exportOptions: {
					columns: [0,1,2,3,4,5,6,7,8,9,10,11]
				}
			},
			{
				extend: 'pdf',
				orientation: 'landscape',
				exportOptions: {
					columns: [0,1,2,3,4,5,6,7,8,9,10,11]
				}
			},
			{
				extend: 'print',
				exportOptions: {
					columns: [0,1,2,3,4,5,6,7,8,9,10,11]
				}
			},
			]
			, "displayLength": 100
			, "order": [[0, 'asc']]
			} );
			
				$('#example2').DataTable( {
				dom: 'Bfrtip',
					buttons: [
			{
				extend: 'csv',
				exportOptions: {
					columns: [0,1,2,3,4,5,6,7,8]
				}
			},
			{
				extend: 'copy',
				exportOptions: {
					columns: [0,1,2,3,4,5,6,7,8]
				}
			},
			{
				extend: 'excel',
				exportOptions: {
					columns: [0,1,2,3,4,5,6,7,8]
				}
			},
			{
				extend: 'pdf',
				orientation: 'landscape',
				exportOptions: {
					columns: [0,1,2,3,4,5,6,7,8]
				}
			},
			{
				extend: 'print',
				exportOptions: {
					columns: [0,1,2,3,4,5,6,7,8]
				}
			},
			]
			, "displayLength": 100
			, "order": [[0, 'asc']]
			} );
    });
</script>
	</body>
</html>