91 lines
3.5 KiB
PHP
91 lines
3.5 KiB
PHP
<div class="content-wrapper">
|
|
<!-- <div class="content-header">
|
|
<div class="container-fluid">
|
|
<div class="row mb-2">
|
|
<div class="col-sm-6">
|
|
|
|
<h1 class="m-0"><?php //echo $pageTitle; ?></h1>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<ol class="breadcrumb float-sm-right">
|
|
|
|
<li class="breadcrumb-item"><a href="<?php //echo base_url(); ?>">Dashboard</a></li>
|
|
<li class="breadcrumb-item active"><?php //echo $pageTitle; ?></li>
|
|
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div> -->
|
|
<div class="content">
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col">
|
|
|
|
<div class="card card-primary card-outline">
|
|
<div class="card-header">
|
|
|
|
<h5 class="m-0"><?php echo $pageTitle; ?>
|
|
<!-- <a href="<?php //echo site_url("accounts/setup/addsingleentryvoucher"); ?>" class="btn btn-sm btn-primary float-right">Create New <?php //echo $pageTitle; ?></a> -->
|
|
</h5>
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
<?php $TableData = $this->db->query("select * from tbl_vouchertypes")->result(); ?>
|
|
<table class="table table-bordered table-striped dataTable">
|
|
<thead>
|
|
<tr>
|
|
<th >Sn</th>
|
|
<th class="col-2">Voucher Name</th>
|
|
<th class="col-4">Default Debits</th>
|
|
<th class="col-4">Default Credits</th>
|
|
<th class="col-1 text-center">Voucher Color</th>
|
|
<th class="table-col col-1 text-center">Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php $sn = 0;
|
|
foreach ($TableData as $TableRow) : $sn++; ?>
|
|
<?php foreach ($TableRow as $cols) : $id = $cols;
|
|
break;
|
|
endforeach; ?><tr class="<?php echo ($TableRow->status == 0) ? "table-danger" : ""; ?>">
|
|
<td><?php echo $sn; ?></td>
|
|
<td><?php echo $TableRow->voucher_name; ?></td>
|
|
<td><?php echo showAccountCategoriesByIds(($TableRow->default_debits!="")?explode(",",$TableRow->default_debits):array()); ?></td>
|
|
<td><?php echo showAccountCategoriesByIds(($TableRow->default_credits!="")?explode(",",$TableRow->default_credits):array()); ?></td>
|
|
|
|
|
|
<td class="text-center"><span class="inline-block " style="padding:0px 8px;text-align:center;border:1px solid <?php echo $TableRow->voucher_color; ?>;background:<?php echo $TableRow->voucher_color; ?>"> </span> </td>
|
|
<td class="text-center">
|
|
<?php showEditButton($commandURL = "accounts/setup/editvouchertype/" . $TableRow->vouchertype_id , "Edit", ""); ?>
|
|
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
<tbody>
|
|
</table>
|
|
<script>
|
|
function doDelete(id) {
|
|
if (confirm('Are you sure to delete?')) {
|
|
window.location = '<?php echo site_url("accounts/setup/deletevouchertype/"); ?>' + id;
|
|
}
|
|
}
|
|
</script>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
|
|
function showTogglebutton($commandURL, $currentValue)
|
|
{
|
|
?>
|
|
<a class="btn btn-success btn-xs" href="<?php echo site_url($commandURL); ?>"><?php echo ($currentValue == 1) ? "Disable" : "Enable"; ?></a>
|
|
<?php
|
|
}
|
|
?>
|