77 lines
3.3 KiB
PHP
77 lines
3.3 KiB
PHP
|
<?php
|
||
|
$drWidth = 250;
|
||
|
$crWidth = 250;
|
||
|
$AccountCategories = $this->myaccounts->getChildAccountCategories();
|
||
|
?>
|
||
|
<style>
|
||
|
.expandable {
|
||
|
text-decoration: underline;
|
||
|
}
|
||
|
</style>
|
||
|
<div class="content-wrapper">
|
||
|
<div class="container-fluid">
|
||
|
|
||
|
</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; ?> </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>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
<?php
|
||
|
$drTotal = 0;
|
||
|
$crTotal = 0;
|
||
|
foreach ($AccountCategories as $AccountCategory) :
|
||
|
$drTotal += $AccountCategory->dr;
|
||
|
$crTotal += $AccountCategory->cr;
|
||
|
?>
|
||
|
<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>
|
||
|
</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>
|
||
|
</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>
|