82 lines
4.2 KiB
PHP
82 lines
4.2 KiB
PHP
<?php
|
|
$drWidth = 250;
|
|
$crWidth = 250;
|
|
$balanceWidth = 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>
|
|
<th class="col-1 text-center">Balance</th>
|
|
<th class="col-1 text-center">Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$drTotal = 0;
|
|
$crTotal = 0;
|
|
$balanceTotal = 0;
|
|
foreach ($AccountCategories as $AccountCategory) :
|
|
$drTotal += $AccountCategory->dr;
|
|
$crTotal += $AccountCategory->cr;
|
|
$balanceTotal += $AccountCategory->Balance
|
|
?>
|
|
<!-- <?php //print_r($AccountCategory);die; ?> -->
|
|
<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(abs($AccountCategory->cr)); ?></td>
|
|
<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>
|
|
</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(abs($crTotal)); ?></td>
|
|
<td class="text-right"><?php echo myCurrency($balanceTotal); ?></td>
|
|
<td ></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>
|