Compare commits
9 Commits
78670b1b95
...
main
Author | SHA1 | Date | |
---|---|---|---|
|
497f567cba | ||
|
31e7f8de87 | ||
|
a5d29a202e | ||
|
4109787bc4 | ||
|
b1c6bad445 | ||
|
15b3e542a3 | ||
|
cd361f79aa | ||
|
759b97e1f0 | ||
|
161703be17 |
@@ -5,7 +5,6 @@ function generateACCategoryCode($group_id)
|
||||
$acgroup_code = $ci->db->where("acgroup_id=$group_id")->get("tbl_acgroups")->row()->acgroup_code;
|
||||
$lastACCategoryCode = $ci->db->select_max("accategory_code")->where("acgroup_id=$group_id")->get("tbl_accategories")->row()->accategory_code;
|
||||
$category_part = substr($lastACCategoryCode, 1);
|
||||
|
||||
$category_part = (float)$category_part + 1;
|
||||
//if($category_part<10)$category_part="00".$category_part;
|
||||
if ($category_part < 10) $category_part = "00" . $category_part;
|
||||
@@ -18,7 +17,6 @@ function generateAccountCode($category_id)
|
||||
$accategory_code = $ci->db->where("accategory_id=$category_id")->get("tbl_accategories")->row()->accategory_code;
|
||||
$lastAccountCode = $ci->db->select_max("account_code")->where("accategory_id=$category_id")->get("tbl_accounts")->row()->account_code;
|
||||
$account_part = substr($lastAccountCode, 4);
|
||||
|
||||
$account_part = (float)$account_part + 1;
|
||||
//if($category_part<10)$category_part="00".$category_part;
|
||||
if ($account_part < 10) $account_part = "00" . $account_part;
|
||||
@@ -54,13 +52,10 @@ function showAccountCategoriesSelector($fieldName, $fieldID, $condition = "1=1",
|
||||
$html .= " required";
|
||||
}
|
||||
$html .= ">";
|
||||
|
||||
$html .= "<option value='' " . (($selectedID == '') ? "SELECTED" : "") . ">Select Account Category</option>";
|
||||
|
||||
foreach ($AccountCategories as $AccountCategory) {
|
||||
$html .= "<option value='$AccountCategory->accategory_id'" . (($selectedID == $AccountCategory->accategory_id) ? "selected" : "") . ">" . getFieldfromValue("tbl_acgroups", "acgroup_name", "acgroup_id", $AccountCategory->acgroup_id) . " >> $AccountCategory->accategory_name</option>";
|
||||
}
|
||||
|
||||
$html .= "</select>";
|
||||
echo $html;
|
||||
}
|
||||
@@ -68,7 +63,6 @@ function showAccountCategoriesByIds($AccountCategories = array())
|
||||
{
|
||||
// pre($AccountCategories); //die;
|
||||
$ci = &get_instance();
|
||||
|
||||
if ($AccountCategories) {
|
||||
$AccountCategories_a = $ci->db->where("status", 1);
|
||||
$AccountCategories_a = $AccountCategories_a->where_in("accategory_id", $AccountCategories);
|
||||
@@ -80,22 +74,19 @@ function showAccountCategoriesByIds($AccountCategories = array())
|
||||
echo implode(", ", $html);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function linkVoucher($voucher_id)
|
||||
{
|
||||
if($voucher_id!=0) {
|
||||
$ci = &get_instance();
|
||||
$Voucher = $ci->db->where("voucher_id", $voucher_id)->get("tbl_vouchers")->row();
|
||||
$Name = $ci->db->where("vouchertype_id", $Voucher->voucher_type)->get("tbl_vouchertypes")->row()->voucher_type . " Voucher # " . $Voucher->voucher_no;
|
||||
echo "<a class='link' target='_blank' href='" . site_url("accounts/vouchers/show_voucher/" . $voucher_id) . "'>$Name</a>";
|
||||
if ($voucher_id != 0) {
|
||||
$ci = &get_instance();
|
||||
$Voucher = $ci->db->where("voucher_id", $voucher_id)->get("tbl_vouchers")->row();
|
||||
$Name = $ci->db->where("vouchertype_id", $Voucher->voucher_type)->get("tbl_vouchertypes")->row()->voucher_type . " Voucher # " . $Voucher->voucher_no;
|
||||
echo "<a class='link' target='_blank' href='" . site_url("accounts/vouchers/show_voucher/" . $voucher_id) . "'>$Name</a>";
|
||||
} else {
|
||||
echo "";
|
||||
}
|
||||
}
|
||||
function linkLedger($Account)
|
||||
{
|
||||
|
||||
$ci = &get_instance();
|
||||
echo "<a class='link' target='_blank' href='" . site_url("accounts/ledger/partyledger?from_date=" . FYStart() . "&to_date=" . FYEnd() . "&account_id=" . $Account->account_id . "&show_ledger=true") . "'>$Account->account_name</a>";
|
||||
}
|
||||
@@ -143,15 +134,11 @@ function generateVoucherNo($vouchertype_id = "")
|
||||
{
|
||||
$ci = &get_instance();
|
||||
$voucherTypeCondition = ($vouchertype_id != "") ? " WHERE voucher_type = '$vouchertype_id'" : "";
|
||||
|
||||
$query = $ci->db->query("SELECT MAX(voucher_no) AS voucher_no FROM tbl_vouchers" . $voucherTypeCondition);
|
||||
$row = $query->row();
|
||||
|
||||
$newVoucherNo = ($row->voucher_no !== null) ? $row->voucher_no + 1 : 1;
|
||||
|
||||
return $newVoucherNo;
|
||||
}
|
||||
|
||||
function countChildCategories($acgroup_id)
|
||||
{
|
||||
$ci = &get_instance();
|
||||
|
@@ -766,17 +766,16 @@ class bibaccounts
|
||||
<tr>
|
||||
<td class="group-name"> <i><?php echo $Account->account_name; ?></i></td>
|
||||
<?php if ($ReportOptions['showOB']) : ?>
|
||||
<td class="group-total "><?php echo myCurrency(($Account->posting_side == 'DR') ? $Account->opening_balance : 0); ?></td>
|
||||
<td class="group-total"><?php echo myCurrency(($Account->posting_side == 'CR') ? $Account->opening_balance : 0); ?></td>
|
||||
<td class="group-total"><?php echo myCurrency(($Account->posting_side == 'DR') ? $Account->opening_balance : 0); ?></td>
|
||||
<td class="group-total "><?php echo myCurrency(($Account->posting_side == 'CR') ? $Account->opening_balance : 0); ?></td>
|
||||
<?php endif; ?>
|
||||
<?php if ($ReportOptions['showPeriod']) : ?>
|
||||
<td class="group-total"><i><?php echo myCurrency(($Account->posting_side == 'DR') ? $Account->regular_balance : 0); ?></i></td>
|
||||
<td class="group-total"><?php echo myCurrency(($Account->posting_side == 'CR') ? $Account->regular_balance : 0); ?><?php //pre($Account);
|
||||
?></td>
|
||||
<?php endif; ?>
|
||||
<?php if ($ReportOptions['showClosing']) : ?>
|
||||
<td class="group-total"><?php echo myCurrency(($Account->posting_side == 'DR') ? $Account->closing_balance : 0); ?></td>
|
||||
<td class="group-total"><?php echo myCurrency(($Account->posting_side == 'CR') ? $Account->closing_balance : 0); ?></td>
|
||||
<td class="group-total col-2"><?php echo myCurrency(($Account->posting_side == 'DR') ? $Account->closing_balance : 0); ?></td>
|
||||
<td class="group-total col-2"><?php echo myCurrency(($Account->posting_side == 'CR') ? $Account->closing_balance : 0); ?></td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
@@ -14,9 +14,9 @@
|
||||
<table class="table table-bordered table-striped longdataTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-2">Type</th>
|
||||
<th class="col-1">Type</th>
|
||||
<th>Category Name</th>
|
||||
<td class="col-1">Action</th>
|
||||
<th class="col-1 text-center">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -26,7 +26,7 @@
|
||||
break;
|
||||
endforeach; ?>
|
||||
<?php if ($TableRow->parent_category_id == 0) : ?>
|
||||
<tr>
|
||||
<tr class="text-center">
|
||||
<td><?php echo $TableRow->AccountGroup->acgroup_name; ?></td>
|
||||
<td><?php echo $TableRow->accategory_name; ?></td>
|
||||
<td><a href="<?php echo site_url("master/accategories/edit_parents/$id"); ?>" class="btn btn-info btn-xs"><i class="fas fa-edit"></i> </a>
|
||||
|
@@ -55,7 +55,6 @@ function displayCategoryTree($tree)
|
||||
.expandable {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<div class="content">
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
$t="INSERT INTO tbl_acgroups (acgroup_id, acgroup_code, acgroup_name, posting_side, created_on, created_by, remarks, status, display_order)
|
||||
$t = "INSERT INTO tbl_acgroups (acgroup_id, acgroup_code, acgroup_name, posting_side, created_on, created_by, remarks, status, display_order)
|
||||
SELECT 5, '5', 'Equity', 'CR', '2023-05-22', 'admin', '', 1, 2
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM tbl_acgroups WHERE acgroup_id = 5
|
||||
@@ -12,16 +12,14 @@ $AssetsAccounts = $this->acc->getAccountsByGroup(1);
|
||||
$LiabilitiesTotal = $this->acc->getAccountBalanceByGroup(2);
|
||||
$EquityTotal = $this->acc->getAccountBalanceByGroup(5);
|
||||
$AssetsTotal = $this->acc->getAccountBalanceByGroup(1, false);
|
||||
|
||||
$IncomeAccounts = $this->acc->getAccountsByGroup(3);
|
||||
$ExpenseAccounts = $this->acc->getAccountsByGroup(4);
|
||||
$IncomesTotal = $this->acc->getAccountBalanceByGroup(3);
|
||||
$ExpensesTotal = $this->acc->getAccountBalanceByGroup(4);
|
||||
$PL = $IncomesTotal - $ExpensesTotal;
|
||||
$LiabilitiesTotal=$LiabilitiesTotal+$EquityTotal+$PL;
|
||||
$LiabilitiesTotal = $LiabilitiesTotal + $EquityTotal + $PL;
|
||||
?>
|
||||
<div class="content-wrapper">
|
||||
|
||||
<div class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
@@ -39,13 +37,11 @@ $LiabilitiesTotal=$LiabilitiesTotal+$EquityTotal+$PL;
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="bg-dark">
|
||||
|
||||
<th>Liabilities</th>
|
||||
<th class="col-2">Amount</th>
|
||||
<th>Assets</th>
|
||||
<th class="col-2">Amount</th>
|
||||
</tr>
|
||||
|
||||
<tr class="bg-light">
|
||||
<td colspan="2">
|
||||
<?php $this->acc->showTable($LiabilitiesAccounts); ?>
|
||||
@@ -54,33 +50,22 @@ $LiabilitiesTotal=$LiabilitiesTotal+$EquityTotal+$PL;
|
||||
<td colspan="2">
|
||||
<?php $this->acc->showTable($AssetsAccounts, false); ?>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
|
||||
|
||||
|
||||
<tr class="bg-light">
|
||||
|
||||
<th>Net Profit:</th>
|
||||
<th><?php echo myCurrency($PL); ?></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr class="bg-light">
|
||||
|
||||
<th>Total Liabilities:</th>
|
||||
<th><?php echo myCurrency($LiabilitiesTotal); ?></th>
|
||||
<th>Total Assets: </th>
|
||||
<th><?php echo myCurrency($AssetsTotal); ?></th>
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -12,7 +12,6 @@ $BIBAccounts = new BIBAccounts();
|
||||
|
||||
.group-name {
|
||||
width: 40%;
|
||||
font-weight: 600px;
|
||||
}
|
||||
|
||||
.group-total {
|
||||
@@ -84,6 +83,30 @@ $BIBAccounts = new BIBAccounts();
|
||||
box-shadow: inset 0 0 0 transparent;
|
||||
transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
|
||||
}
|
||||
|
||||
.table1 {
|
||||
border: 0px !important;
|
||||
padding: 0;
|
||||
margin: 10 !important;
|
||||
width: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.table-responsive {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
-webkit-flex: 1 1 auto;
|
||||
-ms-flex: 1 1 auto;
|
||||
flex: 1 1 auto;
|
||||
min-height: 1px;
|
||||
padding: 0;
|
||||
}
|
||||
table {
|
||||
border: 1px solid #ddd;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<section class="content">
|
||||
@@ -111,11 +134,7 @@ $BIBAccounts = new BIBAccounts();
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown-divider"></div>
|
||||
<!-- <div class="form-check">
|
||||
<input class="form-check-input" type="checkbox">
|
||||
<label class="form-check-label">Select
|
||||
All</label>
|
||||
</div> -->
|
||||
|
||||
<div class="form-check">
|
||||
<!-- <input type="hidden" name="showOB" value="not"> -->
|
||||
<input type="checkbox" class="form-check-input " name="showOB" id="showOB" aria-describedby="helpId_showOB" placeholder="Show Opening Balance" <?php echo (isset($_POST['showOB'])) ? "CHECKED" : ""; ?>>
|
||||
@@ -144,14 +163,7 @@ $BIBAccounts = new BIBAccounts();
|
||||
<button type="submit" class="btn btn-warning btn-sm " data-toggle="dropdown" data-offset="-52">
|
||||
Export
|
||||
</button>
|
||||
<!-- <button class="btn btn-secondary toggle-collapse btn-sm" id="toggleShowAll">Toggle
|
||||
Collapse</button> -->
|
||||
<!-- <div class="dropdown-menu" role="menu">
|
||||
<a href="#" class="dropdown-item">Export</a>
|
||||
<a href="#" class="dropdown-item">Pdf</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a href="#" class="dropdown-item">View calendar</a>
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
|
||||
<button class="btn btn-secondary toggle-collapse btn-sm" id="toggleShowAll">Toggle Collapse</button>
|
||||
@@ -168,58 +180,7 @@ $BIBAccounts = new BIBAccounts();
|
||||
</div>
|
||||
<!-- /.card-tools -->
|
||||
</div>
|
||||
<!-- <div class="card-body">
|
||||
<form method="post" action="" id="FilterForm">
|
||||
<div class="row align-items-end">
|
||||
<div class="col-2">
|
||||
<div class="form-group">
|
||||
<label for="fromDate"><?php myLang("Starting Period"); ?></label>
|
||||
<input type="text" class="form-control nepaliDatePicker" name="fromDate" value="<?php echo (isset($_POST['fromDate'])) ? $_POST['fromDate'] : NepaliDate($this->session->FiscalYear->fiscalyear_from); ?>" id="fromDate" aria-describedby="helpId_fromDate" placeholder="Starting Period">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="form-group">
|
||||
<label for="toDate"><?php myLang("Ending Period"); ?></label>
|
||||
<input type="text" class="form-control nepaliDatePicker" name="toDate" value="<?php echo (isset($_POST['toDate'])) ? $_POST['toDate'] : NepaliDate($this->session->FiscalYear->fiscalyear_to); ?>" id="toDate" aria-describedby="helpId_toDate" placeholder="Ending Period">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-1 text-center">
|
||||
<div class="form-group">
|
||||
<label for="showOB"><?php myLang("Opening"); ?></label>
|
||||
<input type="checkbox" class="form-control " name="showOB" id="showOB" aria-describedby="helpId_showOB" placeholder="Show Opening Balance" <?php echo (isset($_POST['showOB'])) ? "" : "CHECKED"; ?>>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-1 text-center">
|
||||
<div class="form-group">
|
||||
<label for="showClosing"><?php myLang("Closing"); ?></label>
|
||||
<input type="checkbox" class="form-control " name="showClosing" id="showClosing" aria-describedby="helpId_showClosing" placeholder="Show Closing Balance" <?php echo (isset($_POST['showClosing'])) ? "" : "CHECKED"; ?>>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-1 text-center">
|
||||
<div class="form-group">
|
||||
<label for="showPeriod"><?php myLang("Period"); ?></label>
|
||||
<input type="checkbox" class="form-control " name="showPeriod" id="showPeriod" aria-describedby="helpId_showPeriod" placeholder="Show Periodic Balance" <?php echo (isset($_POST['showPeriod'])) ? "CHECKED" : "CHECKED"; ?>>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="form-group d-flex justify-content-end">
|
||||
<button type="submit" class="btn btn-primary mr-2">Filter</button>
|
||||
<button type="submit" class="btn btn-success mr-2">Export</button>
|
||||
<button type="button" class="btn btn-warning" onclick="resetForm()">Reset</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
function resetForm() {
|
||||
document.getElementById("fromDate").value = "2078-4-1";
|
||||
document.getElementById("toDate").value = "2079-3-32";
|
||||
document.getElementById("showOB").checked = false;
|
||||
document.getElementById("showClosing").checked = false;
|
||||
document.getElementById("FilterForm").submit();
|
||||
}
|
||||
</script>
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
</div><!-- /.container-fluid -->
|
||||
</section>
|
||||
@@ -230,32 +191,34 @@ $BIBAccounts = new BIBAccounts();
|
||||
<!-- <button class="btn btn-secondary toggle-collapse mr-2" id="toggleShowAll">Toggle Collapse</button> -->
|
||||
|
||||
<div class="card card-primary card-outline">
|
||||
<div class="card-body p-0">
|
||||
<div class="card-body pl-2 ">
|
||||
|
||||
<div class="row">
|
||||
<?php
|
||||
// echo $_POST['showClosing'];
|
||||
$ReportOptions = array(
|
||||
'showZeroBalances' => false,
|
||||
'showOB' => false,
|
||||
'showClosing' => true,
|
||||
'showPeriod' => false,
|
||||
);
|
||||
?>
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="group-name"><b>Particulars</b></td>
|
||||
<td class="group-total text-right pr-2 "><b>Amount</b></td>
|
||||
<td class="group-name"><b>Particulars</b></td>
|
||||
<td class="group-total text-right pr-2"><b>Amount</b></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2" class="p-0">
|
||||
// echo $_POST['showClosing'];
|
||||
$ReportOptions = array(
|
||||
'showZeroBalances' => false,
|
||||
'showOB' => false,
|
||||
'showClosing' => true,
|
||||
'showPeriod' => false,
|
||||
);
|
||||
?>
|
||||
<?php $AccountGroups = $BIBAccounts->getAccountGroupsWithBalances(2); ?>
|
||||
<?php $Side1Total = 0; ?>
|
||||
<div class="col-6 p-0 m-0 gy-0">
|
||||
<div class="table-responsive">
|
||||
<table class="table mb-0 pb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="group-name pl-1">Particulars</th>
|
||||
<th class="group-total text-center col-1">Amount</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php $AccountGroups = $BIBAccounts->getAccountGroupsWithBalances(2); ?>
|
||||
<?php $Side1Total = 0; ?>
|
||||
<table class="table table-bordered vertical-borders" id="TrialBalanceTable">
|
||||
<?php
|
||||
<?php
|
||||
// Initialize variables for column totals
|
||||
$incomes_totalOpeningDr = 0;
|
||||
$incomes_totalOpeningCr = 0;
|
||||
@@ -282,9 +245,8 @@ $BIBAccounts = new BIBAccounts();
|
||||
$Side1Total += $group->closing_balance;
|
||||
?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<?php $AccountGroups = $BIBAccounts->getAccountGroupsWithBalances(5); ?>
|
||||
<table class="table table-bordered vertical-borders" id="TrialBalanceTable">
|
||||
<?php $AccountGroups = $BIBAccounts->getAccountGroupsWithBalances(5); ?>
|
||||
|
||||
<?php
|
||||
// Initialize variables for column totals
|
||||
$incomes_totalOpeningDr = 0;
|
||||
@@ -312,11 +274,25 @@ $BIBAccounts = new BIBAccounts();
|
||||
$Side1Total += $group->closing_balance;
|
||||
?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</td>
|
||||
<td colspan="2" class="p-0">
|
||||
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 p-0 m-0">
|
||||
<div class="table-responsive">
|
||||
<table class="table mt-0 pt-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="group-name pl-1">Particulars</th>
|
||||
<th class="group-total text-center col-1">Amount</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $AccountGroups = $BIBAccounts->getAccountGroupsWithBalances(1); ?>
|
||||
<table class="table table-bordered vertical-borders" id="TrialBalanceTable">
|
||||
|
||||
<?php
|
||||
// Initialize variables for column totals
|
||||
$totalOpeningDr = 0;
|
||||
@@ -329,7 +305,7 @@ $BIBAccounts = new BIBAccounts();
|
||||
<?php foreach ($AccountGroups as $group) : ?>
|
||||
<tr class="group-heading" data-toggle="collapse" data-target="#group_<?php echo $group->acgroup_id; ?>">
|
||||
<td class="group-name"><b><?php echo $group->acgroup_name; ?></b></td>
|
||||
<td class="group-total text-right pr-2"><?php echo myCurrency(($group->posting_side == "DR") ? $group->closing_balance : 0); ?></td>
|
||||
<td class="group-total text-right "><?php echo myCurrency(($group->posting_side == "DR") ? $group->closing_balance : 0); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7" class="group-details p-0">
|
||||
@@ -349,33 +325,85 @@ $BIBAccounts = new BIBAccounts();
|
||||
$totalClosingCr += ($group->posting_side == "CR") ? $group->closing_balance : 0;
|
||||
?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
// pre($BIBAccounts->getAccountGroupsWithBalances(4));
|
||||
$TotalIncomes = $BIBAccounts->getAccountGroupsWithBalances(3)[0]->closing_balance;
|
||||
$TotalExpenses = $BIBAccounts->getAccountGroupsWithBalances(4)[0]->closing_balance;
|
||||
$PL = $TotalIncomes - $TotalExpenses;
|
||||
$Side1Total += $PL;
|
||||
?>
|
||||
?>
|
||||
|
||||
<div class="col-6 p-0 m-0 gy-0">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td colspan="2" class="p-0">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td>Total Profit/Loss</td>
|
||||
<td><b> Profit/Loss</b></td>
|
||||
<td class="cr closing-cr"><?php echo myCurrency($PL); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td colspan="2" class="p-0">
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="p-0">
|
||||
<table class="table table-bordered">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>Total Amount</th>
|
||||
<th class="pl-1">Total Amount</th>
|
||||
<th class="cr closing-cr">
|
||||
<?php echo myCurrency($Side1Total); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-6 p-0 m-0 gy-0">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="p-0">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th class="pl-1">Total Amount</th>
|
||||
<th class="dr closing-dr">
|
||||
<?php echo myCurrency($totalClosingDr); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- <div class="col-12 p-0">
|
||||
<table class="table">
|
||||
<?php
|
||||
// pre($BIBAccounts->getAccountGroupsWithBalances(4));
|
||||
// $TotalIncomes = $BIBAccounts->getAccountGroupsWithBalances(3)[0]->closing_balance;
|
||||
// $TotalExpenses = $BIBAccounts->getAccountGroupsWithBalances(4)[0]->closing_balance;
|
||||
// $PL = $TotalIncomes - $TotalExpenses;
|
||||
// $Side1Total += $PL;
|
||||
?>
|
||||
<tr>
|
||||
<td>Total Profit/Loss</td>
|
||||
<td class="cr closing-cr"><?php echo myCurrency($PL); ?></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="p-0">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th class="pl-1">Total Amount</th>
|
||||
<th class="cr closing-cr">
|
||||
<?php echo myCurrency($Side1Total); ?>
|
||||
</th>
|
||||
@@ -383,9 +411,9 @@ $BIBAccounts = new BIBAccounts();
|
||||
</table>
|
||||
</td>
|
||||
<td colspan="2" class="p-0">
|
||||
<table class="table table-bordered">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>Total Amount</th>
|
||||
<th class="pl-1">Total Amount</th>
|
||||
<th class="dr closing-dr">
|
||||
<?php echo myCurrency($totalClosingDr); ?>
|
||||
</th>
|
||||
@@ -393,92 +421,96 @@ $BIBAccounts = new BIBAccounts();
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php //pre($BIBAccounts->getAccountGroupsWithBalances($acgroup_id = null));
|
||||
?>
|
||||
</table>
|
||||
</div> -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
function footerfunctions()
|
||||
{
|
||||
?>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Prevent the dropdown from closing when clicking inside
|
||||
$('.dropdown-menu').on('click', function(event) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
document.getElementById("toggleShowAll").click();
|
||||
});
|
||||
document.getElementById("toggleShowAll").addEventListener("click", function(e) {
|
||||
e.preventDefault();
|
||||
var nestedRows = document.getElementsByClassName("collapse");
|
||||
for (var i = 0; i < nestedRows.length; i++) {
|
||||
if (nestedRows[i].classList.contains("show")) {
|
||||
nestedRows[i].classList.remove("show");
|
||||
} else {
|
||||
nestedRows[i].classList.add("show");
|
||||
}
|
||||
}
|
||||
});
|
||||
var exportButton = document.getElementById("exportButton");
|
||||
exportButton.addEventListener("click", function() {
|
||||
exportTableToCSV("table.csv");
|
||||
});
|
||||
<?php
|
||||
function footerfunctions()
|
||||
{
|
||||
?>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Prevent the dropdown from closing when clicking inside
|
||||
$('.dropdown-menu').on('click', function(event) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
document.getElementById("toggleShowAll").click();
|
||||
});
|
||||
document.getElementById("toggleShowAll").addEventListener("click", function(e) {
|
||||
e.preventDefault();
|
||||
var nestedRows = document.getElementsByClassName("collapse");
|
||||
for (var i = 0; i < nestedRows.length; i++) {
|
||||
if (nestedRows[i].classList.contains("show")) {
|
||||
nestedRows[i].classList.remove("show");
|
||||
} else {
|
||||
nestedRows[i].classList.add("show");
|
||||
}
|
||||
}
|
||||
});
|
||||
var exportButton = document.getElementById("exportButton");
|
||||
exportButton.addEventListener("click", function() {
|
||||
exportTableToCSV("table.csv");
|
||||
});
|
||||
|
||||
function exportTableToCSV(filename) {
|
||||
var csv = [];
|
||||
var rows = document.querySelectorAll("table tr:not(.hide)");
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
var row = [];
|
||||
var cols = rows[i].querySelectorAll("td:not(.hide), th:not(.hide)");
|
||||
// Check if the parent row is collapsed or hidden
|
||||
var parentRow = rows[i].closest(".collapse");
|
||||
var isParentCollapsed = parentRow && (!parentRow.classList.contains("show"));
|
||||
if (isParentCollapsed) {
|
||||
continue; // Skip child table rows if parent is collapsed
|
||||
function exportTableToCSV(filename) {
|
||||
var csv = [];
|
||||
var rows = document.querySelectorAll("table tr:not(.hide)");
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
var row = [];
|
||||
var cols = rows[i].querySelectorAll("td:not(.hide), th:not(.hide)");
|
||||
// Check if the parent row is collapsed or hidden
|
||||
var parentRow = rows[i].closest(".collapse");
|
||||
var isParentCollapsed = parentRow && (!parentRow.classList.contains("show"));
|
||||
if (isParentCollapsed) {
|
||||
continue; // Skip child table rows if parent is collapsed
|
||||
}
|
||||
for (var j = 0; j < cols.length; j++) {
|
||||
var cellValue = cols[j].innerText.replace(/,/g, ""); // Remove commas from the cell value
|
||||
row.push(cellValue);
|
||||
}
|
||||
csv.push(row.join(","));
|
||||
}
|
||||
// Create a CSV file
|
||||
var csvContent = "data:text/csv;charset=utf-8," + csv.join("\n");
|
||||
var encodedUri = encodeURI(csvContent);
|
||||
var link = document.createElement("a");
|
||||
link.setAttribute("href", encodedUri);
|
||||
link.setAttribute("download", filename);
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
}
|
||||
for (var j = 0; j < cols.length; j++) {
|
||||
var cellValue = cols[j].innerText.replace(/,/g, ""); // Remove commas from the cell value
|
||||
row.push(cellValue);
|
||||
}
|
||||
csv.push(row.join(","));
|
||||
}
|
||||
// Create a CSV file
|
||||
var csvContent = "data:text/csv;charset=utf-8," + csv.join("\n");
|
||||
var encodedUri = encodeURI(csvContent);
|
||||
var link = document.createElement("a");
|
||||
link.setAttribute("href", encodedUri);
|
||||
link.setAttribute("download", filename);
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
</script>
|
||||
<script>
|
||||
$("#fromDate").nepaliDatePicker({
|
||||
dateFormat: "%y-%m-%d",
|
||||
closeOnDateSelect: true,
|
||||
minDate: $('#fromDate').data('start'),
|
||||
maxDate: $('#fromDate').data('end'),
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$("#toDate").nepaliDatePicker({
|
||||
dateFormat: "%y-%m-%d",
|
||||
closeOnDateSelect: true,
|
||||
minDate: $('#toDate').data('start'),
|
||||
maxDate: $('#toDate').data('end'),
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
$("#fromDate").nepaliDatePicker({
|
||||
dateFormat: "%y-%m-%d",
|
||||
closeOnDateSelect: true,
|
||||
minDate: $('#fromDate').data('start'),
|
||||
maxDate: $('#fromDate').data('end'),
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$("#toDate").nepaliDatePicker({
|
||||
dateFormat: "%y-%m-%d",
|
||||
closeOnDateSelect: true,
|
||||
minDate: $('#toDate').data('start'),
|
||||
maxDate: $('#toDate').data('end'),
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
405
account/application/views/accounts/balancesheet_newbackup.php
Normal file
405
account/application/views/accounts/balancesheet_newbackup.php
Normal file
@@ -0,0 +1,405 @@
|
||||
<?php
|
||||
$this->load->library("BIBAccounts");
|
||||
$BIBAccounts = new BIBAccounts();
|
||||
?>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="card card-primary card-outline">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title mt-1"><?php echo $pageTitle; ?> </h3>
|
||||
<div class="card-tools">
|
||||
<form method="post" action="" id="FilterForm">
|
||||
<!-- button with a dropdown -->
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-success btn-sm dropdown-toggle" data-toggle="dropdown" data-offset="-52">
|
||||
Filters
|
||||
</button>
|
||||
<div class="dropdown-menu" role="menu">
|
||||
<div class="form-group p-2 pb-0">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label for="fromDate"><?php myLang("Starting Period"); ?></label>
|
||||
<input type="text" class="form-control " name="fromDate" value="<?php echo (isset($_POST['fromDate'])) ? $_POST['fromDate'] : NepaliDate($this->session->FiscalYear->fiscalyear_from); ?>" data-start="<?php echo $fiscalStart; ?>" data-end="<?php echo $fiscalEnd; ?>" id="fromDate" aria-describedby="helpId_fromDate" placeholder="Starting Period">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="toDate"><?php myLang("Ending Period"); ?></label>
|
||||
<input type="text" class="form-control " name="toDate" value="<?php echo (isset($_POST['toDate'])) ? $_POST['toDate'] : NepaliDate($this->session->FiscalYear->fiscalyear_to); ?>" data-start="<?php echo $fiscalStart; ?>" data-end="<?php echo $fiscalEnd; ?>" id="toDate" aria-describedby="helpId_toDate" placeholder="Ending Period">
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown-divider"></div>
|
||||
<!-- <div class="form-check">
|
||||
<input class="form-check-input" type="checkbox">
|
||||
<label class="form-check-label">Select
|
||||
All</label>
|
||||
</div> -->
|
||||
<div class="form-check">
|
||||
<!-- <input type="hidden" name="showOB" value="not"> -->
|
||||
<input type="checkbox" class="form-check-input " name="showOB" id="showOB" aria-describedby="helpId_showOB" placeholder="Show Opening Balance" <?php echo (isset($_POST['showOB'])) ? "CHECKED" : ""; ?>>
|
||||
<!-- <input class="form-check-input" type="checkbox"> -->
|
||||
<label class="form-check-label" for="showOB">Opening</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<!-- <input class="form-check-input" type="checkbox"> -->
|
||||
<input type="checkbox" class="form-check-input " name="showClosing" id="showClosing" aria-describedby="helpId_showClosing" placeholder="Show Closing Balance" <?php echo (isset($_POST['showClosing'])) ? "CHECKED" : ""; ?>>
|
||||
<label class="form-check-label" for="showClosing">Closing</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<!-- <input class="form-check-input" type="checkbox" checked> -->
|
||||
<input type="checkbox" class="form-check-input" name="showPeriod" id="showPeriod" aria-describedby="helpId_showPeriod" placeholder="Show Periodic Balance" <?php echo (isset($_POST['showPeriod'])) ? "CHECKED" : "CHECKED"; ?>>
|
||||
<label class="form-check-label" for="showPeriod">Period</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown-divider"></div>
|
||||
<div class="form-group p-2 pb-0 text-right">
|
||||
<button type="button" class="btn btn-info btn-sm " style="width:60px;height:30px;" onclick="resetForm()">Reset</button>
|
||||
<button type="submit" class="btn btn-primary mr-2 btn-sm" style="width:60px;height:30px;">Search </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button type="submit" class="btn btn-warning btn-sm " data-toggle="dropdown" data-offset="-52">
|
||||
Export
|
||||
</button>
|
||||
<!-- <button class="btn btn-secondary toggle-collapse btn-sm" id="toggleShowAll">Toggle
|
||||
Collapse</button> -->
|
||||
<!-- <div class="dropdown-menu" role="menu">
|
||||
<a href="#" class="dropdown-item">Export</a>
|
||||
<a href="#" class="dropdown-item">Pdf</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a href="#" class="dropdown-item">View calendar</a>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<button class="btn btn-secondary toggle-collapse btn-sm" id="toggleShowAll">Toggle Collapse</button>
|
||||
</form>
|
||||
<script>
|
||||
function resetForm() {
|
||||
document.getElementById("fromDate").value = "<?php echo NepaliDate($this->session->FiscalYear->fiscalyear_from); ?>";
|
||||
document.getElementById("toDate").value = "<?php echo NepaliDate($this->session->FiscalYear->fiscalyear_to); ?>";
|
||||
document.getElementById("showOB").checked = <?php echo "false"; ?>;
|
||||
document.getElementById("showClosing").checked = <?php echo "false"; ?>;
|
||||
document.getElementById("FilterForm").submit();
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<!-- /.card-tools -->
|
||||
</div>
|
||||
<!-- <div class="card-body">
|
||||
<form method="post" action="" id="FilterForm">
|
||||
<div class="row align-items-end">
|
||||
<div class="col-2">
|
||||
<div class="form-group">
|
||||
<label for="fromDate"><?php //myLang("Starting Period"); ?></label>
|
||||
<input type="text" class="form-control nepaliDatePicker" name="fromDate" value="<?php //echo (isset($_POST['fromDate'])) ? $_POST['fromDate'] : NepaliDate($this->session->FiscalYear->fiscalyear_from); ?>" id="fromDate" aria-describedby="helpId_fromDate" placeholder="Starting Period">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="form-group">
|
||||
<label for="toDate"><?php //myLang("Ending Period"); ?></label>
|
||||
<input type="text" class="form-control nepaliDatePicker" name="toDate" value="<?php //echo (isset($_POST['toDate'])) ? $_POST['toDate'] : NepaliDate($this->session->FiscalYear->fiscalyear_to); ?>" id="toDate" aria-describedby="helpId_toDate" placeholder="Ending Period">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-1 text-center">
|
||||
<div class="form-group">
|
||||
<label for="showOB"><?php// myLang("Opening"); ?></label>
|
||||
<input type="checkbox" class="form-control " name="showOB" id="showOB" aria-describedby="helpId_showOB" placeholder="Show Opening Balance" <?php echo (isset($_POST['showOB'])) ? "" : "CHECKED"; ?>>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-1 text-center">
|
||||
<div class="form-group">
|
||||
<label for="showClosing"><?php //myLang("Closing"); ?></label>
|
||||
<input type="checkbox" class="form-control " name="showClosing" id="showClosing" aria-describedby="helpId_showClosing" placeholder="Show Closing Balance" <?php echo (isset($_POST['showClosing'])) ? "" : "CHECKED"; ?>>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-1 text-center">
|
||||
<div class="form-group">
|
||||
<label for="showPeriod"><?php //myLang("Period"); ?></label>
|
||||
<input type="checkbox" class="form-control " name="showPeriod" id="showPeriod" aria-describedby="helpId_showPeriod" placeholder="Show Periodic Balance" <?php echo (isset($_POST['showPeriod'])) ? "CHECKED" : "CHECKED"; ?>>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="form-group d-flex justify-content-end">
|
||||
<button type="submit" class="btn btn-primary mr-2">Filter</button>
|
||||
<button type="submit" class="btn btn-success mr-2">Export</button>
|
||||
<button type="button" class="btn btn-warning" onclick="resetForm()">Reset</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
function resetForm() {
|
||||
document.getElementById("fromDate").value = "2078-4-1";
|
||||
document.getElementById("toDate").value = "2079-3-32";
|
||||
document.getElementById("showOB").checked = false;
|
||||
document.getElementById("showClosing").checked = false;
|
||||
document.getElementById("FilterForm").submit();
|
||||
}
|
||||
</script>
|
||||
</div> -->
|
||||
</div>
|
||||
</div><!-- /.container-fluid -->
|
||||
</section>
|
||||
<div class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<!-- <button class="btn btn-secondary toggle-collapse mr-2" id="toggleShowAll">Toggle Collapse</button> -->
|
||||
|
||||
<div class="card card-primary card-outline">
|
||||
<div class="card-body p-0">
|
||||
<?php
|
||||
// echo $_POST['showClosing'];
|
||||
$ReportOptions = array(
|
||||
'showZeroBalances' => false,
|
||||
'showOB' => false,
|
||||
'showClosing' => true,
|
||||
'showPeriod' => false,
|
||||
);
|
||||
?>
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="group-name "><b>Liabilities</b></td>
|
||||
<td class="group-total text-right pr-2 "><b>Amount</b></td>
|
||||
<td class="group-name"><b>Assets</b></td>
|
||||
<td class="group-total text-right pr-2"><b>Amount</b></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2" class="p-0">
|
||||
<?php $AccountGroups = $BIBAccounts->getAccountGroupsWithBalances(2); ?>
|
||||
<?php $Side1Total = 0; ?>
|
||||
<table class="table table-bordered vertical-borders" id="TrialBalanceTable">
|
||||
<?php
|
||||
// Initialize variables for column totals
|
||||
$incomes_totalOpeningDr = 0;
|
||||
$incomes_totalOpeningCr = 0;
|
||||
$incomes_totalThisYearDr = 0;
|
||||
$incomes_totalThisYearCr = 0;
|
||||
$incomes_totalClosingDr = 0;
|
||||
$incomes_totalClosingCr = 0;
|
||||
?>
|
||||
<?php foreach ($AccountGroups as $group) : ?>
|
||||
<tr class="group-heading" data-toggle="collapse" data-target="#group_<?php echo $group->acgroup_id; ?>">
|
||||
<td><b><?php echo $group->acgroup_name; ?></b></td>
|
||||
<td width="20%"><?php echo myCurrency(($group->posting_side == "CR") ? $group->closing_balance : 0); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7" class="group-details p-0">
|
||||
<div id="group_<?php echo $group->acgroup_id; ?>" class="">
|
||||
<?php $Accountcategories = $BIBAccounts->getRootCategoriesWithBalances($group->acgroup_id); ?>
|
||||
<?php $BIBAccounts->renderAccountCategoriesTable($Accountcategories, $ReportOptions, false, array()); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
// Update column totals
|
||||
$Side1Total += $group->closing_balance;
|
||||
?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<?php $AccountGroups = $BIBAccounts->getAccountGroupsWithBalances(5); ?>
|
||||
<table class="table table-bordered vertical-borders" id="TrialBalanceTable">
|
||||
<?php
|
||||
// Initialize variables for column totals
|
||||
$incomes_totalOpeningDr = 0;
|
||||
$incomes_totalOpeningCr = 0;
|
||||
$incomes_totalThisYearDr = 0;
|
||||
$incomes_totalThisYearCr = 0;
|
||||
$incomes_totalClosingDr = 0;
|
||||
$incomes_totalClosingCr = 0;
|
||||
?>
|
||||
<?php foreach ($AccountGroups as $group) : ?>
|
||||
<tr class="group-heading" data-toggle="collapse" data-target="#group_<?php echo $group->acgroup_id; ?>">
|
||||
<td class="group-name"><b><?php echo $group->acgroup_name; ?></b></td>
|
||||
<td class="group-total"><?php echo myCurrency(($group->posting_side == "CR") ? $group->closing_balance : 0); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7" class="group-details p-0">
|
||||
<div id="group_<?php echo $group->acgroup_id; ?>" class="">
|
||||
<?php $Accountcategories = $BIBAccounts->getRootCategoriesWithBalances($group->acgroup_id); ?>
|
||||
<?php $BIBAccounts->renderAccountCategoriesTable($Accountcategories, $ReportOptions, false, array()); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
// Update column totals
|
||||
$Side1Total += $group->closing_balance;
|
||||
?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</td>
|
||||
<td colspan="2" class="p-0">
|
||||
<?php $AccountGroups = $BIBAccounts->getAccountGroupsWithBalances(1); ?>
|
||||
<table class="table table-bordered vertical-borders" id="TrialBalanceTable">
|
||||
<?php
|
||||
// Initialize variables for column totals
|
||||
$totalOpeningDr = 0;
|
||||
$totalOpeningCr = 0;
|
||||
$totalThisYearDr = 0;
|
||||
$totalThisYearCr = 0;
|
||||
$totalClosingDr = 0;
|
||||
$totalClosingCr = 0;
|
||||
?>
|
||||
<?php foreach ($AccountGroups as $group) : ?>
|
||||
<tr class="group-heading" data-toggle="collapse" data-target="#group_<?php echo $group->acgroup_id; ?>">
|
||||
<td class="group-name"><b><?php echo $group->acgroup_name; ?></b></td>
|
||||
<td class="group-total text-right pr-2"><?php echo myCurrency(($group->posting_side == "DR") ? $group->closing_balance : 0); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7" class="group-details p-0">
|
||||
<div id="group_<?php echo $group->acgroup_id; ?>" class="">
|
||||
<?php $Accountcategories = $BIBAccounts->getRootCategoriesWithBalances($group->acgroup_id); ?>
|
||||
<?php $BIBAccounts->renderAccountCategoriesTable($Accountcategories, $ReportOptions, false, array()); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
// Update column totals
|
||||
$totalOpeningDr += ($group->posting_side == "DR") ? $group->opening_balance : 0;
|
||||
$totalOpeningCr += ($group->posting_side == "CR") ? $group->opening_balance : 0;
|
||||
$totalThisYearDr += ($group->posting_side == "DR") ? $group->regular_balance : 0;
|
||||
$totalThisYearCr += ($group->posting_side == "CR") ? $group->regular_balance : 0;
|
||||
$totalClosingDr += ($group->posting_side == "DR") ? $group->closing_balance : 0;
|
||||
$totalClosingCr += ($group->posting_side == "CR") ? $group->closing_balance : 0;
|
||||
?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
// pre($BIBAccounts->getAccountGroupsWithBalances(4));
|
||||
$TotalIncomes = $BIBAccounts->getAccountGroupsWithBalances(3)[0]->closing_balance;
|
||||
$TotalExpenses = $BIBAccounts->getAccountGroupsWithBalances(4)[0]->closing_balance;
|
||||
$PL = $TotalIncomes - $TotalExpenses;
|
||||
$Side1Total += $PL;
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="2" class="p-0">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td>Total Profit/Loss</td>
|
||||
<td class="cr closing-cr"><?php echo myCurrency($PL); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td colspan="2" class="p-0">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="p-0">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>Total Amount</th>
|
||||
<th class="cr closing-cr">
|
||||
<?php echo myCurrency($Side1Total); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td colspan="2" class="p-0">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>Total Amount</th>
|
||||
<th class="dr closing-dr">
|
||||
<?php echo myCurrency($totalClosingDr); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php //pre($BIBAccounts->getAccountGroupsWithBalances($acgroup_id = null));
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
function footerfunctions()
|
||||
{
|
||||
?>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Prevent the dropdown from closing when clicking inside
|
||||
$('.dropdown-menu').on('click', function(event) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
document.getElementById("toggleShowAll").click();
|
||||
});
|
||||
document.getElementById("toggleShowAll").addEventListener("click", function(e) {
|
||||
e.preventDefault();
|
||||
var nestedRows = document.getElementsByClassName("collapse");
|
||||
for (var i = 0; i < nestedRows.length; i++) {
|
||||
if (nestedRows[i].classList.contains("show")) {
|
||||
nestedRows[i].classList.remove("show");
|
||||
} else {
|
||||
nestedRows[i].classList.add("show");
|
||||
}
|
||||
}
|
||||
});
|
||||
var exportButton = document.getElementById("exportButton");
|
||||
exportButton.addEventListener("click", function() {
|
||||
exportTableToCSV("table.csv");
|
||||
});
|
||||
|
||||
function exportTableToCSV(filename) {
|
||||
var csv = [];
|
||||
var rows = document.querySelectorAll("table tr:not(.hide)");
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
var row = [];
|
||||
var cols = rows[i].querySelectorAll("td:not(.hide), th:not(.hide)");
|
||||
// Check if the parent row is collapsed or hidden
|
||||
var parentRow = rows[i].closest(".collapse");
|
||||
var isParentCollapsed = parentRow && (!parentRow.classList.contains("show"));
|
||||
if (isParentCollapsed) {
|
||||
continue; // Skip child table rows if parent is collapsed
|
||||
}
|
||||
for (var j = 0; j < cols.length; j++) {
|
||||
var cellValue = cols[j].innerText.replace(/,/g, ""); // Remove commas from the cell value
|
||||
row.push(cellValue);
|
||||
}
|
||||
csv.push(row.join(","));
|
||||
}
|
||||
// Create a CSV file
|
||||
var csvContent = "data:text/csv;charset=utf-8," + csv.join("\n");
|
||||
var encodedUri = encodeURI(csvContent);
|
||||
var link = document.createElement("a");
|
||||
link.setAttribute("href", encodedUri);
|
||||
link.setAttribute("download", filename);
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
$("#fromDate").nepaliDatePicker({
|
||||
dateFormat: "%y-%m-%d",
|
||||
closeOnDateSelect: true,
|
||||
minDate: $('#fromDate').data('start'),
|
||||
maxDate: $('#fromDate').data('end'),
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$("#toDate").nepaliDatePicker({
|
||||
dateFormat: "%y-%m-%d",
|
||||
closeOnDateSelect: true,
|
||||
minDate: $('#toDate').data('start'),
|
||||
maxDate: $('#toDate').data('end'),
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
}
|
@@ -90,6 +90,36 @@ $PL = $IncomesTotal - $ExpensesTotal;
|
||||
box-shadow: inset 0 0 0 transparent;
|
||||
transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
|
||||
}
|
||||
|
||||
.table1 {
|
||||
border: 0px !important;
|
||||
padding: 0;
|
||||
margin: 10 !important;
|
||||
width: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.table-responsive {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
-webkit-flex: 1 1 auto;
|
||||
-ms-flex: 1 1 auto;
|
||||
flex: 1 1 auto;
|
||||
min-height: 1px;
|
||||
padding: 0;
|
||||
}
|
||||
table {
|
||||
border: 1px solid #ddd;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.card-body.p-0 .table tbody>tr>td:last-of-type, .card-body.p-0 .table tbody>tr>th:last-of-type, .card-body.p-0 .table tfoot>tr>td:last-of-type, .card-body.p-0 .table tfoot>tr>th:last-of-type, .card-body.p-0 .table thead>tr>td:last-of-type, .card-body.p-0 .table thead>tr>th:last-of-type {
|
||||
padding-right:0!important;
|
||||
}
|
||||
.text-bold{
|
||||
font-weight: 900;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<section class="content">
|
||||
@@ -159,7 +189,6 @@ $PL = $IncomesTotal - $ExpensesTotal;
|
||||
</div> -->
|
||||
</div>
|
||||
<button class="btn btn-secondary toggle-collapse btn-sm" id="toggleShowAll">Toggle Collapse</button>
|
||||
|
||||
<!-- <button type="button" class="btn btn-warning btn-sm" onclick="resetForm()">Reset</button> -->
|
||||
<!-- <button class="btn btn-secondary toggle-collapse btn-sm" id="toggleShowAll">Toggle Collapse</button> -->
|
||||
</form>
|
||||
@@ -236,15 +265,19 @@ $PL = $IncomesTotal - $ExpensesTotal;
|
||||
</div> -->
|
||||
<div class="card-body table-responsive p-0">
|
||||
<?php $IncomesExpenses = $BIBAccounts->prepareIncomeExpenses() ?>
|
||||
<table class="table table-head-fixed table-bordered g-0">
|
||||
|
||||
|
||||
|
||||
|
||||
<table class="table table-bordered p-0 ">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="" width="30%"><?php myLang("Cash inflow"); ?></th>
|
||||
<th class="text-right" width="10%"></th>
|
||||
<th class="text-right pr-2" width="15%"><?php myLang("Amount"); ?></th>
|
||||
<th class="text-right pr-1" width="10%"><?php myLang("Amount"); ?></th>
|
||||
<th class="pl-2" width="30%"><?php echo myLang("Cash outflow"); ?></th>
|
||||
<th class="text-right" width="10%"></th>
|
||||
<th class="text-right pr-3" width="15%"><?php myLang("Amount"); ?></th>
|
||||
<th class="text-right pr-1" width="10%"><?php myLang("Amount"); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -263,25 +296,24 @@ $PL = $IncomesTotal - $ExpensesTotal;
|
||||
</tr> -->
|
||||
<?php elseif ($Incomes['account'] == "CATEGORY TOTAL") : ?>
|
||||
<tr class="parent-row" class="group-heading" data-toggle="collapse" data-target="#group_<?php echo $index; ?>">
|
||||
<td class="pr-2" width="70%"><b><?php echo $Incomes['category']; ?></b></td>
|
||||
<td width="15%"></td>
|
||||
<td class="text-right pr-2" width="15%"><?php echo myCurrency($Incomes['amount']); ?></td>
|
||||
<td class="" width="60%"><b><?php echo $Incomes['category']; ?></b></td>
|
||||
<td width="20%"></td>
|
||||
<td class="text-right " width="20%"><?php echo myCurrency($Incomes['amount']); ?></td>
|
||||
</tr>
|
||||
<?php else : ?>
|
||||
<?php $total1 += $Incomes['amount']; ?>
|
||||
<tr class="collapse" data-target="#group_<?php echo $index; ?>">
|
||||
<td class="pr-2" width="70%"> <?php echo $Incomes['account']; ?></td>
|
||||
<td class="text-right pr-2" width="15%"><?php echo myCurrency($Incomes['amount']); ?></td>
|
||||
<td width="15%"></td>
|
||||
<td class="" width="60%"> <?php echo $Incomes['account']; ?></td>
|
||||
<td class="text-right " width="20%"><?php echo myCurrency($Incomes['amount']); ?></td>
|
||||
<td width="20%"></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php $counter = $index ?>
|
||||
|
||||
<?php }; ?>
|
||||
</table>
|
||||
</td>
|
||||
<td colspan=3 class="p-0">
|
||||
<table class="table g-0">
|
||||
<table class="table p-0">
|
||||
<?php $total = 0;
|
||||
foreach ($IncomesExpenses['Expenses'] as $Expenses) {
|
||||
if ($Expenses['account'] == "GROUP TOTAL") : ?>
|
||||
@@ -292,17 +324,16 @@ $PL = $IncomesTotal - $ExpensesTotal;
|
||||
</tr> -->
|
||||
<?php elseif ($Expenses['account'] == "CATEGORY TOTAL") : ?>
|
||||
<tr data-toggle="collapse" data-target="#group_<?php echo $counter; ?>">
|
||||
<td class="" width="70%"><b><?php echo $Expenses['category']; ?></b></td>
|
||||
<td width="15%"></td>
|
||||
<td class="text-right pr-2" width="15%"><?php echo myCurrency($Expenses['amount']); ?></td>
|
||||
|
||||
<td class="" width="60%"><b><?php echo $Expenses['category']; ?></b></td>
|
||||
<td width="20%"></td>
|
||||
<td class="text-right " width="20%"><?php echo myCurrency($Expenses['amount']); ?></td>
|
||||
</tr>
|
||||
<?php else : ?>
|
||||
<?php $total += $Expenses['amount']; ?>
|
||||
<tr class="collapse" data-target="#group_<?php echo $counter; ?>">
|
||||
<td class="" width="70%"> <?php echo $Expenses['account']; ?></td>
|
||||
<td class="text-right" width="15%"><?php echo myCurrency($Expenses['amount']); ?></td>
|
||||
<td width="15%"></td>
|
||||
<td class="" width="60%"> <?php echo $Expenses['account']; ?></td>
|
||||
<td class="text-right" width="20%"><?php echo myCurrency($Expenses['amount']); ?></td>
|
||||
<td width="20%"></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php }; ?>
|
||||
@@ -311,20 +342,20 @@ $PL = $IncomesTotal - $ExpensesTotal;
|
||||
</tr>
|
||||
</tbody>
|
||||
<tr>
|
||||
<th>Total</th>
|
||||
<th class="p-1">Total</th>
|
||||
<td></td>
|
||||
<td class="text-right pr-2"><?php echo myCurrency($total1); ?></td>
|
||||
<th>Total</th>
|
||||
<td class="text-right text-bold"><?php echo myCurrency($total1); ?></td>
|
||||
<th class="p-1">Total</th>
|
||||
<td></td>
|
||||
<td class="text-right"><?php echo myCurrency($total); ?></td>
|
||||
<td class="text-right text-bold"><?php echo myCurrency($total); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td></td>
|
||||
<td class="text-right"></td>
|
||||
<th>Net Inflow</th>
|
||||
<th class="pl-1">Net Inflow</th>
|
||||
<td></td>
|
||||
<td class="text-right pr-2"><?php echo myCurrency($total1 - $total); ?></td>
|
||||
<td class="text-right text-bold"><?php echo myCurrency($total1 - $total); ?></td>
|
||||
</tr>
|
||||
<?php $Bank = $BIBAccounts->getAccountCategoriesWithBalances(null, 2); ?>
|
||||
<?php foreach ($Bank->accounts as $account) : ?>
|
||||
@@ -332,9 +363,9 @@ $PL = $IncomesTotal - $ExpensesTotal;
|
||||
<th></th>
|
||||
<td></td>
|
||||
<td class="text-right"></td>
|
||||
<th><?php echo $account->account_name; ?></th>
|
||||
<th class="pl-1"><?php echo $account->account_name; ?></th>
|
||||
<td></td>
|
||||
<td class="text-right"><?php echo myCurrency($account->balances['dr_total'] - $account->balances['cr_total']); ?></td>
|
||||
<td class="text-right text-bold"><?php echo myCurrency($account->balances['dr_total'] - $account->balances['cr_total']); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php $Cash = $BIBAccounts->getAccountCategoriesWithBalances(null, 3); ?>
|
||||
@@ -343,9 +374,9 @@ $PL = $IncomesTotal - $ExpensesTotal;
|
||||
<th></th>
|
||||
<td></td>
|
||||
<td class="text-right"></td>
|
||||
<th><?php echo $account->account_name; ?></th>
|
||||
<th class="pl-1"><?php echo $account->account_name; ?></th>
|
||||
<td></td>
|
||||
<td class="text-right"><?php echo myCurrency($account->balances['dr_total'] - $account->balances['cr_total']); ?></td>
|
||||
<td class="text-right text-bold"><?php echo myCurrency($account->balances['dr_total'] - $account->balances['cr_total']); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
@@ -1,70 +1,58 @@
|
||||
<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 bg-primary disabled color-palette">
|
||||
|
||||
<h3 class="card-title m-0"><?php echo $pageTitle; ?></h3>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<form method="GET" action="#">
|
||||
<div class="row">
|
||||
<div class="col"><?php createNepaliDateInput("from_date", "", "from_date", isset($fromDate_Nepali) ? $fromDate_Nepali : firstDayOfNepaliMonth()); ?></div>
|
||||
<div class="col"><?php createNepaliDateInput("to_date", "", "to_date", isset($toDate_Nepali) ? $toDate_Nepali : ''); ?></div>
|
||||
<div class="col"><?php $this->myaccounts->showAccountsCombo("account_id", "", "account_id", "status=1", isset($_GET['account_id']) ? $_GET['account_id'] : 1, $CSSclass = ""); ?> </div>
|
||||
<div class="col"><?php createButton("show_ledger", "Show Ledger", "show_ledger","Submit", "btn btn-primary"); ?></div>
|
||||
<div class="col"><?php createButton("show_ledger", "Show Ledger", "show_ledger", "Submit", "btn btn-primary"); ?></div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div id="dataTable_Commands">
|
||||
|
||||
</div>
|
||||
<?php
|
||||
if(!isset($account_id)){
|
||||
$account_id = 1;
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if (isset($account_id) && $account_id != "") {
|
||||
$fromDate = NepaliToEnglishDate(isset($_GET['from_date']) ? $_GET['from_date'] : firstDayOfNepaliMonth());
|
||||
$toDate = isset($_GET['to_date']) ? $_GET['to_date'] : Today();
|
||||
$this->myaccounts->showLedger($account_id, $fromDate, $toDate, $fiscalStart, $fiscalEnd);
|
||||
} ?>
|
||||
<div class="modal fade" id="ledgerdetails_box" tabindex="-1" role="dialog" aria-labelledby="ledgerdetails_box" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">Ledger Details</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body" id="details_container">
|
||||
Ledger Details Goes Here
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-success" data-dismiss="modal">Print</button>
|
||||
</div>
|
||||
<div id="dataTable_Commands">
|
||||
</div>
|
||||
<?php
|
||||
if (!isset($account_id)) {
|
||||
$account_id = 1;
|
||||
}
|
||||
?>
|
||||
<?php if (isset($account_id) && $account_id != "") {
|
||||
$fromDate = NepaliToEnglishDate(isset($_GET['from_date']) ? $_GET['from_date'] : firstDayOfNepaliMonth());
|
||||
$toDate = isset($_GET['to_date']) ? $_GET['to_date'] : Today();
|
||||
$this->myaccounts->showLedger($account_id, $fromDate, $toDate, $fiscalStart, $fiscalEnd);
|
||||
} ?>
|
||||
<div class="modal fade" id="ledgerdetails_box" tabindex="-1" role="dialog" aria-labelledby="ledgerdetails_box" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">Ledger Details</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body" id="details_container">
|
||||
Ledger Details Goes Here
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-success" data-dismiss="modal">Print</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
430
account/application/views/accounts/pl-bckup.php
Normal file
430
account/application/views/accounts/pl-bckup.php
Normal file
@@ -0,0 +1,430 @@
|
||||
<?php
|
||||
$this->load->library("BIBAccounts");
|
||||
$BIBAccounts = new BIBAccounts();
|
||||
?>
|
||||
<!-- Include jQuery -->
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
|
||||
<!-- Include jQuery UI -->
|
||||
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<style>
|
||||
table,
|
||||
td,
|
||||
tr {
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.group-name {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.group-total {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.table-gray {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.table td,
|
||||
.table th {
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.bg-darker {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
td .table {
|
||||
border: 0px !important;
|
||||
margin-bottom: 0rem;
|
||||
}
|
||||
|
||||
table td:first-child {
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.table-bordered.vertical-borders td,
|
||||
.table-bordered.vertical-borders th {
|
||||
border-left: 1px solid #dee2e6;
|
||||
border-right: 1px solid #dee2e6;
|
||||
}
|
||||
|
||||
.table-bordered.vertical-borders thead th {
|
||||
padding: 0.25rem;
|
||||
border-top: none;
|
||||
border-bottom: 2px solid #dee2e6;
|
||||
}
|
||||
|
||||
.table-bordered.vertical-borders tfoot th {
|
||||
padding: 0.25rem;
|
||||
border-top: 2px solid #dee2e6;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.currency {
|
||||
font-weight: normal !important;
|
||||
}
|
||||
|
||||
.underline {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.form-control {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: calc(1.5rem + 1px);
|
||||
padding: 0.375rem 0.75rem;
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.5;
|
||||
color: #495057;
|
||||
background-color: #fff;
|
||||
background-clip: padding-box;
|
||||
border: 1px solid #ced4da;
|
||||
border-radius: 0.25rem;
|
||||
box-shadow: inset 0 0 0 transparent;
|
||||
transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<div class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="card card-primary card-outline ">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title mt-1"><?php echo $pageTitle; ?> <?php //myLang("Report");
|
||||
?></h2>
|
||||
<div class="card-tools">
|
||||
<form method="post" action="" id="FilterForm">
|
||||
<!-- button with a dropdown -->
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-success btn-sm dropdown-toggle" data-toggle="dropdown" data-offset="-52">
|
||||
Filters
|
||||
</button>
|
||||
<div class="dropdown-menu" role="menu">
|
||||
<div class="form-group p-2 pb-0">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label for="fromDate"><?php myLang("Starting Period"); ?></label>
|
||||
<input type="text" class="form-control " name="fromDate" value="<?php echo (isset($_POST['fromDate'])) ? $_POST['fromDate'] : NepaliDate($this->session->FiscalYear->fiscalyear_from); ?>" data-start="<?php echo $fiscalStart; ?>" data-end="<?php echo $fiscalEnd; ?>" id="fromDate" aria-describedby="helpId_fromDate" placeholder="Starting Period">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="toDate"><?php myLang("Ending Period"); ?></label>
|
||||
<input type="text" class="form-control " name="toDate" value="<?php echo (isset($_POST['toDate'])) ? $_POST['toDate'] : NepaliDate($this->session->FiscalYear->fiscalyear_to); ?>" data-start="<?php echo $fiscalStart; ?>" data-end="<?php echo $fiscalEnd; ?>" id="toDate" aria-describedby="helpId_toDate" placeholder="Ending Period">
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown-divider"></div>
|
||||
<!-- <div class="form-check">
|
||||
<input class="form-check-input" type="checkbox">
|
||||
<label class="form-check-label">Select
|
||||
All</label>
|
||||
</div> -->
|
||||
<div class="form-check">
|
||||
<!-- <input type="hidden" name="showOB" value="not"> -->
|
||||
<input type="checkbox" class="form-check-input " name="showOB" id="showOB" aria-describedby="helpId_showOB" placeholder="Show Opening Balance" <?php echo (isset($_POST['showOB'])) ? "CHECKED" : ""; ?>>
|
||||
<!-- <input class="form-check-input" type="checkbox"> -->
|
||||
<label class="form-check-label" for="showOB">Opening</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<!-- <input class="form-check-input" type="checkbox"> -->
|
||||
<input type="checkbox" class="form-check-input " name="showClosing" id="showClosing" aria-describedby="helpId_showClosing" placeholder="Show Closing Balance" <?php echo (isset($_POST['showClosing'])) ? "CHECKED" : ""; ?>>
|
||||
<label class="form-check-label" for="showClosing">Closing</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<!-- <input class="form-check-input" type="checkbox" checked> -->
|
||||
<input type="checkbox" class="form-check-input" name="showPeriod" id="showPeriod" aria-describedby="helpId_showPeriod" placeholder="Show Periodic Balance" <?php echo (isset($_POST['showPeriod'])) ? "CHECKED" : "CHECKED"; ?>>
|
||||
<label class="form-check-label" for="showPeriod">Period</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown-divider"></div>
|
||||
<div class="form-group p-2 pb-0 text-right">
|
||||
<button type="button" class="btn btn-info btn-sm " style="width:60px;height:30px;" onclick="resetForm()">Reset</button>
|
||||
<button type="submit" class="btn btn-primary mr-2 btn-sm" style="width:60px;height:30px;">Search </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button type="submit" class="btn btn-warning btn-sm " data-toggle="dropdown" data-offset="-52">
|
||||
Export
|
||||
</button>
|
||||
<!-- <div class="dropdown-menu" role="menu">
|
||||
<a href="#" class="dropdown-item">Export</a>
|
||||
<a href="#" class="dropdown-item">Pdf</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a href="#" class="dropdown-item">View calendar</a>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<button class="btn btn-secondary toggle-collapse btn-sm" id="toggleShowAll">Toggle Collapse</button>
|
||||
</form>
|
||||
<script>
|
||||
function resetForm() {
|
||||
document.getElementById("fromDate").value = "<?php echo NepaliDate($this->session->FiscalYear->fiscalyear_from); ?>";
|
||||
document.getElementById("toDate").value = "<?php echo NepaliDate($this->session->FiscalYear->fiscalyear_to); ?>";
|
||||
document.getElementById("showOB").checked = <?php echo "false"; ?>;
|
||||
document.getElementById("showClosing").checked = <?php echo "false"; ?>;
|
||||
document.getElementById("FilterForm").submit();
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<!-- <button class="btn btn-secondary toggle-collapse btn-sm" id="toggleShowAll">Toggle Collapse</button> -->
|
||||
<div class="card card-primary card-outline ">
|
||||
<div class="card-body p-0">
|
||||
<?php
|
||||
// echo $_POST['showClosing'];
|
||||
$ReportOptions = array(
|
||||
'showZeroBalances' => false,
|
||||
'showOB' => false,
|
||||
'showClosing' => true,
|
||||
'showPeriod' => false,
|
||||
);
|
||||
// die;
|
||||
?>
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="group-name" width="85%">Particulars</th>
|
||||
<th class="group-total text-center" width="10%">Amount</th>
|
||||
<th class="group-name" width="85%">Particulars</th>
|
||||
<th class="group-total text-center" width="15%">Amount</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2" class="p-0">
|
||||
<?php $AccountGroups = $BIBAccounts->getAccountGroupsWithBalances(3); ?>
|
||||
<table class="table table-bordered vertical-borders" id="TrialBalanceTable">
|
||||
<?php
|
||||
// Initialize variables for column totals
|
||||
$incomes_totalOpeningDr = 0;
|
||||
$incomes_totalOpeningCr = 0;
|
||||
$incomes_totalThisYearDr = 0;
|
||||
$incomes_totalThisYearCr = 0;
|
||||
$incomes_totalClosingDr = 0;
|
||||
$incomes_totalClosingCr = 0;
|
||||
?>
|
||||
<?php foreach ($AccountGroups as $group) : ?>
|
||||
<tr class="group-heading" data-toggle="collapse" data-target="#group_<?php echo $group->acgroup_id; ?>">
|
||||
<td class="group-name"><b><?php //echo $group->acgroup_name;
|
||||
?></b></td>
|
||||
<td class="group-total text-right"><?php //echo myCurrency(($group->posting_side == "CR") ? $group->closing_balance : 0);
|
||||
?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7" class="group-details p-0" width="85%">
|
||||
<div id="group_<?php echo $group->acgroup_id; ?>" class="">
|
||||
<?php $Accountcategories = $BIBAccounts->getRootCategoriesWithBalances($group->acgroup_id); ?>
|
||||
<?php $BIBAccounts->renderAccountCategoriesTable($Accountcategories, $ReportOptions, false, array()); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
// Update column totals
|
||||
$incomes_totalOpeningDr += ($group->posting_side == "DR") ? $group->opening_balance : 0;
|
||||
$incomes_totalOpeningCr += ($group->posting_side == "CR") ? $group->opening_balance : 0;
|
||||
$incomes_totalThisYearDr += ($group->posting_side == "DR") ? $group->regular_balance : 0;
|
||||
$incomes_totalThisYearCr += ($group->posting_side == "CR") ? $group->regular_balance : 0;
|
||||
$incomes_totalClosingDr += ($group->posting_side == "DR") ? $group->closing_balance : 0;
|
||||
$incomes_totalClosingCr += ($group->posting_side == "CR") ? $group->closing_balance : 0;
|
||||
?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</td>
|
||||
<td colspan="2" class="p-0">
|
||||
<?php $AccountGroups = $BIBAccounts->getAccountGroupsWithBalances(4); ?>
|
||||
<table class="table table-bordered vertical-borders" id="TrialBalanceTable">
|
||||
<?php
|
||||
// Initialize variables for column totals
|
||||
$totalOpeningDr = 0;
|
||||
$totalOpeningCr = 0;
|
||||
$totalThisYearDr = 0;
|
||||
$totalThisYearCr = 0;
|
||||
$totalClosingDr = 0;
|
||||
$totalClosingCr = 0;
|
||||
?>
|
||||
<?php foreach ($AccountGroups as $group) : ?>
|
||||
<tr class="group-heading" data-toggle="collapse" data-target="#group_<?php echo $group->acgroup_id; ?>">
|
||||
<td class="group-name" width="85%"> <?php //echo $group->acgroup_name;
|
||||
?></td>
|
||||
<td class="group-total" width="15%"><?php //echo myCurrency(($group->posting_side == "DR") ? $group->closing_balance : 0);
|
||||
?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7" class="group-details p-0">
|
||||
<div id="group_<?php echo $group->acgroup_id; ?>" class="">
|
||||
<i> <?php $Accountcategories = $BIBAccounts->getRootCategoriesWithBalances($group->acgroup_id); ?>
|
||||
<?php $BIBAccounts->renderAccountCategoriesTable($Accountcategories, $ReportOptions, false, array()); ?>
|
||||
</i>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
// Update column totals
|
||||
$totalOpeningDr += ($group->posting_side == "DR") ? $group->opening_balance : 0;
|
||||
$totalOpeningCr += ($group->posting_side == "CR") ? $group->opening_balance : 0;
|
||||
$totalThisYearDr += ($group->posting_side == "DR") ? $group->regular_balance : 0;
|
||||
$totalThisYearCr += ($group->posting_side == "CR") ? $group->regular_balance : 0;
|
||||
$totalClosingDr += ($group->posting_side == "DR") ? $group->closing_balance : 0;
|
||||
$totalClosingCr += ($group->posting_side == "CR") ? $group->closing_balance : 0;
|
||||
?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $PL = $incomes_totalClosingCr - $totalClosingDr; ?>
|
||||
<?php if ($incomes_totalClosingCr > $totalClosingDr) : ?>
|
||||
<tr>
|
||||
<td colspan="2" width="15%">
|
||||
</td>
|
||||
<td colspan="2" class="p-0">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>Total Profit</th>
|
||||
<th class="cr closing-cr text-right"><?php echo myCurrency($PL); ?></th>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<?php else : ?>
|
||||
<tr>
|
||||
<td colspan="2" class="p-0">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>Total Loss</th>
|
||||
<th class="cr closing-cr"><?php echo myCurrency(abs($PL)); ?></th>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
<td colspan="2" class="p-0">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>Total Incomes</th>
|
||||
<th class="cr closing-cr">
|
||||
<?php if ($PL > 0) : ?>
|
||||
<?php echo myCurrency($incomes_totalClosingCr); ?>
|
||||
<?php else : ?>
|
||||
<?php echo myCurrency($incomes_totalClosingCr + abs($PL)); ?>
|
||||
<?php endif; ?>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td colspan="2" class="p-0">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>Total Expenses</th>
|
||||
<th class="dr closing-dr">
|
||||
<?php if ($PL > 0) : ?>
|
||||
<?php echo myCurrency($totalClosingDr + abs($PL)); ?>
|
||||
<?php else : ?>
|
||||
<?php echo myCurrency($totalClosingDr); ?>
|
||||
<?php endif; ?>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
function footerfunctions()
|
||||
{
|
||||
?>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Prevent the dropdown from closing when clicking inside
|
||||
$('.dropdown-menu').on('click', function(event) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
// Trigger click event on page load
|
||||
document.getElementById("toggleShowAll").click();
|
||||
});
|
||||
document.getElementById("toggleShowAll").addEventListener("click", function(e) {
|
||||
e.preventDefault();
|
||||
var nestedRows = document.getElementsByClassName("collapse");
|
||||
for (var i = 0; i < nestedRows.length; i++) {
|
||||
if (nestedRows[i].classList.contains("show")) {
|
||||
nestedRows[i].classList.remove("show");
|
||||
} else {
|
||||
nestedRows[i].classList.add("show");
|
||||
}
|
||||
}
|
||||
});
|
||||
var exportButton = document.getElementById("exportButton");
|
||||
exportButton.addEventListener("click", function() {
|
||||
exportTableToCSV("table.csv");
|
||||
});
|
||||
|
||||
function exportTableToCSV(filename) {
|
||||
var csv = [];
|
||||
var rows = document.querySelectorAll("table tr:not(.hide)");
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
var row = [];
|
||||
var cols = rows[i].querySelectorAll("td:not(.hide), th:not(.hide)");
|
||||
// Check if the parent row is collapsed or hidden
|
||||
var parentRow = rows[i].closest(".collapse");
|
||||
var isParentCollapsed = parentRow && (!parentRow.classList.contains("show"));
|
||||
if (isParentCollapsed) {
|
||||
continue; // Skip child table rows if parent is collapsed
|
||||
}
|
||||
for (var j = 0; j < cols.length; j++) {
|
||||
var cellValue = cols[j].innerText.replace(/,/g, ""); // Remove commas from the cell value
|
||||
row.push(cellValue);
|
||||
}
|
||||
csv.push(row.join(","));
|
||||
}
|
||||
// Create a CSV file
|
||||
var csvContent = "data:text/csv;charset=utf-8," + csv.join("\n");
|
||||
var encodedUri = encodeURI(csvContent);
|
||||
var link = document.createElement("a");
|
||||
link.setAttribute("href", encodedUri);
|
||||
link.setAttribute("download", filename);
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
$("#fromDate").nepaliDatePicker({
|
||||
dateFormat: "%y-%m-%d",
|
||||
closeOnDateSelect: true,
|
||||
minDate: $('#fromDate').data('start'),
|
||||
maxDate: $('#fromDate').data('end'),
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$("#toDate").nepaliDatePicker({
|
||||
dateFormat: "%y-%m-%d",
|
||||
closeOnDateSelect: true,
|
||||
minDate: $('#toDate').data('start'),
|
||||
maxDate: $('#toDate').data('end'),
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
@@ -88,6 +88,33 @@ $BIBAccounts = new BIBAccounts();
|
||||
box-shadow: inset 0 0 0 transparent;
|
||||
transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
|
||||
}
|
||||
|
||||
.table1 {
|
||||
border: 0px !important;
|
||||
padding: 0;
|
||||
margin: 10 !important;
|
||||
width: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.table-responsive {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
-webkit-flex: 1 1 auto;
|
||||
-ms-flex: 1 1 auto;
|
||||
flex: 1 1 auto;
|
||||
min-height: 1px;
|
||||
padding: 0;
|
||||
}
|
||||
table {
|
||||
border: 1px solid #ddd;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.text-bold{
|
||||
font-weight: 900;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<div class="content">
|
||||
@@ -178,33 +205,31 @@ $BIBAccounts = new BIBAccounts();
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<!-- <button class="btn btn-secondary toggle-collapse btn-sm" id="toggleShowAll">Toggle Collapse</button> -->
|
||||
<div class="card card-primary card-outline ">
|
||||
<div class="card-body p-0">
|
||||
<?php
|
||||
// echo $_POST['showClosing'];
|
||||
$ReportOptions = array(
|
||||
'showZeroBalances' => false,
|
||||
'showOB' => false,
|
||||
'showClosing' => true,
|
||||
'showPeriod' => false,
|
||||
);
|
||||
// die;
|
||||
?>
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="group-name" width="85%">Particulars</th>
|
||||
<th class="group-total text-center" width="10%">Amount</th>
|
||||
<th class="group-name" width="85%">Particulars</th>
|
||||
<th class="group-total text-center" width="15%">Amount</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2" class="p-0">
|
||||
<div class="card card-primary card-outline">
|
||||
<div class="card-body pl-2 pr-2">
|
||||
<div class="row">
|
||||
<?php
|
||||
// echo $_POST['showClosing'];
|
||||
$ReportOptions = array(
|
||||
'showZeroBalances' => false,
|
||||
'showOB' => false,
|
||||
'showClosing' => true,
|
||||
'showPeriod' => false,
|
||||
);
|
||||
// die;
|
||||
?>
|
||||
<div class="col-6 p-0">
|
||||
<div class="table-responsive">
|
||||
<table class="table ">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="group-name pl-1">Particulars</th>
|
||||
<th class="group-total text-center col-1">Amount</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $AccountGroups = $BIBAccounts->getAccountGroupsWithBalances(3); ?>
|
||||
<table class="table table-bordered vertical-borders" id="TrialBalanceTable">
|
||||
<?php
|
||||
<?php
|
||||
// Initialize variables for column totals
|
||||
$incomes_totalOpeningDr = 0;
|
||||
$incomes_totalOpeningCr = 0;
|
||||
@@ -214,21 +239,16 @@ $BIBAccounts = new BIBAccounts();
|
||||
$incomes_totalClosingCr = 0;
|
||||
?>
|
||||
<?php foreach ($AccountGroups as $group) : ?>
|
||||
<tr class="group-heading" data-toggle="collapse" data-target="#group_<?php echo $group->acgroup_id; ?>">
|
||||
<td class="group-name"><b><?php //echo $group->acgroup_name;
|
||||
?></b></td>
|
||||
<td class="group-total text-right"><?php //echo myCurrency(($group->posting_side == "CR") ? $group->closing_balance : 0);
|
||||
?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7" class="group-details p-0" width="85%">
|
||||
<div id="group_<?php echo $group->acgroup_id; ?>" class="">
|
||||
<tr>
|
||||
<td colspan="2" class="p-0">
|
||||
<div id="group_<?php echo $group->acgroup_id; ?>" class="">
|
||||
<?php $Accountcategories = $BIBAccounts->getRootCategoriesWithBalances($group->acgroup_id); ?>
|
||||
<?php $BIBAccounts->renderAccountCategoriesTable($Accountcategories, $ReportOptions, false, array()); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
// Update column totals
|
||||
$incomes_totalOpeningDr += ($group->posting_side == "DR") ? $group->opening_balance : 0;
|
||||
$incomes_totalOpeningCr += ($group->posting_side == "CR") ? $group->opening_balance : 0;
|
||||
@@ -236,14 +256,42 @@ $BIBAccounts = new BIBAccounts();
|
||||
$incomes_totalThisYearCr += ($group->posting_side == "CR") ? $group->regular_balance : 0;
|
||||
$incomes_totalClosingDr += ($group->posting_side == "DR") ? $group->closing_balance : 0;
|
||||
$incomes_totalClosingCr += ($group->posting_side == "CR") ? $group->closing_balance : 0;
|
||||
?>
|
||||
?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</td>
|
||||
<td colspan="2" class="p-0">
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<?php $PL = $incomes_totalClosingCr - $incomes_totalClosingDr; ?>
|
||||
<tr>
|
||||
<th class="p-1">Total Incomes</th>
|
||||
<th class="cr closing-cr text-bold">
|
||||
<?php if ($PL > 0) : ?>
|
||||
<?php echo myCurrency($incomes_totalClosingCr); ?>
|
||||
<?php else : ?>
|
||||
<?php echo myCurrency($incomes_totalClosingCr + abs($PL)); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 p-0">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="group-name pl-1">Particulars</th>
|
||||
<th class="group-total text-center col-1">Amount</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $AccountGroups = $BIBAccounts->getAccountGroupsWithBalances(4); ?>
|
||||
<table class="table table-bordered vertical-borders" id="TrialBalanceTable">
|
||||
<?php
|
||||
<?php
|
||||
// Initialize variables for column totals
|
||||
$totalOpeningDr = 0;
|
||||
$totalOpeningCr = 0;
|
||||
@@ -253,22 +301,16 @@ $BIBAccounts = new BIBAccounts();
|
||||
$totalClosingCr = 0;
|
||||
?>
|
||||
<?php foreach ($AccountGroups as $group) : ?>
|
||||
<tr class="group-heading" data-toggle="collapse" data-target="#group_<?php echo $group->acgroup_id; ?>">
|
||||
<td class="group-name" width="85%"> <?php //echo $group->acgroup_name;
|
||||
?></td>
|
||||
<td class="group-total" width="15%"><?php //echo myCurrency(($group->posting_side == "DR") ? $group->closing_balance : 0);
|
||||
?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7" class="group-details p-0">
|
||||
<div id="group_<?php echo $group->acgroup_id; ?>" class="">
|
||||
<tr>
|
||||
<td colspan="2" class="p-0">
|
||||
<div id="group_<?php echo $group->acgroup_id; ?>" class="">
|
||||
<i> <?php $Accountcategories = $BIBAccounts->getRootCategoriesWithBalances($group->acgroup_id); ?>
|
||||
<?php $BIBAccounts->renderAccountCategoriesTable($Accountcategories, $ReportOptions, false, array()); ?>
|
||||
</i>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
// Update column totals
|
||||
$totalOpeningDr += ($group->posting_side == "DR") ? $group->opening_balance : 0;
|
||||
$totalOpeningCr += ($group->posting_side == "CR") ? $group->opening_balance : 0;
|
||||
@@ -278,70 +320,37 @@ $BIBAccounts = new BIBAccounts();
|
||||
$totalClosingCr += ($group->posting_side == "CR") ? $group->closing_balance : 0;
|
||||
?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $PL = $incomes_totalClosingCr - $totalClosingDr; ?>
|
||||
<?php $PL = $incomes_totalClosingCr - $totalClosingDr; ?>
|
||||
<?php if ($incomes_totalClosingCr > $totalClosingDr) : ?>
|
||||
<tr>
|
||||
<td colspan="2" width="15%">
|
||||
</td>
|
||||
<td colspan="2" class="p-0">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>Total Profit</th>
|
||||
<th class="cr closing-cr text-right"><?php echo myCurrency($PL); ?></th>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<?php else : ?>
|
||||
<tr>
|
||||
<td colspan="2" class="p-0">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>Total Loss</th>
|
||||
<th class="cr closing-cr"><?php echo myCurrency(abs($PL)); ?></th>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
</td>
|
||||
<!-- <th></th>
|
||||
<th></th> -->
|
||||
<th class="pl-1">Total Profit</th>
|
||||
<th class="cr closing-cr text-right text-bold"><?php echo myCurrency($PL); ?></th>
|
||||
|
||||
</tr>
|
||||
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
<td colspan="2" class="p-0">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>Total Incomes</th>
|
||||
<th class="cr closing-cr">
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<th class="pl-1">Total Expenses</th>
|
||||
<th class="dr closing-dr text-bold">
|
||||
<?php if ($PL > 0) : ?>
|
||||
<?php echo myCurrency($incomes_totalClosingCr); ?>
|
||||
<?php else : ?>
|
||||
<?php echo myCurrency($incomes_totalClosingCr + abs($PL)); ?>
|
||||
<?php endif; ?>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td colspan="2" class="p-0">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>Total Expenses</th>
|
||||
<th class="dr closing-dr">
|
||||
<?php if ($PL > 0) : ?>
|
||||
<?php echo myCurrency($totalClosingDr + abs($PL)); ?>
|
||||
<?php echo myCurrency($totalClosingDr + abs($PL)); ?>
|
||||
|
||||
<?php else : ?>
|
||||
<?php echo myCurrency($totalClosingDr); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -8,7 +8,6 @@ $ExpenseAccounts = $this->acc->getAccountsByGroup(4);
|
||||
$IncomesTotal = $this->acc->getAccountBalanceByGroup(3);
|
||||
$ExpensesTotal = $this->acc->getAccountBalanceByGroup(4);
|
||||
$PL = $IncomesTotal - $ExpensesTotal;
|
||||
|
||||
?>
|
||||
<style>
|
||||
table,
|
||||
@@ -97,24 +96,15 @@ $PL = $IncomesTotal - $ExpensesTotal;
|
||||
;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="content-wrapper">
|
||||
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="card card-primary card-outline ">
|
||||
|
||||
<div class="card-header">
|
||||
<h3 class="card-title mt-1">Receipts And Payments <?php //echo $pageTitle;
|
||||
?> </h3>
|
||||
|
||||
<div class="card-tools">
|
||||
<form method="post" action="" id="FilterForm">
|
||||
|
||||
<!-- button with a dropdown -->
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-success btn-sm dropdown-toggle" data-toggle="dropdown" data-offset="-52">
|
||||
@@ -166,8 +156,6 @@ $PL = $IncomesTotal - $ExpensesTotal;
|
||||
<button type="submit" class="btn btn-warning btn-sm " data-toggle="dropdown" data-offset="-52">
|
||||
Export
|
||||
</button>
|
||||
|
||||
|
||||
<!-- <div class="dropdown-menu" role="menu">
|
||||
<a href="#" class="dropdown-item">Export</a>
|
||||
<a href="#" class="dropdown-item">Pdf</a>
|
||||
@@ -176,9 +164,7 @@ $PL = $IncomesTotal - $ExpensesTotal;
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- <button type="button" class="btn btn-warning btn-sm" onclick="resetForm()">Reset</button> -->
|
||||
|
||||
<button class="btn btn-secondary toggle-collapse btn-sm" id="toggleShowAll">Toggle Collapse</button>
|
||||
|
||||
</form>
|
||||
<script>
|
||||
function resetForm() {
|
||||
@@ -192,39 +178,36 @@ $PL = $IncomesTotal - $ExpensesTotal;
|
||||
</div>
|
||||
<!-- /.card-tools -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- <div class="card-body">
|
||||
<form method="post" action="" id="FilterForm">
|
||||
<div class="row align-items-end">
|
||||
<div class="col-2">
|
||||
<div class="form-group">
|
||||
<label for="fromDate"><?php myLang("Starting Period"); ?></label>
|
||||
<input type="text" class="form-control nepaliDatePicker" name="fromDate" value="<?php echo (isset($_POST['fromDate'])) ? $_POST['fromDate'] : NepaliDate($this->session->FiscalYear->fiscalyear_from); ?>" id="fromDate" aria-describedby="helpId_fromDate" placeholder="Starting Period">
|
||||
<label for="fromDate"><?php //myLang("Starting Period"); ?></label>
|
||||
<input type="text" class="form-control nepaliDatePicker" name="fromDate" value="<?php //echo (isset($_POST['fromDate'])) ? $_POST['fromDate'] : NepaliDate($this->session->FiscalYear->fiscalyear_from); ?>" id="fromDate" aria-describedby="helpId_fromDate" placeholder="Starting Period">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="form-group">
|
||||
<label for="toDate"><?php myLang("Ending Period"); ?></label>
|
||||
<input type="text" class="form-control nepaliDatePicker" name="toDate" value="<?php echo (isset($_POST['toDate'])) ? $_POST['toDate'] : NepaliDate($this->session->FiscalYear->fiscalyear_to); ?>" id="toDate" aria-describedby="helpId_toDate" placeholder="Ending Period">
|
||||
<label for="toDate"><?php //myLang("Ending Period"); ?></label>
|
||||
<input type="text" class="form-control nepaliDatePicker" name="toDate" value="<?php //echo (isset($_POST['toDate'])) ? $_POST['toDate'] : NepaliDate($this->session->FiscalYear->fiscalyear_to); ?>" id="toDate" aria-describedby="helpId_toDate" placeholder="Ending Period">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-1 text-center">
|
||||
<div class="form-group">
|
||||
<label for="showOB"><?php myLang("Opening"); ?></label>
|
||||
<label for="showOB"><?php //myLang("Opening"); ?></label>
|
||||
<input type="checkbox" class="form-control " name="showOB" id="showOB" aria-describedby="helpId_showOB" placeholder="Show Opening Balance" <?php echo (isset($_POST['showOB'])) ? "CHECKED" : "CHECKED"; ?>>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-1 text-center">
|
||||
<div class="form-group">
|
||||
<label for="showClosing"><?php myLang("Closing"); ?></label>
|
||||
<label for="showClosing"><?php //myLang("Closing"); ?></label>
|
||||
<input type="checkbox" class="form-control " name="showClosing" id="showClosing" aria-describedby="helpId_showClosing" placeholder="Show Closing Balance" <?php echo (isset($_POST['showClosing'])) ? "CHECKED" : "CHECKED"; ?>>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-1 text-center">
|
||||
<div class="form-group">
|
||||
<label for="showPeriod"><?php myLang("Period"); ?></label>
|
||||
<label for="showPeriod"><?php //myLang("Period"); ?></label>
|
||||
<input type="checkbox" class="form-control " name="showPeriod" id="showPeriod" aria-describedby="helpId_showPeriod" placeholder="Show Periodic Balance" <?php echo (isset($_POST['showPeriod'])) ? "CHECKED" : "CHECKED"; ?>>
|
||||
</div>
|
||||
</div>
|
||||
@@ -237,9 +220,7 @@ $PL = $IncomesTotal - $ExpensesTotal;
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function resetForm() {
|
||||
document.getElementById("fromDate").value = "2078-4-1";
|
||||
@@ -249,23 +230,20 @@ $PL = $IncomesTotal - $ExpensesTotal;
|
||||
document.getElementById("FilterForm").submit();
|
||||
}
|
||||
</script>
|
||||
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
<div class="card">
|
||||
|
||||
<div class="card card-primary card-outline">
|
||||
<?php $IncomesExpenses = $BIBAccounts->prepareIncomeExpenses() ?>
|
||||
<table class="table table-head-fixed table-bordered g-0" id="TrialBalanceTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="" width="35%"><?php myLang("Receipts"); ?></th>
|
||||
<th class="text-right" width="15%"></th>
|
||||
<th class="text-right pr-2" width="15%"><?php myLang("Amount"); ?></th>
|
||||
<th class="" width="35%"><?php echo myLang("Payments"); ?></th>
|
||||
<th class="text-right" width="15%"></th>
|
||||
<th class="text-right pr-2" width="15%"><?php myLang("Amount"); ?></th>
|
||||
<th class="" width="30%"><?php myLang("Receipts"); ?></th>
|
||||
<th class="text-right" width="10%"></th>
|
||||
<th class="text-right pr-2" width="10%"><?php myLang("Amount"); ?></th>
|
||||
<th class="" width="30%"><?php echo myLang("Payments"); ?></th>
|
||||
<th class="text-right" width="10%"></th>
|
||||
<th class="text-right pr-2" width="10%"><?php myLang("Amount"); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -281,32 +259,26 @@ $PL = $IncomesTotal - $ExpensesTotal;
|
||||
<td class="" width="70%"><b><?php echo $Incomes['group']; ?></b></td>
|
||||
<td width="15%"></td>
|
||||
<td class="text-right" width="15%"><u><?php echo myCurrency($Incomes['amount']); ?></u></td>
|
||||
|
||||
</tr-->
|
||||
<?php elseif ($Incomes['account'] == "CATEGORY TOTAL") : ?>
|
||||
<?php $index++; ?>
|
||||
<tr class="parent-row" class="group-heading" data-toggle="collapse" data-target="#group_<?php echo $index; ?>">
|
||||
<td class="" width="70%"><b><?php echo $Incomes['category']; ?></b></td>
|
||||
<td width="15%"></td>
|
||||
<td class="text-right pr-2" width="15%"><?php echo myCurrency($Incomes['amount']); ?></td>
|
||||
|
||||
<td class="" width="60%"><b><?php echo $Incomes['category']; ?></b></td>
|
||||
<td width="20%"></td>
|
||||
<td class="text-right pr-2" width="20%"><?php echo myCurrency($Incomes['amount']); ?></td>
|
||||
</tr>
|
||||
<?php else : ?>
|
||||
<?php $total1 += $Incomes['amount']; ?>
|
||||
<tr class="collapse" data-target="#group_<?php echo $index; ?>">
|
||||
<td class="pr-2" width="70%">
|
||||
<?php echo $Incomes['account']; ?>
|
||||
<td class="pr-2" width="60%">
|
||||
<?php echo $Incomes['account']; ?>
|
||||
</td>
|
||||
<td class="text-right pr-2" width="15%"><?php echo myCurrency($Incomes['amount']); ?></td>
|
||||
|
||||
<td width="15%"></td>
|
||||
|
||||
<td class="text-right pr-2" width="20%"><?php echo myCurrency($Incomes['amount']); ?></td>
|
||||
<td width="20%"></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php $counter = $index ?>
|
||||
|
||||
<?php }; ?>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
<td colspan=3 class="p-0">
|
||||
@@ -318,36 +290,26 @@ $PL = $IncomesTotal - $ExpensesTotal;
|
||||
<td class="" width="70%"><b><?php echo $Expenses['group']; ?></b></td>
|
||||
<td width="15%"></td>
|
||||
<td class="text-right" width="15%"><u><?php echo myCurrency($Expenses['amount']); ?></u></td>
|
||||
|
||||
|
||||
</tr-->
|
||||
<?php elseif ($Expenses['account'] == "CATEGORY TOTAL") : ?>
|
||||
<?php $counter++; ?>
|
||||
<tr data-toggle="collapse" data-target="#group_<?php echo $counter; ?>">
|
||||
<td class="pr-2" width="70%"><b><?php echo $Expenses['category']; ?></b></td>
|
||||
<td width="15%"></td>
|
||||
<td class="text-right pr-2" width="15%"><?php echo myCurrency($Expenses['amount']); ?></td>
|
||||
|
||||
<td class="pr-2" width="60%"><b><?php echo $Expenses['category']; ?></b></td>
|
||||
<td width="20%"></td>
|
||||
<td class="text-right pr-2" width="20%"><?php echo myCurrency($Expenses['amount']); ?></td>
|
||||
</tr>
|
||||
|
||||
<?php else : ?>
|
||||
<?php $total += $Expenses['amount']; ?>
|
||||
<tr class="collapse" data-target="#group_<?php echo $counter; ?>">
|
||||
<td class="" width="70%">
|
||||
|
||||
<?php echo $Expenses['account']; ?>
|
||||
<td class="" width="60%">
|
||||
|
||||
<?php echo $Expenses['account']; ?>
|
||||
</td>
|
||||
<td class="text-right pr-2" width="15%"><?php echo myCurrency($Expenses['amount']); ?></td>
|
||||
<td width="15%"></td>
|
||||
|
||||
|
||||
<td class="text-right pr-2" width="20%"><?php echo myCurrency($Expenses['amount']); ?></td>
|
||||
<td width="20%"></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
<?php }; ?>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -370,9 +332,7 @@ $PL = $IncomesTotal - $ExpensesTotal;
|
||||
<th></th>
|
||||
<td class="pr-2"><?php echo myCurrency($balance_fi); ?></td>
|
||||
</tr>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<tr>
|
||||
<th class="pl-2">Total</th>
|
||||
<th></th>
|
||||
@@ -382,19 +342,11 @@ $PL = $IncomesTotal - $ExpensesTotal;
|
||||
<td class="pr-2"><?php echo myCurrency($total); ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div><!-- /.container-fluid -->
|
||||
</section>
|
||||
|
||||
<?php function footerFunctions()
|
||||
{ ?>
|
||||
<script>
|
||||
|
@@ -21,6 +21,7 @@ $BIBAccounts = new BIBAccounts();
|
||||
|
||||
.group-total {
|
||||
width: 10%;
|
||||
|
||||
}
|
||||
|
||||
.table-gray {
|
||||
@@ -31,8 +32,10 @@ $BIBAccounts = new BIBAccounts();
|
||||
.table th {
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
|
||||
}
|
||||
|
||||
.table t
|
||||
.bg-darker {
|
||||
background-color: #ddd;
|
||||
}
|
||||
@@ -71,6 +74,9 @@ $BIBAccounts = new BIBAccounts();
|
||||
.underline {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.text-right{
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.form-control {
|
||||
display: block;
|
||||
@@ -88,6 +94,9 @@ $BIBAccounts = new BIBAccounts();
|
||||
box-shadow: inset 0 0 0 transparent;
|
||||
transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
|
||||
}
|
||||
.bg-gray tr th {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<div class="content">
|
||||
@@ -202,16 +211,16 @@ $BIBAccounts = new BIBAccounts();
|
||||
<table class="table table-bordered vertical-borders" id="TrialBalanceTable">
|
||||
<thead class="bg-gray">
|
||||
<tr>
|
||||
<th rowspan="2">Particulars</th>
|
||||
<th rowspan="2 class="">Particulars</th>
|
||||
<?php if ($ReportOptions['showOB']) : ?>
|
||||
<th colspan="2" class="text-center">Opening</th>
|
||||
<?php endif; ?>
|
||||
<?php if ($ReportOptions['showPeriod']) : ?>
|
||||
<th colspan="2" class="text-center">Current Period</th>
|
||||
<?php endif; ?>
|
||||
<?php if ($ReportOptions['showClosing']) : ?>
|
||||
<th colspan="2" class="text-center">Closing</th>
|
||||
<?php endif; ?>
|
||||
<th colspan=" 2" class="text-center">Opening</th>
|
||||
<?php endif; ?>
|
||||
<?php if ($ReportOptions['showPeriod']) : ?>
|
||||
<th colspan="2" class="text-center">Current Period</th>
|
||||
<?php endif; ?>
|
||||
<?php if ($ReportOptions['showClosing']) : ?>
|
||||
<th colspan="2" class="text-center">Closing</th>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -245,7 +254,7 @@ $BIBAccounts = new BIBAccounts();
|
||||
<?php if ($ReportOptions['showOB']) : ?>
|
||||
<td class="group-total"><?php // echo myCurrency(($group->posting_side == "DR") ? $group->opening_balance : 0);
|
||||
?></td>
|
||||
<td class="group-total"><?php // echo myCurrency(($group->posting_side == "CR") ? $group->opening_balance : 0);
|
||||
<td class="group-total "><?php // echo myCurrency(($group->posting_side == "CR") ? $group->opening_balance : 0);
|
||||
?></td>
|
||||
<?php endif; ?>
|
||||
<?php if ($ReportOptions['showPeriod']) : ?>
|
||||
|
@@ -95,12 +95,12 @@
|
||||
<table class="table table-bordered table-striped longdataTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Fiscal Year </th>
|
||||
<th> Code</th>
|
||||
<th class="col-2">Fiscal Year </th>
|
||||
<th class="col-4"> Code</th>
|
||||
<th>From</th>
|
||||
<th>To</th>
|
||||
<!-- <th>Created By</th> -->
|
||||
<th class="col-2 text-center">Action</th>
|
||||
<th class="col-1 text-center">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@@ -100,7 +100,7 @@
|
||||
<?php foreach ($TableRow as $cols) : $id = $cols;
|
||||
break;
|
||||
endforeach; ?><tr>
|
||||
<td><?php echo $a; ?></td>
|
||||
<td class="text-center"><?php echo $a; ?></td>
|
||||
<td><?php echo $TableRow->title; ?></td>
|
||||
<!-- <td><?php //echo getFieldfromValue("tbl_units", "title", "unit_id", $TableRow->units_id); ?></td> -->
|
||||
<td><?php echo $TableRow->description; ?></td>
|
||||
|
@@ -12,7 +12,7 @@
|
||||
<table class="table table-bordered table-striped dataTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php myLang('S.N'); ?></th>
|
||||
<th class="text-center"><?php myLang('S.N'); ?></th>
|
||||
<th><?php myLang('Date'); ?></th>
|
||||
<th><?php myLang('Purchase Transaction'); ?></th>
|
||||
<th class="text-center"><?php myLang('Amount'); ?></th>
|
||||
|
@@ -184,7 +184,7 @@
|
||||
<?php $a = 0;
|
||||
foreach ($StockItems as $Stock) : $a++; ?>
|
||||
<tr>
|
||||
<td><?php echo $a; ?></td>
|
||||
<td class="text-center"><?php echo $a; ?></td>
|
||||
<td><?php echo $Stock->Item->title; ?></td>
|
||||
<td><?php echo $Stock->Summary->Unit->title; ?></td>
|
||||
<td class="text-right"><?php echo $oqty = $Stock->Summary->Opening->qty; ?></td>
|
||||
|
@@ -12,7 +12,7 @@
|
||||
<table class="table table-bordered table-striped dataTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="table-col col-1"><?php myLang('Sales Voucher #'); ?></th>
|
||||
<th class="table-col col-1 text-center"><?php myLang('Sales Voucher #'); ?></th>
|
||||
<th width="10%"><?php myLang('Date'); ?></th>
|
||||
<th><?php myLang('Transaction'); ?></th>
|
||||
<th class="table-col col-1 text-center"><?php myLang('Amount'); ?></th>
|
||||
@@ -22,7 +22,7 @@
|
||||
<tbody>
|
||||
<?php foreach ($SalesRecords as $TableRow) : ?>
|
||||
<tr>
|
||||
<td><?php echo $TableRow->sales_id; ?></td>
|
||||
<td class="text-center"><?php echo $TableRow->sales_id; ?></td>
|
||||
<td><?php echo $TableRow->sales_date; ?></td>
|
||||
<td><b><?php echo $this->myaccounts->getAccountDetails($TableRow->accounts_id)->account_name; ?></b>
|
||||
<div class="row ml-2 mr-2" style="border-bottom: 1px solid;">
|
||||
|
@@ -202,7 +202,7 @@
|
||||
$CTotal = 0;
|
||||
foreach ($StockRecords as $index => $TableRow) : ?>
|
||||
<tr>
|
||||
<td><?php echo $index + 1; ?></td>
|
||||
<td class="text-center"><?php echo $index + 1; ?></td>
|
||||
<td><?php echo ($TableRow->Item) ? $TableRow->Item->title : "N/A"; ?></td>
|
||||
<td><?php echo getFieldfromValue("tbl_units", "title", "unit_id", $TableRow->Item->units_id); ?></td>
|
||||
<td class="text-right"><?php echo $TableRow->Summary->Opening->qty; ?></td>
|
||||
|
9
account/dist/css/bbnepalcustom.css
vendored
9
account/dist/css/bbnepalcustom.css
vendored
@@ -123,9 +123,9 @@ margin-bottom: .5rem;
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow b {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
.card-body.p-0 .table tbody>tr>td:last-of-type, .card-body.p-0 .table tbody>tr>th:last-of-type, .card-body.p-0 .table tfoot>tr>td:last-of-type, .card-body.p-0 .table tfoot>tr>th:last-of-type, .card-body.p-0 .table thead>tr>td:last-of-type, .card-body.p-0 .table thead>tr>th:last-of-type {
|
||||
padding-right: 0!important;
|
||||
}
|
||||
/* .card-body.p-0 .table tbody>tr>td:last-of-type, .card-body.p-0 .table tbody>tr>th:last-of-type, .card-body.p-0 .table tfoot>tr>td:last-of-type, .card-body.p-0 .table tfoot>tr>th:last-of-type, .card-body.p-0 .table thead>tr>td:last-of-type, .card-body.p-0 .table thead>tr>th:last-of-type {
|
||||
padding-right: 0px!important;
|
||||
} */
|
||||
.form-group textarea.form-control {
|
||||
height: 50px !important;
|
||||
}
|
||||
@@ -139,3 +139,6 @@ table.dataTable>thead>tr>th:not(.sorting_disabled), table.dataTable>thead>tr>td:
|
||||
|
||||
vertical-align: middle;
|
||||
}
|
||||
.text-right{
|
||||
padding-right: 10px;
|
||||
}
|
Binary file not shown.
Reference in New Issue
Block a user