2024-07-10 12:43:19 +00:00
|
|
|
<?php
|
|
|
|
$drWidth = 250;
|
|
|
|
$crWidth = 250;
|
|
|
|
$AccountCategories = $this->myaccounts->getChildAccountCategories();
|
|
|
|
?>
|
|
|
|
<style>
|
|
|
|
.expandable {
|
|
|
|
text-decoration: underline;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<div class="content-wrapper">
|
2024-08-09 03:54:49 +00:00
|
|
|
<div class="container-fluid">
|
|
|
|
</div>
|
2024-07-10 12:43:19 +00:00
|
|
|
<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; ?> </h5>
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
<table class="table table-bordered longdataTable">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Account</th>
|
|
|
|
<th width="<?php echo $drWidth; ?>">Dr</th>
|
|
|
|
<th width="<?php echo $crWidth; ?>">Cr</th>
|
2024-08-09 03:54:49 +00:00
|
|
|
<th class="col-1 text-center">Balance</th>
|
|
|
|
<th class="col-1 text-center">Action</th>
|
2024-07-10 12:43:19 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php
|
|
|
|
$drTotal = 0;
|
|
|
|
$crTotal = 0;
|
|
|
|
foreach ($AccountCategories as $AccountCategory) :
|
|
|
|
$drTotal += $AccountCategory->dr;
|
|
|
|
$crTotal += $AccountCategory->cr;
|
|
|
|
?>
|
2024-08-11 11:44:32 +00:00
|
|
|
<!-- <?php //print_r($AccountCategory);die; ?> -->
|
2024-07-10 12:43:19 +00:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<a href="<?php echo site_url("accounts/reports/balance_by_ledger") . "?group=" . $AccountCategory->accategory_id; ?>">
|
|
|
|
<?php echo $AccountCategory->accategory_name; ?>
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td width="<?php echo $drWidth; ?>"><?php echo myCurrency($AccountCategory->dr); ?></td>
|
|
|
|
<td width="<?php echo $crWidth; ?>"><?php echo myCurrency($AccountCategory->cr); ?></td>
|
2024-08-11 11:44:32 +00:00
|
|
|
<td class="text-right"><?php echo myCurrency($AccountCategory->Balance); ?></td>
|
|
|
|
<td class="text-center"><a href="<?php echo site_url("accounts/reports/balance_by_ledger") . "?group=" . $AccountCategory->accategory_id; ?>" class="btn btn-info btn-xs"><i class="fas fa-eye"></i> </a></td>
|
2024-07-10 12:43:19 +00:00
|
|
|
</tr>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</tbody>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Total</th>
|
|
|
|
<td width="<?php echo $drWidth; ?>"><?php echo myCurrency($drTotal); ?></td>
|
|
|
|
<td width="<?php echo $crWidth; ?>"><?php echo myCurrency($crTotal); ?></td>
|
2024-08-09 03:54:49 +00:00
|
|
|
<td ></td>
|
|
|
|
<td ></td>
|
2024-07-10 12:43:19 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="container">
|
|
|
|
<script>
|
|
|
|
function toggleSubTable(row) {
|
|
|
|
var subTable = row.nextElementSibling;
|
|
|
|
subTable.style.display = subTable.style.display === 'none' ? 'table-row' : 'none';
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</div>
|