edit css and table
This commit is contained in:
parent
169a49c376
commit
e9fc0b8270
@ -543,7 +543,6 @@ class myaccounts
|
||||
<tr>
|
||||
<!-- <th class="col-1.5" rowspan="2"><?php //myLang(" Category");
|
||||
?></th> -->
|
||||
|
||||
<th class="col-1.5" rowspan="2"><?php myLang("Ledger"); ?></th>
|
||||
<th class="col-1.5" rowspan="2"><?php myLang(" Group"); ?></th>
|
||||
<th colspan="2" class="col-3 text-center">Opening Balance</th>
|
||||
@ -627,7 +626,6 @@ class myaccounts
|
||||
window.location = '<?php echo site_url("accounts/accountheads/delete/"); ?>' + id;
|
||||
}
|
||||
}
|
||||
|
||||
function showDetails(id) {
|
||||
$.ajax({
|
||||
url: "<?php echo site_url("accounts/accountheads/getdetails/"); ?>" + id,
|
||||
@ -664,13 +662,11 @@ class myaccounts
|
||||
}
|
||||
function showLedger($account_id, $fromDate = "", $toDate = "")
|
||||
{
|
||||
|
||||
$oldBalance = $this->getOldBalance($account_id, FYStart());
|
||||
$fromDate = ($fromDate == "") ? NepaliToEnglishDate(FYStart()) : $fromDate;
|
||||
$toDate = ($toDate == "") ? Today() : $toDate;
|
||||
$ci = &get_instance();
|
||||
$Transactions = $ci->db->where("transaction_date between '$fromDate' AND '$toDate'")->where("status", 1)->where("account_id", $account_id)->get("tbl_voucherdetails")->result();
|
||||
|
||||
$Account = $ci->db->where("status", 1)->where("account_id", $account_id)->get("tbl_accounts")->row();
|
||||
foreach ($Transactions as $T) {
|
||||
$T->Voucher = $ci->db->where("status", 1)->where("voucher_id", $T->voucher_id)->get("tbl_vouchers")->row();
|
||||
@ -706,12 +702,10 @@ class myaccounts
|
||||
$drTotal = 0;
|
||||
$crTotal = 0;
|
||||
$balance = 0;
|
||||
|
||||
foreach ($TableData as $TableRow) : $r++;
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo NepaliDate(($TableRow->transaction_date)); ?></td>
|
||||
|
||||
<td>
|
||||
<?php
|
||||
if ($TableRow->voucher_id != 0) :
|
||||
@ -721,9 +715,7 @@ class myaccounts
|
||||
echo $T->account_name;
|
||||
break;
|
||||
}
|
||||
|
||||
endforeach;
|
||||
|
||||
// pre($Tr);
|
||||
else :
|
||||
echo "Opening Balance";
|
||||
@ -733,7 +725,6 @@ class myaccounts
|
||||
?></td> -->
|
||||
<td>
|
||||
<?php linkVoucher($TableRow->voucher_id); ?>
|
||||
|
||||
</td>
|
||||
<td><?php echo myCurrency($TableRow->dr);
|
||||
$drTotal += $TableRow->dr; ?></td>
|
||||
@ -967,13 +958,14 @@ class myaccounts
|
||||
<th width="90"><?php myLang("Dr"); ?></th>
|
||||
<th width="90"><?php myLang("Cr"); ?></th>
|
||||
<!--<th><?php myLang("Voucher State"); ?></th> -->
|
||||
<th class="table-col col-2">Action</th>
|
||||
<th class="table-col col-1 text-center">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $a = 0; $drTotal=0;$crTotal=0;
|
||||
<?php $a = 0;
|
||||
$drTotal = 0;
|
||||
$crTotal = 0;
|
||||
foreach ($TableData as $TableRow) : $a++; ?>
|
||||
|
||||
<tr data-id="<?php echo $TableRow->voucher_id; ?>" class="<?php echo ($TableRow->voucher_state == "Reversed") ? "table-danger" : ""; ?>">
|
||||
<!-- <td><?php echo $TableRow->voucher_id; ?></td> -->
|
||||
<td><?php echo $TableRow->voucher_no; ?></td>
|
||||
@ -988,9 +980,7 @@ class myaccounts
|
||||
</td>
|
||||
<?php if ($showVoucherTypes) : ?>
|
||||
<td>
|
||||
|
||||
<?php echo $TableRow->VoucherType->voucher_name; ?>
|
||||
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<td>
|
||||
@ -1005,8 +995,9 @@ class myaccounts
|
||||
</td>
|
||||
<!-- <td><?php echo $TableRow->voucher_type; ?></td> -->
|
||||
<!-- <td><?php echo $TableRow->voucher_state; ?></td> -->
|
||||
<td class="col-1">
|
||||
<td class="col-1 text-center">
|
||||
<a onClick="javascript:showDetails(<?php echo $TableRow->voucher_id; ?>);" class="btn btn-success btn-xs" title="View Details"><i class="fa fa-eye"></i></a>
|
||||
<a onClick="javascript:showDetails(<?php echo $TableRow->voucher_id; ?>);" class="btn btn-info btn-xs" title="View Details"><i class="fas fa-edit"></i></a>
|
||||
<a onClick="javascript:showPDF(<?php echo $TableRow->voucher_id; ?>);" class="btn btn-primary btn-xs" title="View PDF"><i class="fa fa-file-pdf"></i></a>
|
||||
<a onClick="javascript:deleteVoucher(<?php echo $TableRow->voucher_id; ?>);" class="btn btn-danger btn-xs" title="Delete Voucher"><i class="fa fa-trash"></i></a>
|
||||
</td>
|
||||
@ -1057,7 +1048,6 @@ class myaccounts
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function showDetails(id) {
|
||||
$.ajax({
|
||||
url: "<?php echo site_url("accounts/vouchers/voucherdetails/"); ?>" + id,
|
||||
@ -1068,7 +1058,6 @@ class myaccounts
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function reversalEntry() {
|
||||
var id = $("#reversalBtn").data("id");
|
||||
if (confirm("Are you sure you want to post reversal for this voucher?")) {
|
||||
@ -1094,7 +1083,6 @@ class myaccounts
|
||||
row.child(Transactions).show();
|
||||
});
|
||||
});
|
||||
|
||||
function getVoucherDetails(id) {
|
||||
$.data;
|
||||
$.ajax({
|
||||
@ -1106,7 +1094,6 @@ class myaccounts
|
||||
});
|
||||
return ($.data);
|
||||
}
|
||||
|
||||
function deleteVoucher(id) {
|
||||
// Show confirmation dialog
|
||||
if (confirm("Are you sure you want to delete this voucher?")) {
|
||||
@ -1303,13 +1290,8 @@ class myaccounts
|
||||
</option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</select>
|
||||
<button type="button" class="btn input-group-text addplus" data-toggle="modal" data-target="#exampleModal"><i class="fas fa-plus"></i></button>
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
}
|
||||
function showAccountsCategoriesCombo($fieldName, $displayName, $fieldID, $condition = "", $default = "", $CSSclass = "")
|
||||
@ -1321,7 +1303,8 @@ class myaccounts
|
||||
<?php endif; ?>
|
||||
<select name="<?php echo $fieldName; ?>" class="form-control select2 <?php echo $CSSclass; ?>" id="<?php echo $fieldID; ?>">
|
||||
<option value="">Select </option>
|
||||
<!-- <option value="">Select <?php //echo function_exists("myLang") ? myLang($displayName) : $displayName; ?></option> -->
|
||||
<!-- <option value="">Select <?php //echo function_exists("myLang") ? myLang($displayName) : $displayName;
|
||||
?></option> -->
|
||||
<?php
|
||||
$q = "select *,(select acgroup_name from tbl_acgroups where tbl_accategories.acgroup_id=tbl_acgroups.acgroup_id) as acgroup_name from tbl_accategories";
|
||||
$q .= ($condition != "") ? " where $condition" : " where status=1";
|
||||
@ -1343,21 +1326,15 @@ class myaccounts
|
||||
<?php $current_acgroup = $value->acgroup_name;
|
||||
endif;
|
||||
endforeach;
|
||||
|
||||
*/
|
||||
foreach ($Values as $value) : ?>
|
||||
|
||||
|
||||
<option value="<?php echo $value->accategory_id; ?>" <?php echo ($value->accategory_id == $default) ? 'SELECTED' : ''; ?>>
|
||||
|
||||
<?php echo $value->accategory_name; ?>
|
||||
</option>
|
||||
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
</select>
|
||||
|
||||
<?php
|
||||
}
|
||||
function showFixedAccountsCategoriesCombo($fieldName, $displayName, $fieldID, $condition = "", $default = "", $CSSclass = "")
|
||||
@ -1369,7 +1346,8 @@ class myaccounts
|
||||
<?php endif; ?>
|
||||
<select name="<?php echo $fieldName; ?>" class="form-control select2 <?php echo $CSSclass; ?>" id="<?php echo $fieldID; ?>">
|
||||
<option value="">Select </option>
|
||||
<!-- <option value="">Select <?php //echo function_exists("myLang") ? myLang($displayName) : $displayName; ?></option> -->
|
||||
<!-- <option value="">Select <?php //echo function_exists("myLang") ? myLang($displayName) : $displayName;
|
||||
?></option> -->
|
||||
<?php
|
||||
$q = "select *,(select acgroup_name from tbl_acgroups where tbl_accategories.acgroup_id=tbl_acgroups.acgroup_id) as acgroup_name from tbl_accategories";
|
||||
$q .= ($condition != "") ? " where $condition" : " where status=1";
|
||||
@ -1392,21 +1370,15 @@ class myaccounts
|
||||
<?php $current_acgroup = $value->acgroup_name;
|
||||
endif;
|
||||
endforeach;
|
||||
|
||||
*/
|
||||
foreach ($Values as $value) : ?>
|
||||
|
||||
|
||||
<option value="<?php echo $value->accategory_id; ?>" <?php echo ($value->accategory_id == $default) ? 'SELECTED' : ''; ?>>
|
||||
|
||||
<?php echo $value->accategory_name; ?>
|
||||
</option>
|
||||
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
</select>
|
||||
|
||||
<?php
|
||||
}
|
||||
function showAccountsCategoriesWithParentsCombo($fieldName, $displayName, $fieldID, $condition = "", $default = "", $CSSclass = "", $extras = "")
|
||||
@ -1549,7 +1521,6 @@ class myaccounts
|
||||
$ci->dbforge->add_column('tbl_vouchertypes', array('default_debits' => array('type' => 'VARCHAR', 'constraint' => 255)));
|
||||
}
|
||||
}
|
||||
|
||||
function hasTransaction($type, $id)
|
||||
{
|
||||
switch ($type) {
|
||||
|
@ -1,5 +1,4 @@
|
||||
<div class="content-wrapper">
|
||||
|
||||
<div class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
@ -15,8 +14,8 @@
|
||||
</div> -->
|
||||
<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 class="card-header disabled color-palette">
|
||||
<h5 class="card-title m-0"><?php echo $pageTitle; ?></h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
@ -79,7 +78,6 @@ $tree .= "]";
|
||||
var id = $(this).attr("id").substr(8);
|
||||
showLedger(id);
|
||||
});
|
||||
|
||||
function getAccounts(id) {
|
||||
$("#accountsContainer").empty();
|
||||
$.ajax({
|
||||
@ -94,7 +92,6 @@ $tree .= "]";
|
||||
});
|
||||
}
|
||||
getAccountsAll();
|
||||
|
||||
function getAccountsAll() {
|
||||
$("#accountsContainer").html("");
|
||||
$.ajax({
|
||||
@ -107,7 +104,6 @@ $tree .= "]";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function showLedger(id) {
|
||||
// $("#accountsContainer").html("");
|
||||
alert(id);
|
||||
|
@ -1,17 +1,12 @@
|
||||
<div class="content-wrapper">
|
||||
|
||||
<div class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
|
||||
<div class="card card-primary card-outline">
|
||||
<div class="card-header">
|
||||
|
||||
<h5 class="m-0"><?php echo $pageTitle; ?> </h5>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<form method="GET" action="">
|
||||
<div class="row">
|
||||
@ -26,11 +21,10 @@
|
||||
</div>
|
||||
<!-- <div class="col"><?php $this->myaccounts->showAccountsCombo("account_id", "Account", "account_id", "status=1", isset($_GET['account_id']) ? $_GET['account_id'] : ''); //fillComboWithValue("account_id","Account","account_id","tbl_accounts","account_name","account_id",isset($_GET['account_id'])?$_GET['account_id']:'');
|
||||
?></div> -->
|
||||
|
||||
<div class="col-2"><?php createNepaliDateInput("from_date", "From Date", "from_date", isset($fromDate_bs) ? $fromDate_bs : FYStart()); ?></div>
|
||||
<div class="col-2"><?php createNepaliDateInput("to_date", "To Date", "to_date", isset($toDate_bs) ? $toDate_bs : FYEnd()); ?></div>
|
||||
<div class="col-1"><?php createButton("show_voucher", "Show", "show_voucher", "Submit", "mt-30"); ?></div>
|
||||
<div class="col-1"><?php createButton("show_voucher_reset", "Reset", "reset", site_url("accounts/vouchers/listvouchers"), "mt-30"); ?></div>
|
||||
<div class="col-1"><?php createButton("show_voucher", "Show", "show_voucher", "Submit", "mt-26"); ?></div>
|
||||
<div class="col-1"><?php createButton("show_voucher_reset", "Reset", "reset", site_url("accounts/vouchers/listvouchers"), "mt-26"); ?></div>
|
||||
</div>
|
||||
</form>
|
||||
<div id="dataTable_Commands"></div>
|
||||
@ -42,8 +36,6 @@
|
||||
$vouchertype_id = isset($_GET['vouchertypes']) ? $_GET['vouchertypes'] : '';
|
||||
$this->myaccounts->listVouchers($fromDate, $toDate, $account_id, $vouchertype_id, true);
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
3
account/dist/css/bbnepalcustom.css
vendored
3
account/dist/css/bbnepalcustom.css
vendored
@ -132,3 +132,6 @@ margin-bottom: .5rem;
|
||||
.select2-container .select2-selection--single {
|
||||
height: 30px!important;
|
||||
}
|
||||
.mt-26{
|
||||
margin-top: 26px;
|
||||
}
|
Loading…
Reference in New Issue
Block a user