edit css
This commit is contained in:
@ -6,6 +6,79 @@
|
||||
<div class="card card-primary card-outline ">
|
||||
<div class="card-header bg-primary disabled color-palette">
|
||||
<h3 class="card-title"><?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 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 class="card-body">
|
||||
<div class="row">
|
||||
@ -16,12 +89,12 @@
|
||||
<?php
|
||||
$accategory_id = 3;
|
||||
$CI = &get_instance();
|
||||
|
||||
|
||||
// $CI->db->where("status", 1)->where("(accategory_id = 2 OR accategory_id = 3)");
|
||||
$CI->db->where("status", 1)->where("accategory_id = 3");
|
||||
$CI->db->order_by("account_name ASC");
|
||||
$Accounts = $CI->db->get("tbl_accounts")->result();
|
||||
|
||||
|
||||
foreach ($Accounts as $Account) {
|
||||
$Account->Group = $CI->db->query("select * from tbl_acgroups where acgroup_id=(select acgroup_id from tbl_accategories where accategory_id = $Account->accategory_id)")->row();
|
||||
$Account->Category = $CI->db->query("select * from tbl_accategories where accategory_id = $Account->accategory_id")->row();
|
||||
@ -36,7 +109,7 @@
|
||||
$html = "";
|
||||
$html .= "<table class='table table-bordered table-striped longdataTable'>";
|
||||
$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' 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 .= "</thead><tbody>";
|
||||
$sn = 0;
|
||||
$BalanceTotal = 0;
|
||||
@ -44,7 +117,7 @@
|
||||
$balance = getBalance($Account->account_id);
|
||||
$BalanceTotal += $balance;
|
||||
// pre($Account);
|
||||
$html .= "<tr><td class='col-1 text-center'>" . $sn . "</td><td>" . $Account->account_name . "</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>" . $Account->account_name . "</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-1 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;
|
||||
$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>";
|
||||
|
Reference in New Issue
Block a user