commitall

This commit is contained in:
Sampanna Rimal
2024-07-10 18:28:19 +05:45
parent 140abda4e6
commit 9cd05ef3cb
15723 changed files with 4818733 additions and 0 deletions

View File

@@ -0,0 +1,81 @@
<div class="content-wrapper">
<div class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1 class="m-0"><?php echo $pageTitle; ?></h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="<?php echo base_url(); ?>">Dashboard</a></li>
<li class="breadcrumb-item active"><?php echo $pageTitle; ?></li>
</ol>
</div>
</div>
</div>
</div>
<div class="content">
<div class="container-fluid">
<div class="row">
<div class="col">
<div class="card card-primary card-outline">
<div class="card-header">
<h5 class="m-0">Create <?php echo $pageTitle; ?> <?php showListButton($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/list", "List
" . $pageTitle); ?></h5>
</div>
<div class="card-body">
<form method=POST action="" enctype="multipart/form-data" name="tbl_vouchertypes">
<div class="row">
<!--COL START-->
<div class="col">
<div class="form-group">
<label for="voucher_name">Voucher Name</label><input type="text" class="form-control" id="voucher_name" value="" name="voucher_name">
</div>
</div>
<!--COL END-->
</div>
<div class="row">
<!--COL START-->
<div class="col">
<div class="form-group">
<?php fillComboWithValue("default_account", "Default Account", "default_account", "tbl_accounts", "account_name", "account_id", $default = "", $CSSclass = "", $multiple = false, $condition = ""); ?>
</div>
</div>
<!--COL END-->
<!--COL START-->
<div class="col">
<div class="form-group">
<?php createSelect("default_accountside", "Default Account Side", array(["Dr", "Debet"], ["Cr", "Credit"]), "default_accountside", "", ""); ?>
</div>
</div>
<!--COL END-->
</div>
<div class="row">
<!--COL START-->
<div class="col">
<div class="form-group">
<label for="voucher_options">Voucher Options</label>
<textarea class="form-control" id="voucher_options" name="voucher_options"></textarea>
</div>
</div>
<!--COL END-->
</div>
<div class="row">
<!--COL START-->
<div class="col">
<div class="form-group">
<label for="remarks">Remarks</label>
<textarea class="form-control" id="remarks" name="remarks"></textarea>
</div>
</div>
<!--COL END-->
</div>
<button type="reset" class="btn btn-default">Reset</button> <button class="btn btn-primary" type="submit" name="submit">Save</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,157 @@
<style>
/* Style for checked checkbox */
input[type=checkbox]:checked + label {
color: #007bff; /* Change text color */
}
/* Style for unchecked checkbox */
input[type=checkbox] + label {
color: black; /* Default text color */
}
/* Style for checkbox itself */
input[type=checkbox] {
margin-right: 10px;
/* You can change the color here */
/* For example: */
/* border-color: blue; */
}
ul.twocols {
columns: 2;
-webkit-columns: 2;
-moz-columns: 2;
list-style-type: none;
padding-inline-start: 0px !important;
}
ul li {
font-size: 12px;
font-weight: 400;
}
ul li label {
display: inline-block;
margin-bottom: .2rem !important;
letter-spacing: .018rem;
}
.card-header {
padding: .35rem .75rem !important;
margin-bottom: 0;
}
</style>
<div class="content-wrapper">
<div class="content">
<div class="container-fluid">
<div class="row">
<div class="col">
<div class="card card-primary card-outline">
<div class="card-header">
<h5 class="m-0"> <?php echo $pageTitle; ?>
<?php //showListButton($this->uri->segment(1) . "/" . $this->uri->segment(2) . "/list", "List " . $pageTitle); ?>
</h5>
</div>
<div class="card-body">
<form method=POST action="" enctype="multipart/form-data" name="tbl_vouchertypes">
<div class="row">
<!--COL START-->
<div class="col">
<div class="form-group">
<label for="voucher_name">Voucher Name</label><input type="text" class="form-control" id="voucher_name" value="<?php echo $VoucherType->voucher_name; ?>" name="voucher_name">
</div>
</div>
<div class="col">
<div class="form-group">
<label for="voucher_color">Voucher Color</label>
<input type="color" class="form-control p-0" id="voucher_color" value="<?php echo $VoucherType->voucher_color; ?>" name="voucher_color" style="width:85px;">
</div>
</div>
<!-- <div class="col">
<div class="form-group">
<label for="default_debits">Default Debits</label>
<select class="select2" name="default_debits[]" id="default_debits" multiple>
<?php foreach ($Accountcategories as $Accountcategory) : ?>
<option value="<?php echo $Accountcategory->accategory_id; ?>" <?php if (in_array($Accountcategory->accategory_id, explode(",", ($VoucherType->default_debits != "") ? $VoucherType->default_debits : ""))) echo "SELECTED"; ?>><?php echo $Accountcategory->accategory_name; ?></option>
<?php endforeach; ?>
</select>
</div>
</div> -->
<!-- <div class="col">
<div class="form-group">
<label for="default_credits">Default Credits</label>
<select class="select2" name="default_credits[]" id="default_credits" multiple>
<?php foreach ($Accountcategories as $Accountcategory) : ?>
<option value="<?php echo $Accountcategory->accategory_id; ?>" <?php if (in_array($Accountcategory->accategory_id, explode(",", ($VoucherType->default_credits != "") ? $VoucherType->default_credits : ""))) echo "SELECTED"; ?>><?php echo $Accountcategory->accategory_name; ?></option>
<?php endforeach; ?>
</select>
</div>
</div> -->
<div class="col">
<div class="form-group">
<label for="status">Status</label>
<select class="form-control" name="status" id="status">
<option value="0" <?php if ($VoucherType->status == "0") echo "SELECTED"; ?>>Disabled</option>
<option value="1" <?php if ($VoucherType->status == "1") echo "SELECTED"; ?>>Enabled</option>
</select>
</div>
</div>
<!--COL END-->
</div>
<div class="row">
<div class="col-6">
<div class="card">
<div class="card-header bg-primary">
<h5 class="card-title mb-0">Default Debits Groups</h5>
</div>
<div class="card-body">
<div class="row">
<ul class="twocols">
<?php foreach ($Accountcategories as $Accountcategory) : ?>
<li> <input type="checkbox" id="d_<?php echo $Accountcategory->accategory_id; ?>" name="default_debits[]" <?php if (in_array($Accountcategory->accategory_id, explode(",", ($VoucherType->default_debits != "") ? $VoucherType->default_debits : ""))) echo "CHECKED"; ?> value="<?php echo $Accountcategory->accategory_id; ?>">
<label for="d_<?php echo $Accountcategory->accategory_id; ?>"><?php echo $Accountcategory->accategory_name; ?></label></li>
<?php endforeach; ?>
</ul>
</div>
</div>
</div>
</div>
<div class="col-6">
<div class="card">
<div class="card-header bg-success">
<h5 class="card-title mb-0">Default Credits Groups</h5>
</div>
<div class="card-body">
<div class="row">
<ul class="twocols">
<?php foreach ($Accountcategories as $Accountcategory) : ?>
<li>
<input type="checkbox" id="c_<?php echo $Accountcategory->accategory_id; ?>" name="default_credits[]" <?php if (in_array($Accountcategory->accategory_id, explode(",", ($VoucherType->default_credits != "") ? $VoucherType->default_credits : ""))) echo "CHECKED"; ?> value="<?php echo $Accountcategory->accategory_id; ?>"> <label for="c_<?php echo $Accountcategory->accategory_id; ?>"><?php echo $Accountcategory->accategory_name; ?></label>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<!--COL START-->
<div class="col-lg-12">
<div class="form-group">
<label for="remarks">Remarks</label> <textarea class="form-control" id="remarks" rows="30" name="remarks"></textarea>
</div>
</div>
<!--COL END-->
</div>
<!-- <button type="reset" class="btn btn-default">Reset</button> -->
<button class="btn btn-primary float-right" type="submit" name="submit">Save</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,91 @@
<div class="content-wrapper">
<!-- <div class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1 class="m-0"><?php //echo $pageTitle; ?></h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="<?php //echo base_url(); ?>">Dashboard</a></li>
<li class="breadcrumb-item active"><?php //echo $pageTitle; ?></li>
</ol>
</div>
</div>
</div>
</div> -->
<div class="content">
<div class="container-fluid">
<div class="row">
<div class="col">
<div class="card card-primary card-outline">
<div class="card-header">
<h5 class="m-0"><?php echo $pageTitle; ?>
<!-- <a href="<?php //echo site_url("accounts/setup/addsingleentryvoucher"); ?>" class="btn btn-sm btn-primary float-right">Create New <?php //echo $pageTitle; ?></a> -->
</h5>
</div>
<div class="card-body">
<?php $TableData = $this->db->query("select * from tbl_vouchertypes")->result(); ?>
<table class="table table-bordered table-striped dataTable">
<thead>
<tr>
<th>Sn</th>
<th>Voucher Name</th>
<th>Default Debits</th>
<th>Default Credits</th>
<th>Voucher Color</th>
<th class="table-col col-2">Action</th>
</tr>
</thead>
<tbody>
<?php $sn = 0;
foreach ($TableData as $TableRow) : $sn++; ?>
<?php foreach ($TableRow as $cols) : $id = $cols;
break;
endforeach; ?><tr class="<?php echo ($TableRow->status == 0) ? "table-danger" : ""; ?>">
<td><?php echo $sn; ?></td>
<td><?php echo $TableRow->voucher_name; ?></td>
<td><?php echo showAccountCategoriesByIds(($TableRow->default_debits!="")?explode(",",$TableRow->default_debits):array()); ?></td>
<td><?php echo showAccountCategoriesByIds(($TableRow->default_credits!="")?explode(",",$TableRow->default_credits):array()); ?></td>
<td><span class="inline-block" style="padding:0px 8px;border:1px solid <?php echo $TableRow->voucher_color; ?>;background:<?php echo $TableRow->voucher_color; ?>">&nbsp;</span> </td>
<td>
<?php showEditButton($commandURL = "accounts/setup/editvouchertype/" . $TableRow->vouchertype_id); ?>
</td>
</tr>
<?php endforeach; ?>
<tbody>
</table>
<script>
function doDelete(id) {
if (confirm('Are you sure to delete?')) {
window.location = '<?php echo site_url("accounts/setup/deletevouchertype/"); ?>' + id;
}
}
</script>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
function showTogglebutton($commandURL, $currentValue)
{
?>
<a class="btn btn-success btn-xs" href="<?php echo site_url($commandURL); ?>"><?php echo ($currentValue == 1) ? "Disable" : "Enable"; ?></a>
<?php
}
?>