This commit is contained in:
Raju Shrestha 2024-08-09 09:39:49 +05:45
parent b06ce0569a
commit 169a49c376
10 changed files with 188 additions and 133 deletions

View File

@ -182,11 +182,11 @@ class myaccounts
<div class="col"> <div class="col">
<form method="get"> <form method="get">
<div class="row"> <div class="row">
<div class="col-5"> <div class="col-3">
<?php $this->showAccountsCategoriesCombo("accategory_id", "", "accategory_id"); ?> <?php $this->showAccountsCategoriesCombo("accategory_id", "", "accategory_id"); ?>
</div> </div>
<div class="col-3"> <div class="col-3">
<input type="submit" value="Show Accounts" class="form-control btn btn-success"> <input type="submit" value="Show Accounts" class=" btn btn-success btn-sm">
</div> </div>
</div> </div>
</form> </form>
@ -197,7 +197,7 @@ class myaccounts
$html = ""; $html = "";
$html .= "<table class='table table-bordered table-striped longdataTable'>"; $html .= "<table class='table table-bordered table-striped longdataTable'>";
$html .= "<thead>"; $html .= "<thead>";
$html .= "<tr><th>Account</th><th class='text-center'>Account Group</th><th class='text-center'>Dr</th><th class='text-center'>Cr</th><th class='text-center'>Action</th></tr>"; $html .= "<tr><th>Account</th><th class='text-center'>Account Group</th><th class='text-center'>Dr</th><th class='text-center'>Cr</th><th class='text-center'>Balance</th><th class='text-center col-1'>Action</th></tr>";
$html .= "</thead><tbody>"; $html .= "</thead><tbody>";
$sn = 0; $sn = 0;
$BalanceTotal = 0; $BalanceTotal = 0;
@ -205,7 +205,7 @@ class myaccounts
$balance = getBalance($Account->account_id); $balance = getBalance($Account->account_id);
$BalanceTotal += $balance; $BalanceTotal += $balance;
// pre($Account); // pre($Account);
$html .= "<tr><td><a href='#' onClick='showLedger(" . $Account->account_id . ")'>" . $Account->account_name . "</a></td><td class='col-2'>" . $Account->Category->accategory_name . "</td><td class='col-1'>" . (($balance >= 0) ? myCurrency($balance) : "") . "</td><td class='col-1'>" . (($balance < 0) ? myCurrency(abs($balance)) : "") . "</td><td class='col-2 text-center'><a title='Show Ledger' class='btn btn-info btn-xs ' onClick='showLedger(" . $Account->account_id . ")'><i class='fa fa-eye'></i></a></td></tr>"; $html .= "<tr><td><a href='#' onClick='showLedger(" . $Account->account_id . ")'>" . $Account->account_name . "</a></td><td class='col-2'>" . $Account->Category->accategory_name . "</td><td class='col-1'>" . (($balance >= 0) ? myCurrency($balance) : "") . "</td><td class='col-1'>" . (($balance < 0) ? myCurrency(abs($balance)) : "") . "</td><td class='text-right col-1'></td><td class='text-center'><a title='Show Ledger' class='btn btn-info btn-xs ' onClick='showLedger(" . $Account->account_id . ")'><i class='fa fa-eye'></i></a></td></tr>";
endforeach; endforeach;
$html .= "</tbody><tfoot>"; $html .= "</tbody><tfoot>";
if ($full==""){ if ($full==""){

View File

@ -9,9 +9,8 @@ $AccountCategories = $this->myaccounts->getChildAccountCategories();
} }
</style> </style>
<div class="content-wrapper"> <div class="content-wrapper">
<div class="container-fluid"> <div class="container-fluid">
</div>
</div>
<div class="content"> <div class="content">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
@ -27,6 +26,8 @@ $AccountCategories = $this->myaccounts->getChildAccountCategories();
<th>Account</th> <th>Account</th>
<th width="<?php echo $drWidth; ?>">Dr</th> <th width="<?php echo $drWidth; ?>">Dr</th>
<th width="<?php echo $crWidth; ?>">Cr</th> <th width="<?php echo $crWidth; ?>">Cr</th>
<th class="col-1 text-center">Balance</th>
<th class="col-1 text-center">Action</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -45,6 +46,8 @@ $AccountCategories = $this->myaccounts->getChildAccountCategories();
</td> </td>
<td width="<?php echo $drWidth; ?>"><?php echo myCurrency($AccountCategory->dr); ?></td> <td width="<?php echo $drWidth; ?>"><?php echo myCurrency($AccountCategory->dr); ?></td>
<td width="<?php echo $crWidth; ?>"><?php echo myCurrency($AccountCategory->cr); ?></td> <td width="<?php echo $crWidth; ?>"><?php echo myCurrency($AccountCategory->cr); ?></td>
<td class="text-right">Balance</td>
<td class="text-center"><a href="#" class="btn btn-info btn-xs"><i class="fas fa-edit"></i> </a></td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
</tbody> </tbody>
@ -53,19 +56,17 @@ $AccountCategories = $this->myaccounts->getChildAccountCategories();
<th>Total</th> <th>Total</th>
<td width="<?php echo $drWidth; ?>"><?php echo myCurrency($drTotal); ?></td> <td width="<?php echo $drWidth; ?>"><?php echo myCurrency($drTotal); ?></td>
<td width="<?php echo $crWidth; ?>"><?php echo myCurrency($crTotal); ?></td> <td width="<?php echo $crWidth; ?>"><?php echo myCurrency($crTotal); ?></td>
<td ></td>
<td ></td>
</tr> </tr>
</thead> </thead>
</table> </table>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="container"> <div class="container">
<script> <script>
function toggleSubTable(row) { function toggleSubTable(row) {
@ -73,5 +74,4 @@ $AccountCategories = $this->myaccounts->getChildAccountCategories();
subTable.style.display = subTable.style.display === 'none' ? 'table-row' : 'none'; subTable.style.display = subTable.style.display === 'none' ? 'table-row' : 'none';
} }
</script> </script>
</div> </div>

View File

@ -1,24 +1,94 @@
<style>
.mt-26 {
margin-top: 26px;
}
</style>
<div class="content-wrapper"> <div class="content-wrapper">
<div class="content"> <div class="content">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<div class="card card-primary card-outline"> <div class="card card-primary card-outline">
<div class="card-header"> <div class="card-header">
<h3 class="card-title mt-1"><?php echo $pageTitle; ?> </h3>
<h5 class="m-0"><?php echo $pageTitle; ?> </h5> <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 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 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="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">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">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">Period</label>
</div>
</div>
<div class="dropdown-divider"></div>
<div class="form-group p-2 pb-0">
<button type="button" class="btn btn-info btn-sm " onclick="resetForm()">Reset</button>
<button type="submit" class="btn btn-primary mr-2 btn-sm text-center">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 class="card-body"> <div class="card-body">
<form method="GET" action=""> <form method="GET" action="">
<div class="row"> <div class="row">
<div class="col-2"><?php createNepaliDateInput("from_date", "Date", "from_date", isset($_GET['from_date']) ? $_GET['from_date'] : ''); ?></div> <div class="col-2"><?php createNepaliDateInput("from_date", "Date", "from_date", isset($_GET['from_date']) ? $_GET['from_date'] : ''); ?></div>
<div class="col-1"><?php createButton("show_voucher", "Show", "show_voucher", "Submit", "mt-30"); ?></div> <div class="col-1"><?php createButton("show_voucher", "Show", "show_voucher", "Submit", "mt-26 btn btn-block btn-primary btn-sm "); ?></div>
</div> </div>
</form> </form>
<div id="dataTable_Commands"></div> <div id="dataTable_Commands"></div>
@ -30,8 +100,6 @@
$vouchertype_id = isset($_GET['vouchertypes']) ? $_GET['vouchertypes'] : ''; $vouchertype_id = isset($_GET['vouchertypes']) ? $_GET['vouchertypes'] : '';
$this->myaccounts->listVouchers($fromDate, $fromDate, $account_id, $vouchertype_id, true, true); $this->myaccounts->listVouchers($fromDate, $fromDate, $account_id, $vouchertype_id, true, true);
?> ?>
</div> </div>
</div> </div>
</div> </div>

View File

@ -3,8 +3,8 @@
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<div class="card card-primary card-outline "> <div class="card card-primary card-outline">
<div class="card-header bg-primary disabled color-palette"> <div class="card-header disabled color-palette">
<h3 class="card-title mt-1"><?php echo $pageTitle; ?> </h3> <h3 class="card-title mt-1"><?php echo $pageTitle; ?> </h3>
<div class="card-tools"> <div class="card-tools">
<form method="post" action="" id="FilterForm"> <form method="post" action="" id="FilterForm">
@ -108,7 +108,7 @@
$html = ""; $html = "";
$html .= "<table class='table table-bordered table-striped longdataTable'>"; $html .= "<table class='table table-bordered table-striped longdataTable'>";
$html .= "<thead>"; $html .= "<thead>";
$html .= "<tr><th class='text-center'>Sn</th><th class='text-center'>Account</th><th class='text-center'>Account Group</th><th class='text-center'>Dr</th><th class='text-center'>Cr</th><th class='text-center '>Action</th></tr>"; $html .= "<tr><th class='text-center col-1'>Sn</th><th class='text-center'>Account</th><th class='text-center'>Account Group</th><th class='text-center'>Dr</th><th class='text-center'>Cr</th><th class='text-center col-1 '>Action</th></tr>";
$html .= "</thead><tbody>"; $html .= "</thead><tbody>";
$sn = 0; $sn = 0;
$BalanceTotal = 0; $BalanceTotal = 0;
@ -116,7 +116,7 @@
$balance = getBalance($Account->account_id); $balance = getBalance($Account->account_id);
$BalanceTotal += $balance; $BalanceTotal += $balance;
// pre($Account); // pre($Account);
$html .= "<tr><td class='col-1 text-center'>" . $sn . "</td><td><a href='#' onClick='showLedger(" . $Account->account_id . ")'>" . $Account->account_name . "</a></td><td class='col-2'>" . $Account->Category->accategory_name . "</td><td class='col-1'>" . (($balance >= 0) ? myCurrency($balance) : "") . "</td><td class='col-1'>" . (($balance < 0) ? myCurrency(abs($balance)) : "") . "</td><td class='col-2 text-center'><a title='Show Ledger' class='btn btn-info btn-xs ' onClick='showLedger(" . $Account->account_id . ")'><i class='fa fa-eye'></i></a></td></tr>"; $html .= "<tr><td class='col-1 text-center'>" . $sn . "</td><td><a href='#' onClick='showLedger(" . $Account->account_id . ")'>" . $Account->account_name . "</a></td><td class='col-2'>" . $Account->Category->accategory_name . "</td><td class='col-1'>" . (($balance >= 0) ? myCurrency($balance) : "") . "</td><td class='col-1'>" . (($balance < 0) ? myCurrency(abs($balance)) : "") . "</td><td class='text-center'><a title='Show Ledger' class='btn btn-info btn-xs ' onClick='showLedger(" . $Account->account_id . ")'><i class='fa fa-eye'></i></a></td></tr>";
endforeach; endforeach;
$html .= "</tbody><tfoot>"; $html .= "</tbody><tfoot>";
$html .= "<tr><th colspan=3 class='text-right'>Total</th><th class='text-right'>" . myCurrency($BalanceTotal) . "</th><th></th><th></th></tr>"; $html .= "<tr><th colspan=3 class='text-right'>Total</th><th class='text-right'>" . myCurrency($BalanceTotal) . "</th><th></th><th></th></tr>";

View File

@ -4,81 +4,81 @@
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<div class="card card-primary card-outline "> <div class="card card-primary card-outline ">
<div class="card-header bg-primary disabled color-palette"> <div class="card-header disabled color-palette">
<h3 class="card-title"><?php echo $pageTitle; ?> </h3> <h3 class="card-title mt-1"><?php echo $pageTitle; ?> </h3>
<div class="card-tools"> <div class="card-tools">
<form method="post" action="" id="FilterForm"> <form method="post" action="" id="FilterForm">
<!-- button with a dropdown --> <!-- button with a dropdown -->
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-success btn-sm dropdown-toggle" data-toggle="dropdown" data-offset="-52"> <button type="button" class="btn btn-success btn-sm dropdown-toggle" data-toggle="dropdown" data-offset="-52">
Filters Filters
</button> </button>
<div class="dropdown-menu" role="menu"> <div class="dropdown-menu" role="menu">
<div class="form-group p-2 pb-0"> <div class="form-group p-2 pb-0">
<div class="col"> <div class="col">
<div class="form-group"> <div class="form-group">
<label for="fromDate"><?php myLang("Starting Period"); ?></label> <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"> <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 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="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">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">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">Period</label>
</div>
</div> </div>
<div class="form-group"> <div class="dropdown-divider"></div>
<label for="toDate"><?php myLang("Ending Period"); ?></label> <div class="form-group p-2 pb-0">
<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"> <button type="button" class="btn btn-info btn-sm " onclick="resetForm()">Reset</button>
<button type="submit" class="btn btn-primary mr-2 btn-sm text-center">Search </button>
</div> </div>
</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">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">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">Period</label>
</div>
</div> </div>
<div class="dropdown-divider"></div> <div class="btn-group">
<div class="form-group p-2 pb-0"> <button type="submit" class="btn btn-warning btn-sm " data-toggle="dropdown" data-offset="-52">
<button type="button" class="btn btn-info btn-sm " onclick="resetForm()">Reset</button> Export
<button type="submit" class="btn btn-primary mr-2 btn-sm text-center">Search </button> </button>
</div> <!-- <div class="dropdown-menu" role="menu">
</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">Export</a>
<a href="#" class="dropdown-item">Pdf</a> <a href="#" class="dropdown-item">Pdf</a>
<div class="dropdown-divider"></div> <div class="dropdown-divider"></div>
<a href="#" class="dropdown-item">View calendar</a> <a href="#" class="dropdown-item">View calendar</a>
</div> --> </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>
<!-- <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 class="card-body"> <div class="card-body">
<div class="row"> <div class="row">
@ -109,7 +109,7 @@
$html = ""; $html = "";
$html .= "<table class='table table-bordered table-striped longdataTable'>"; $html .= "<table class='table table-bordered table-striped longdataTable'>";
$html .= "<thead>"; $html .= "<thead>";
$html .= "<tr><th class='text-center' width='25'>Sn</th><th class='text-center'>Account</th><th class='text-center'>Account Group</th><th class='text-center'>Dr</th><th class='text-center'>Cr</th><th class='text-center' width='25'>Action</th></tr>"; $html .= "<tr><th class='text-center' width='25'>Sn</th><th class='text-center'>Account</th><th class='text-center'>Account Group</th><th class='text-center'>Dr</th><th class='text-center'>Cr</th><th class='text-center col-1'>Action</th></tr>";
$html .= "</thead><tbody>"; $html .= "</thead><tbody>";
$sn = 0; $sn = 0;
$BalanceTotal = 0; $BalanceTotal = 0;
@ -117,30 +117,30 @@
$balance = getBalance($Account->account_id); $balance = getBalance($Account->account_id);
$BalanceTotal += $balance; $BalanceTotal += $balance;
// pre($Account); // pre($Account);
$html .= "<tr><td class='col-1 text-center'>" . $sn . "</td><td><a href='#' onClick='showLedger(" . $Account->account_id . ")'>" . $Account->account_name . "</a></td><td class='col-2'>" . $Account->Category->accategory_name . "</td><td class='col-1'>" . (($balance >= 0) ? myCurrency($balance) : "") . "</td><td class='col-1'>" . (($balance < 0) ? myCurrency(abs($balance)) : "") . "</td><td class='col-2 text-center'><a title='Show Ledger' class='btn btn-info btn-xs ' onClick='showLedger(" . $Account->account_id . ")'><i class='fa fa-eye'></i></a></td></tr>"; $html .= "<tr><td class='col-1 text-center'>" . $sn . "</td><td><a href='#' onClick='showLedger(" . $Account->account_id . ")'>" . $Account->account_name . "</a></td><td class='col-2'>" . $Account->Category->accategory_name . "</td><td class='col-1'>" . (($balance >= 0) ? myCurrency($balance) : "") . "</td><td class='col-1'>" . (($balance < 0) ? myCurrency(abs($balance)) : "") . "</td><td class=' text-center'><a title='Show Ledger' class='btn btn-info btn-xs ' onClick='showLedger(" . $Account->account_id . ")'><i class='fa fa-eye'></i></a></td></tr>";
endforeach; endforeach;
$html .= "</tbody><tfoot>"; $html .= "</tbody><tfoot>";
$html .= "<tr><th colspan=3 class='text-right'>Total</th><th class='text-right'>" . myCurrency($BalanceTotal) . "</th><th></th><th></th></tr>"; $html .= "<tr><th colspan=3 class='text-right'>Total</th><th class='text-right'>" . myCurrency($BalanceTotal) . "</th><th></th><th></th></tr>";
$html .= "</tfoot></table>\n"; $html .= "</tfoot></table>\n";
$html .= " <div class=\"modal fade\" id=\"ledgerdetails_box\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"ledgerdetails_box\" aria-hidden=\"true\"> $html .= " <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-dialog modal-xl\" role=\"document\">
<div class=\"modal-content\"> <div class=\"modal-content\">
<div class=\"modal-header\"> <div class=\"modal-header\">
<h5 class=\"modal-title\" id=\"exampleModalLabel\">Ledger Details</h5> <h5 class=\"modal-title\" id=\"exampleModalLabel\">Ledger Details</h5>
<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"> <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
<span aria-hidden=\"true\">&times;</span> <span aria-hidden=\"true\">&times;</span>
</button> </button>
</div> </div>
<div class=\"modal-body\" id=\"details_container\"> <div class=\"modal-body\" id=\"details_container\">
Ledger Details Goes Here Ledger Details Goes Here
</div> </div>
<!--<div class=\"modal-footer\"> <!--<div class=\"modal-footer\">
<button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">Close</button> <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">Close</button>
<button type=\"button\" class=\"btn btn-success\" data-dismiss=\"modal\">Print</button> <button type=\"button\" class=\"btn btn-success\" data-dismiss=\"modal\">Print</button>
</div>--> </div>-->
</div> </div>
</div> </div>
</div>"; </div>";
$html .= '<script>function showLedger(id) {$.ajax({url: \''; $html .= '<script>function showLedger(id) {$.ajax({url: \'';
$html .= site_url("accounts/reports/ajax/getledgersummary/"); $html .= site_url("accounts/reports/ajax/getledgersummary/");
$html .= '\' + id,success: function(data) {$(\'#ledgerdetails_box #details_container\').html(data);$(\'#ledgerdetails_box\').modal(\'show\');}});}</script>'; $html .= '\' + id,success: function(data) {$(\'#ledgerdetails_box #details_container\').html(data);$(\'#ledgerdetails_box\').modal(\'show\');}});}</script>';

View File

@ -6,7 +6,7 @@
<div class="col"> <div class="col">
<div class="card card-primary card-outline "> <div class="card card-primary card-outline ">
<div class="card-header bg-primary disabled color-palette"> <div class="card-header disabled color-palette">
<h5 class="m-0"><?php echo $pageTitle; ?> </h5> <h5 class="m-0"><?php echo $pageTitle; ?> </h5>
</div> </div>

View File

@ -1,15 +1,12 @@
<div class="content-wrapper"> <div class="content-wrapper">
<div class="content"> <div class="content">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<div class="card card-primary card-outline "> <div class="card card-primary card-outline ">
<div class="card-header bg-primary disabled color-palette"> <div class="card-header disabled color-palette">
<h5 class="m-0"><?php echo $pageTitle; ?></h5> <h5 class="m-0"><?php echo $pageTitle; ?></h5>
</div> </div>
<div class="card-body"> <div class="card-body">
<div class="row"> <div class="row">
<div class="col"> <div class="col">
@ -18,9 +15,6 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@ -28,13 +22,9 @@
</div> </div>
</div> </div>
</div> </div>
<?php function footerFunctions() <?php function footerFunctions()
{ {
?> ?>
<?php <?php
} }
?> ?>

View File

@ -4,7 +4,7 @@
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<div class="card card-primary card-outline "> <div class="card card-primary card-outline ">
<div class="card-header bg-primary disabled color-palette"> <div class="card-header disabled color-palette">
<h3 class="card-title"><?php echo $pageTitle; ?> </h3> <h3 class="card-title"><?php echo $pageTitle; ?> </h3>
</div> </div>
<div class="card-body"> <div class="card-body">

View File

@ -15,9 +15,8 @@
<th><?php myLang('S.N'); ?></th> <th><?php myLang('S.N'); ?></th>
<th><?php myLang('Date'); ?></th> <th><?php myLang('Date'); ?></th>
<th><?php myLang('Purchase Transaction'); ?></th> <th><?php myLang('Purchase Transaction'); ?></th>
<th><?php myLang('Amount'); ?></th> <th class="text-center"><?php myLang('Amount'); ?></th>
<td class="text-center"><b>Action</b></th>
<td><b>Action</b></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -52,9 +51,7 @@
</div> </div>
</td> </td>
<td><?php echo myCurrency($TableRow->TotalPurchase); ?></td> <td><?php echo myCurrency($TableRow->TotalPurchase); ?></td>
<td class="text-center"><?php showDetailsButton($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/details/$id"); ?>
<td><?php showDetailsButton($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/details/$id"); ?>
<?php showDeleteButton($id); ?> <?php showDeleteButton($id); ?>
</td> </td>
</tr> </tr>

View File

@ -15,8 +15,8 @@
<th class="table-col col-1"><?php myLang('Sales Voucher #'); ?></th> <th class="table-col col-1"><?php myLang('Sales Voucher #'); ?></th>
<th width="10%"><?php myLang('Date'); ?></th> <th width="10%"><?php myLang('Date'); ?></th>
<th><?php myLang('Transaction'); ?></th> <th><?php myLang('Transaction'); ?></th>
<th class="table-col col-1"><?php myLang('Amount'); ?></th> <th class="table-col col-1 text-center"><?php myLang('Amount'); ?></th>
<th class="table-col col-1"><?php myLang('Action'); ?></th> <th class="table-col col-1 text-center"><?php myLang('Action'); ?></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -48,7 +48,7 @@
</div> </div>
</td> </td>
<td><?php echo myCurrency($TableRow->totalsales); ?></td> <td><?php echo myCurrency($TableRow->totalsales); ?></td>
<td><?php showDetailsButton($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/details/$TableRow->sales_id"); ?> <td class="text-center"><?php showDetailsButton($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/details/$TableRow->sales_id"); ?>
<?php showDeleteButton($TableRow->sales_id); ?> <?php showDeleteButton($TableRow->sales_id); ?>
</td> </td>
</tr> </tr>