  <?php 
    $this->load->view('templates/header');
  ?>
    <script>
        var link = "master";
        var sub_link = "hsn";
    </script>
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
       HSN
        <small>Master</small>
      </h1>
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
        <li><a href="#">Forms</a></li>
        <li class="active">Hsn Master</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content">
        <div class="row">
            <div class="col-md-2 col-md-offset-10">
                 <button type="button" class="btn btn-primary" onClick="add_update_hsn_popup(0);" title="add hsn" style="width: 100%;">Add Hsn</button>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">     
                <div class="box">
                    <div class="box-body">
                        <table class="table table-bordered table-striped master_table">
                            <thead>
                                <tr>
                                    <th>#</th>
                                    <th>Hsn Code</th>
                                    <th>Edit</th>    
                                    <th>Delete</th>    
                                </tr>
                            </thead>
                            <tbody>
                        <?php
                            foreach ($hsn_data as $key => $value):
                        ?>
                                <tr>
                                    <td><?php echo $key+1?></td>
                                    <td><?php echo $value['hsn_code']?></td>
                                    <td><span class="glyphicon glyphicon-pencil" style="cursor:pointer;" onClick="add_update_hsn_popup(<?php echo $value['hsn_id']?>)"></span></td>
                                    <td><span class="glyphicon glyphicon-trash" onClick="delete_master_item(<?php echo $value['hsn_id']?>,'hsn_delete');"></span></td>
                                </tr> 
                        <?php
                            endforeach;
                        ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <?php 
    $this->load->view('templates/footer');
   ?>
    <script src="<?php echo assets('js/master.js')?>"></script> 
 
  