<!-- Cheaque Manager Start -->
<div class="content-wrapper">
	<section class="content-header">
	    <div class="header-icon">
	        <i class="pe-7s-note2"></i>
	    </div>
	    <div class="header-title">
	        <h1><?php echo display('manage_tax') ?></h1>
	        <small><?php echo display('manage_tax') ?></small>
	        <ol class="breadcrumb">
	            <li><a href="#"><i class="pe-7s-home"></i> <?php echo display('home') ?></a></li>
	            <li><a href="#"><?php echo display('accounts') ?></a></li>
	            <li class="active"><?php echo display('manage_tax') ?></li>
	        </ol>
	    </div>
	</section>

	<section class="content">

		<!-- Alert Message -->
	    <?php
	        $message = $this->session->userdata('message');
	        if (isset($message)) {
	    ?>
	    <div class="alert alert-info alert-dismissable">
	        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
	        <?php echo $message ?>                    
	    </div>
	    <?php 
	        $this->session->unset_userdata('message');
	        }
	        $error_message = $this->session->userdata('error_message');
	        if (isset($error_message)) {
	    ?>
	    <div class="alert alert-danger alert-dismissable">
	        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
	        <?php echo $error_message ?>                    
	    </div>
	    <?php 
	        $this->session->unset_userdata('error_message');
	        }
	    ?>

        <?php
        if($this->permission1->method('manage_tax','read')->access() || $this->permission1->method('manage_tax','update')->access() || $this->permission1->method('manage_tax','delete')->access()) { ?>
        <!-- Manage TAX -->
		<div class="row">
		    <div class="col-sm-12">
		        <div class="panel panel-bd lobidrag">
		            <div class="panel-heading">
		                <div class="panel-title">
		                    <h4><?php echo display('manage_tax') ?> </h4>
		                </div>
		            </div>
		            <div class="panel-body">
		                <div class="table-responsive">
		                    <table id="dataTableExample2" class="table table-bordered table-striped table-hover">
			           			<thead>
									<tr>
										<th><?php echo display('sl') ?></th>
										<th><?php echo display('tax') ?></th>
                                        <?php
                                        if($this->permission1->method('manage_tax','update')->access() || $this->permission1->method('manage_tax','delete')->access()) { ?>
                                        <th><?php echo display('action') ?></th>
                                        <?php } ?>
									</tr>
								</thead>
								<tbody>
								<?php
								if ($tax_list) {
								?>
								{tax_list}
									<tr>
										<td>{tax_id}</td>
										<td>{tax} %</td>
						                <td>
						                    <center>
                                                <?php
                                                if($this->permission1->method('manage_tax','update')->access()) { ?>
                                                  <a href="<?php echo base_url().'Caccounts/tax_edit/{tax_id}'; ?>" class="btn btn-warning btn-sm" data-toggle="tooltip" data-placement="right" title="" data-original-title="<?php echo display('update') ?>"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></a>
                                                <?php } ?>

                                                <?php
                                                if($this->permission1->method('manage_tax','delete')->access()) { ?>
					                            <a href="<?php echo base_url().'Caccounts/tax_delete/{tax_id}'; ?>" class="btn btn-danger btn-sm" data-toggle="tooltip" data-placement="right" title="" data-original-title="<?php echo display('delete') ?>"><i class="fa fa-trash-o" aria-hidden="true"></i></a>
                                                <?php } ?>
                                            </center>
						                </td>
									</tr>
								{/tax_list} 
								<?php
									}
								?>
								</tbody>
		                    </table>
		                </div>
		            </div>
		        </div>
		    </div>
		</div>
        <?php
        }
        else{
            ?>
            <div class="row">
                <div class="col-sm-12">
                    <div class="panel panel-bd lobidrag">
                        <div class="panel-heading">
                            <div class="panel-title">
                                <h4><?php echo display('You do not have permission to access. Please contact with administrator.');?></h4>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        <?php
        }
        ?>
	</section>
</div>
<!-- Cheaque Manager End -->