BBnepal-Accounts/account/application/views/accounts/setup/singleentryvoucher/list.php

91 lines
3.6 KiB
PHP
Raw Normal View History

2024-07-10 12:43:19 +00:00
<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">
2024-08-09 09:22:46 +00:00
<h5 class="m-0 card-title"><?php echo $pageTitle; ?>
2024-07-10 12:43:19 +00:00
<!-- <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(); ?>
2024-08-12 10:36:46 +00:00
<table class="table table-bordered table-striped longdataTable">
2024-07-10 12:43:19 +00:00
<thead>
<tr>
2024-08-09 09:22:46 +00:00
<th class="text-center">Sn</th>
2024-08-08 12:39:25 +00:00
<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>
2024-08-08 12:56:24 +00:00
<th class=" text-center">Action</th>
2024-07-10 12:43:19 +00:00
</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" : ""; ?>">
2024-08-09 09:22:46 +00:00
<td class="text-center"><?php echo $sn; ?></td>
2024-07-10 12:43:19 +00:00
<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>
2024-08-08 12:39:25 +00:00
<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; ?>">&nbsp;</span> </td>
<td class="text-center">
2024-07-25 12:03:43 +00:00
<?php showEditButton($commandURL = "accounts/setup/editvouchertype/" . $TableRow->vouchertype_id , "Edit", ""); ?>
2024-07-10 12:43:19 +00:00
</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
}
?>