commitall
This commit is contained in:
@ -0,0 +1,70 @@
|
||||
<?php
|
||||
$this->load->library("BIBAccounts");
|
||||
$BIBAccounts = new BIBAccounts();
|
||||
?>
|
||||
<style>
|
||||
.expandable {
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<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">
|
||||
<?php $AccountGroups = $BIBAccounts->getAccountGroupsWithBalances(); ?>
|
||||
<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 ($AccountGroups->accounts as $Account) :
|
||||
$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>
|
201
account/application/views/accounts/balances/bycategory.php
Normal file
201
account/application/views/accounts/balances/bycategory.php
Normal file
@ -0,0 +1,201 @@
|
||||
<?php
|
||||
$drWidth = 250;
|
||||
$crWidth = 250;
|
||||
$AccountCategories = $this->acc->getAccountCategories($acgroup_id);
|
||||
$array = json_decode(json_encode($AccountCategories), true);
|
||||
$tree=buildCategoryTree($array, false);
|
||||
function buildCategoryTree($categories, $parent_id = 0, $showZero = true)
|
||||
{
|
||||
$tree = array();
|
||||
|
||||
foreach ($categories as $category) {
|
||||
if ($category['parent_category_id'] == $parent_id) {
|
||||
$children = buildCategoryTree($categories, $category['accategory_id'], $showZero);
|
||||
|
||||
if (!empty($children)) {
|
||||
$category['children'] = $children;
|
||||
}
|
||||
|
||||
if ($showZero && ($category['dr'] !== 0 || $category['cr'] !== 0)) {
|
||||
$tree[] = $category;
|
||||
} elseif (!$showZero && ($category['dr'] !== 0 && $category['cr'] !== 0)) {
|
||||
$tree[] = $category;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $tree;
|
||||
}
|
||||
|
||||
function displayCategoryTree($tree) {
|
||||
echo '<table class="table table-bordered">';
|
||||
|
||||
foreach ($tree as $category) {
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td class="col-1">' . $category['accategory_id'] . '</td>';
|
||||
echo '<td><a href="'.site_url("accounts/reports/balance_by_group") . "?category=" . $category['accategory_id'] .'">' . $category['accategory_name'] . '</a></td>';
|
||||
echo '<td width="250">' . myCurrency($category['dr']) . '</td>';
|
||||
echo '<td>' . myCurrency($category['cr']) . '</td>';
|
||||
echo '</tr>';
|
||||
if (isset($category['children']) && !empty($category['children'])) {
|
||||
echo '<tr>';
|
||||
echo '<td colspan="4">';
|
||||
displayCategoryTree($category['children']);
|
||||
echo '</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
}
|
||||
echo '</table>';
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
.expandable {
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
|
||||
<div class="content">
|
||||
<div class="container-fluid">
|
||||
<?php //pre($tree); ?>
|
||||
<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">
|
||||
<input type="checkbox" name="showZero" value="true" id="showZero">
|
||||
<label for="showZero">
|
||||
Show Zero Balances
|
||||
</label>
|
||||
<?php displayCategoryTree($tree); ?>
|
||||
</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>
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="card">
|
||||
|
||||
<!-- ./card-header -->
|
||||
<div class="card-body p-0">
|
||||
|
||||
|
||||
<table class="table table-head-fixed text-nowrap table-bordered" id="treeTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2" class="col-6">Particulars</th>
|
||||
<th colspan="2" class="text-center col-2">Opening</th>
|
||||
<th colspan="2" class="text-center col-2">This Year</th>
|
||||
<th colspan="2" class="text-center col-2">Closing</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-center">Dr. Amount</th>
|
||||
<th class="text-center">Cr. Amount</th>
|
||||
<th class="text-center">Dr. Amount</th>
|
||||
<th class="text-center">Cr. Amount</th>
|
||||
<th class="text-center">Dr. Amount</th>
|
||||
<th class="text-center">Cr. Amount</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="parent">
|
||||
<td></td>
|
||||
<td>10</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="child">
|
||||
<td><span class="caret" onclick="toggleNode(this)">Current Assets</span></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="grandchild">
|
||||
<td><span class="caret" onclick="toggleNode(this)">Bank Assets</span></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="great-grandchild">
|
||||
<td>Nabil Bank</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="great-grandchild">
|
||||
<td>RBB Bank</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="grandchild">
|
||||
<td><span class="caret" onclick="toggleNode(this)">Another Grandchild</span></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="great-grandchild">
|
||||
<td>Child 1</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="great-grandchild">
|
||||
<td>Child 2</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
|
||||
</div><!-- /.container-fluid -->
|
||||
</section>
|
||||
<!-- /.content -->
|
77
account/application/views/accounts/balances/bygroup.php
Normal file
77
account/application/views/accounts/balances/bygroup.php
Normal file
@ -0,0 +1,77 @@
|
||||
<?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>
|
94
account/application/views/accounts/balances/bytype.php
Normal file
94
account/application/views/accounts/balances/bytype.php
Normal file
@ -0,0 +1,94 @@
|
||||
<?php
|
||||
$drWidth = 250;
|
||||
$crWidth = 250;
|
||||
$AccountBalances=array();
|
||||
$AccountGroups = $this->acc->getAccountGroups($AccountBalances);
|
||||
|
||||
?>
|
||||
<style>
|
||||
.expandable {
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
<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 bg-primary">
|
||||
<h5 class="m-0"><?php echo $pageTitle; ?> <span class="float-right">Dr Balance: <?php echo myCurrency($AccountBalances['DrBalance'],true); ?> / Cr Balance: <?php echo myCurrency($AccountBalances['CrBalance'],true); ?></span></h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-bordered longdataTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Account</th>
|
||||
<th width="<?php echo $drWidth; ?>" class="text-center">Dr</th>
|
||||
<th width="<?php echo $crWidth; ?>" class="text-center">Cr</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$drTotal = 0;
|
||||
$crTotal = 0;
|
||||
foreach ($AccountGroups as $AccountGroup) :
|
||||
$drTotal += $AccountGroup->dr;
|
||||
$crTotal += $AccountGroup->cr;
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><a href="<?php echo site_url("accounts/reports/balance_by_category") . "?group=" . $AccountGroup->acgroup_id; ?>"><?php echo $AccountGroup->acgroup_name; ?></a></td>
|
||||
<td width="<?php echo $drWidth; ?>" class="text-center"><?php echo myCurrency($AccountGroup->dr); ?></td>
|
||||
<td width="<?php echo $crWidth; ?>"class="text-center"><?php echo myCurrency($AccountGroup->cr); ?></td>
|
||||
</tr>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Total</th>
|
||||
<th width="<?php echo $drWidth; ?>"><?php echo myCurrency($drTotal); ?></th>
|
||||
<th width="<?php echo $crWidth; ?>"><?php echo myCurrency($crTotal); ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Total</th>
|
||||
<th width="<?php echo $drWidth; ?>"></th>
|
||||
<th width="<?php echo $crWidth; ?>"><?php echo myCurrency($drTotal-$crTotal); ?></th>
|
||||
</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>
|
97
account/application/views/accounts/balances/bytype__.php
Normal file
97
account/application/views/accounts/balances/bytype__.php
Normal file
@ -0,0 +1,97 @@
|
||||
<?php
|
||||
$drWidth = 250;
|
||||
$crWidth = 250;
|
||||
$AccountGroups = $this->myaccounts->getAccountGroups();
|
||||
$AccountBalances=array();
|
||||
$AccountGroupTotal=0;
|
||||
foreach($AccountGroups as $AccountGroup):
|
||||
$AccountGroupTotal+=$this->myaccounts->getAccountBalanceR("Types",$AccountGroup->acgroup_id,$AccountBalances);
|
||||
endforeach;
|
||||
?>
|
||||
<style>
|
||||
.expandable {
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
<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 bg-primary ">
|
||||
<h5 class="m-0"><?php echo $pageTitle; ?> <span class="float-right">Dr Balance: <?php echo myCurrency($AccountBalances['DrBalance'],true); ?> / Cr Balance: <?php echo myCurrency($AccountBalances['CrBalance'],true); ?></span></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 ($AccountGroups as $AccountGroup) :
|
||||
$drTotal += $AccountGroup->dr;
|
||||
$crTotal += $AccountGroup->cr;
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><a href="<?php echo site_url("accounts/reports/balance_by_category") . "?group=" . $AccountGroup->acgroup_id; ?>"><?php echo $AccountGroup->acgroup_name; ?></a></td>
|
||||
<td width="<?php echo $drWidth; ?>"><?php echo myCurrency($AccountGroup->dr); ?></td>
|
||||
<td width="<?php echo $crWidth; ?>"><?php echo myCurrency($AccountGroup->cr); ?></td>
|
||||
</tr>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Total</th>
|
||||
<th width="<?php echo $drWidth; ?>"><?php echo myCurrency($drTotal); ?></th>
|
||||
<th width="<?php echo $crWidth; ?>"><?php echo myCurrency($crTotal); ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Total</th>
|
||||
<th width="<?php echo $drWidth; ?>"></th>
|
||||
<th width="<?php echo $crWidth; ?>"><?php echo myCurrency($drTotal-$crTotal); ?></th>
|
||||
</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>
|
Reference in New Issue
Block a user