Payroll processing - pay transaction

pay transaction
pull/12/head
paulcortez 7 months ago
parent ab08c11980
commit 2a6d05f9df

@ -51,6 +51,11 @@ $routes->post('payroll/delcomben', 'PayrollController::deleteEmployeeCompensatio
$routes->get('payroll/paysettings', 'PayrollController::payrollSettings'); $routes->get('payroll/paysettings', 'PayrollController::payrollSettings');
$routes->post('payroll/paysettings', 'PayrollController::payrollSettings'); $routes->post('payroll/paysettings', 'PayrollController::payrollSettings');
$routes->get('payroll/paytrans', 'PayrollController::payrollTransactions');
$routes->post('payroll/addpaytrans', 'PayrollController::addPayrollTransactions');
$routes->get('payroll/emppaytrans/(:num)', 'PayrollController::employeePayrollTransactions/$1');
// Administrator Routes // Administrator Routes
$routes->get('adminuser', 'AdministratorController::index'); $routes->get('adminuser', 'AdministratorController::index');
$routes->get('adminuser/newuser', 'AdministratorController::newUserView'); $routes->get('adminuser/newuser', 'AdministratorController::newUserView');

@ -14,6 +14,7 @@ use App\Models\EmployeeModel;
use App\Models\EmpPayIncomeDeductionModel; use App\Models\EmpPayIncomeDeductionModel;
use App\Models\SettingsModel; use App\Models\SettingsModel;
use App\Models\PayrollScheduleModel; use App\Models\PayrollScheduleModel;
use App\Models\PayrollTransactionModel;
// Entities // Entities
@ -25,6 +26,7 @@ use App\Entities\Employee;
use App\Entities\EmpPayIncomeDeduction; use App\Entities\EmpPayIncomeDeduction;
use App\Entities\Settings; use App\Entities\Settings;
use App\Entities\PayrollSchedule; use App\Entities\PayrollSchedule;
use App\Entities\PayrollTransaction;
// Class Library // Class Library
use App\ClassLib\MiscLib; use App\ClassLib\MiscLib;
@ -344,4 +346,58 @@ class PayrollController extends BaseController
return view('payroll/paysettingsview', $data); return view('payroll/paysettingsview', $data);
} }
public function payrollTransactions()
{
$data['paytypes'] = (new PayrollTypeModel())->findAll();
$data['paySchedules'] = (new PayrollScheduleModel())->findAll();
$payTrans = (new PayrollTransactionModel())->orderBy('created_at', 'DESC')->findAll();
$payTransHTMLTable = new \CodeIgniter\View\Table();
$payTransHTMLTable->setTemplate(MiscLib::adminLTETableTemplate());
if($payTrans == null)
$data['tblPayTrans'] = '<p>No transactions found.</p>';
else
{
foreach($payTrans as $trans)
{
$payTransHTMLTable->setHeading('ID', 'From', 'To', 'No. of Days', 'Status', 'Remarks', 'Action');
$iconEdit = '<a href="/payroll/emppaytrans/'.$trans->paytrans_id.'" class="ml-3" data-toggle="tooltip" title="Edit Payroll Transaction"><i class="fas fa-edit"></i></a>';
$payTransHTMLTable->addRow($trans->paytrans_id, $trans->payroll_from, $trans->payroll_to, $trans->no_of_days, $trans->is_open ? 'Open' : ' Closed', $trans->remarks, $iconEdit);
}
$data['tblPayTrans'] = $payTransHTMLTable->generate();
}
return view('payroll/paytransactionview', $data);
}
public function addPayrollTransactions()
{
$payTransModel = new PayrollTransactionModel();
$payTrans = new PayrollTransaction();
$rawData = $this->request->getPost();
$payTrans->fill($rawData);
if($payTransModel->save($payTrans))
return redirect()->to('/payroll/paytrans')->with('message', 'Payroll Transaction Added');
else
return redirect()->back()->withInput()->with('error', 'Failed to add payroll transaction');
}
public function employeePayrollTransactions($paytransid)
{
$data['paytransid'] = $paytransid;
$data['paygroupid'] = $this->request->getGet('grpid');
$data['paygroups'] = (new PayrollGroupModel())->findAll();
return view('payroll/emppaytransactionview', $data);
}
} }

@ -0,0 +1,102 @@
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class CreatePayrollTransaction extends Migration
{
public function up()
{
$this->forge->addField([
'paytrans_id' => [
'type' => 'INT',
'constraint' => 11,
'unsigned' => true,
'auto_increment' => true
],
'paytype_id' => [
'type' => 'INT',
'constraint' => 11,
'unsigned' => true,
],
'payschedule_id' => [
'type' => 'INT',
'constraint' => 11,
'unsigned' => true,
],
'payroll_from' => [
'type' => 'DATE',
'null' => false,
],
'payroll_to' => [
'type' => 'DATE',
'null' => false,
],
'no_of_days' => [
'type' => 'INT',
'constraint' => 11,
'unsigned' => true,
'null' => false,
'default' => 0
],
'total_emp' => [
'type' => 'INT',
'constraint' => 11,
'unsigned' => true,
'null' => false,
'default' => 0
],
'total_gross' => [
'type' => 'DECIMAL',
'constraint' => '12,4',
'null' => false
],
'remarks' => [
'type' => 'VARCHAR',
'constraint' => 255,
'null' => true
],
'is_open' => [
'type' => 'TINYINT',
'constraint' => 1,
'default' => 1,
'null' => false
],
// Common fields
'created_at' => [
'type' => 'DATETIME',
'null' => true,
],
'created_by' => [
'type' => 'VARCHAR',
'constraint' => '20',
'null' => true
],
'updated_at' => [
'type' => 'DATETIME',
'null' => true,
],
'updated_by' => [
'type' => 'VARCHAR',
'constraint' => '20',
'null' => true
],
'deleted_at' => [
'type' => 'DATETIME',
'null' => true,
],
]);
$this->forge->addKey('paytrans_id', true);
$this->forge->addForeignKey('paytype_id', 'pay_type', 'paytype_id', 'CASCADE', 'RESTRICT');
$this->forge->addForeignKey('payschedule_id', 'pay_schedule', 'payschedule_id', 'CASCADE', 'RESTRICT');
$this->forge->createTable('pay_trans');
}
public function down()
{
$this->forge->dropTable('pay_trans');
}
}

@ -0,0 +1,22 @@
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class AddConstraintOnEmployeePayInfo extends Migration
{
public function up()
{
$this->forge->addForeignKey('employee_id', 'employee', 'employee_id', 'CASCADE', 'RESTRICT');
$this->forge->addForeignKey('paytype_id', 'pay_type', 'paytype_id', 'CASCADE', 'RESTRICT');
$this->forge->processIndexes('emp_pay_info');
}
public function down()
{
$this->forge->dropForeignKey('emp_pay_info', 'emp_pay_info_employee_id_foreign');
$this->forge->dropForeignKey('emp_pay_info', 'emp_pay_info_paytype_id_foreign');
$this->forge->processIndexes('emp_pay_info');
}
}

@ -0,0 +1,193 @@
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class CreateEmpPayTrans extends Migration
{
public function up()
{
$this->forge->addField([
'emppaytrans_id' => [
'type' => 'INT',
'constraint' => 11,
'unsigned' => true,
'auto_increment' => true
],
'paytrans_id' => [
'type' => 'INT',
'constraint' => 11,
'unsigned' => true,
],
'company_id' => [
'type' => 'INT',
'constraint' => 11,
'unsigned' => true,
],
'dept_id' => [
'type' => 'INT',
'constraint' => 11,
'unsigned' => true,
],
'job_title_id' => [
'type' => 'INT',
'constraint' => 11,
'unsigned' => true,
],
'emp_status_id' => [
'type' => 'INT',
'constraint' => 11,
'unsigned' => true,
],
'employee_id' => [
'type' => 'INT',
'constraint' => 11,
'unsigned' => true
],
'company_issued_id' => [
'type' => 'VARCHAR',
'constraint' => 25,
],
'last_name' => [
'type' => 'VARCHAR',
'constraint' => 255,
],
'first_name' => [
'type' => 'VARCHAR',
'constraint' => 255,
'null' => true,
],
'middle_name' => [
'type' => 'VARCHAR',
'constraint' => 255,
'null' => true,
],
'suffix' => [
'type' => 'VARCHAR',
'constraint' => 10,
'null' => true,
],
'email_address' => [
'type' => 'VARCHAR',
'constraint' => 255,
'null' => true,
],
'is_ATM' => [
'type' => 'TINYINT',
'constraint' => 1,
'null' => false
],
'savings_account' => [
'type' => 'VARCHAR',
'constraint' => 50,
'null' => true
],
'basic_monthly_pay' => [
'type' => 'DECIMAL',
'constraint' => '12,4',
'null' => false
],
'basic_daily_pay' => [
'type' => 'DECIMAL',
'constraint' => '12,4',
'null' => false
],
'basic_hourly_pay' => [
'type' => 'DECIMAL',
'constraint' => '12,4',
'null' => false
],
'has_cola' => [
'type' => 'TINYINT',
'constraint' => 1,
'null' => false
],
'has_philhealth' => [
'type' => 'TINYINT',
'constraint' => 1,
'null' => false
],
'has_hdmf' => [
'type' => 'TINYINT',
'constraint' => 1,
'null' => false
],
'has_sss' => [
'type' => 'TINYINT',
'constraint' => 1,
'null' => false
],
'has_gsis' => [
'type' => 'TINYINT',
'constraint' => 1,
'null' => false
],
'gross_income' => [
'type' => 'DECIMAL',
'constraint' => '12,4',
'null' => false
],
'taxable_income' => [
'type' => 'DECIMAL',
'constraint' => '12,4',
'null' => false
],
'nontaxable_income' => [
'type' => 'DECIMAL',
'constraint' => '12,4',
'null' => false
],
'income_tax' => [
'type' => 'DECIMAL',
'constraint' => '12,4',
'null' => false
],
'total_deduction' => [
'type' => 'DECIMAL',
'constraint' => '12,4',
'null' => false
],
'net_pay' => [
'type' => 'DECIMAL',
'constraint' => '12,4',
'null' => false
],
// Common fields
'created_at' => [
'type' => 'DATETIME',
'null' => true,
],
'created_by' => [
'type' => 'VARCHAR',
'constraint' => '20',
'null' => true
],
'updated_at' => [
'type' => 'DATETIME',
'null' => true,
],
'updated_by' => [
'type' => 'VARCHAR',
'constraint' => '20',
'null' => true
],
'deleted_at' => [
'type' => 'DATETIME',
'null' => true,
],
]);
$this->forge->addKey('emppaytrans_id', true);
$this->forge->addForeignKey('paytype_id', 'pay_type', 'paytype_id', 'CASCADE', 'RESTRICT');
$this->forge->addForeignKey('payschedule_id', 'pay_schedule', 'payschedule_id', 'CASCADE', 'RESTRICT');
$this->forge->createTable('pay_trans');
}
public function down()
{
//
}
}

@ -0,0 +1,24 @@
<?php
namespace App\Entities;
use CodeIgniter\Entity\Entity;
class PayrollTransaction extends Entity
{
protected $attributes = [
'paytrans_id' => null,
'paytype_id' => null,
'payschedule_id' => null,
'payroll_from' => null,
'payroll_to' => null,
'no_of_days' => null,
'total_emp' => null,
'total_gross' => null,
'remarks' => null,
'is_open' => null,
];
protected $datamap = [];
protected $dates = ['created_at', 'updated_at', 'deleted_at'];
protected $casts = [];
}

@ -0,0 +1,62 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class PayrollTransactionModel extends Model
{
protected $table = 'pay_trans';
protected $primaryKey = 'paytrans_id';
protected $useAutoIncrement = true;
protected $returnType = \App\Entities\PayrollTransaction::class;
protected $useSoftDeletes = false;
protected $protectFields = true;
protected $allowedFields = ['paytype_id',
'payschedule_id',
'payroll_from',
'payroll_to',
'no_of_days',
'total_emp',
'total_gross',
'remarks',
'is_open'];
protected bool $allowEmptyInserts = false;
// Dates
protected $useTimestamps = true;
protected $dateFormat = 'datetime';
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
protected $deletedField = 'deleted_at';
// Validation
protected $validationRules = [];
protected $validationMessages = [];
protected $skipValidation = false;
protected $cleanValidationRules = true;
// Callbacks
protected $allowCallbacks = true;
protected $beforeInsert = ['assignCreatedBy'];
protected $afterInsert = [];
protected $beforeUpdate = ['assignUpdatedBy'];
protected $afterUpdate = [];
protected $beforeFind = [];
protected $afterFind = [];
protected $beforeDelete = [];
protected $afterDelete = [];
public function assignCreatedBy(array $data)
{
$data['data']['created_by'] = auth()->user()->employee_id;
return $data;
}
public function assignUpdatedBy(array $data)
{
$data['data']['updated_by'] = auth()->user()->employee_id;
return $data;
}
}

@ -322,9 +322,10 @@
<div class="col-12 col-sm-4"> <div class="col-12 col-sm-4">
<div class="form-group"> <div class="form-group">
<label>Select Schedule</label> <label>Select Schedule</label>
<select class="form-control" style="width: 100%;" name="payschedid"> <select class="form-control" name="payschedid">
<?php foreach($paySchedules as $paySchedule): ?> <?php foreach($paySchedules as $paySchedule): ?>
<?php $selected = ($empLoaded && $_GET['payschedid'] == $paySchedule->payschedule_id) ? 'selected' : ''; ?> <?= '<option value="'.$paySchedule->payschedule_id.'" '.$selected.'>['.$paySchedule->sched_code.'] '.$paySchedule->sched_name.'</option>' ?> <?php $selected = ($empLoaded && $_GET['payschedid'] == $paySchedule->payschedule_id) ? 'selected' : ''; ?>
<?= '<option value="'.$paySchedule->payschedule_id.'" '.$selected.'>['.$paySchedule->sched_code.'] '.$paySchedule->sched_name.'</option>' ?>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
</div> </div>
@ -511,14 +512,9 @@
<script> <script>
$(document).ready(function() { $(document).ready(function() {
//Initialize Select2 Elements //Initialize Select2 Elements
$('.select2').select2(); $('.select2').select2();
//Initialize Select2 Elements
$('.select2bs4').select2({
theme: 'bootstrap4'
});
}); });
function editIncome(element) { function editIncome(element) {

@ -0,0 +1,165 @@
<!-- Extend area where template is defined -->
<?= $this->extend('templates/adminlte/generalcontent') ?>
<!-- .Extend -->
<!-- Title of the page -->
<?= $this->section('title') ?>Employee Payroll Transaction<?= $this->endSection() ?>
<!-- .Title -->
<!-- CSS of the page -->
<?= $this->section('css') ?>
<!-- Select2 -->
<link rel="stylesheet" href="<?= base_url() ?>adminlte/plugins/select2/css/select2.min.css">
<link rel="stylesheet" href="<?= base_url() ?>adminlte/plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css">
<?= $this->endSection() ?>
<!-- .CSS -->
<!-- body attribute - class definition -->
<?= $this->section('bodyclass') ?>sidebar-mini<?= $this->endSection() ?>
<!-- .body attribute -->
<!-- Container title -->
<?= $this->section('containertitle') ?>Employee Payroll Transaction<?= $this->endSection() ?>
<!-- .Container title -->
<!-- Active breadcrumb -->
<?= $this->section('activebreadcrumb') ?><a href="/payroll/paytrans">Payroll Transaction</a> / Employee Payroll Transaction<?= $this->endSection() ?>
<!-- .Active breadcrumb -->
<!-- Main content -->
<?= $this->section('main') ?>
<!-- Modal Add Branch -->
<div class="modal fade" id="mdlAddPayTrans">
<div class="modal-dialog">
<div class="modal-content">
<form action="<?= url_to('payroll/addpaytrans') ?>" method="post">
<div class="modal-header">
<h4 class="modal-title" >New Payroll Transaction</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="row">
<div class="col-12">
<p class="lead">Payroll Group Information</p>
<div class="row">
<div class="col-12">
<div class="form-group">
<label>Payroll period:</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">
<i class="far fa-calendar-alt"></i>
</span>
</div>
<input type="text" class="form-control float-right" id="txtPayrollFromTo" name="payroll_from_to">
<input type="hidden" id="txtPayrollFrom" name="payroll_from">
<input type="hidden" id="txtPayrollTo" name="payroll_to">
<!-- set default value -->
<input type="hidden" name="total_emp" value="0">
<input type="hidden" name="total_gross" value="0">
<input type="hidden" name="is_open" value="1">
</div>
<!-- /.input group -->
</div>
<div class="form-group">
<label for="txtNoOfDays">Number of Days</label>
<input class="form-control" type="text" id="txtNoOfDays" name="no_of_days" value="<?= old('no_of_days') ?>" readonly>
</div>
<div class="form-group">
<label for="txtRemarks">Remarks</label>
<textarea class="form-control" rows="3" placeholder="Enter remarks here..." name="remarks" id="txtRemarks"><?= old('remarks') ?></textarea>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary">Save changes</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</form>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-header">
<h3 class="card-title">Select Payroll Group to Process</h3>
</div>
<div class="card-body">
<div class="row">
<div class="col-12">
<form action="/payroll/emppaytrans/<?= $paytransid ?>" method="get">
<div class="form-group">
<label>Payroll Group</label>
<div class="input-group mb-3">
<select class="form-control select2 rounded-0" name="grpid">
<option value="-1">-- Select --</option>
<?php foreach($paygroups as $paygroup): ?>
<?php $selected = ($paygroupid != null && $paygroupid == $paygroup->pay_group_id) ? 'selected' : ''; ?>
<option value="<?= $paygroup->pay_group_id ?>" <?= $selected ?>><?= '['.$paygroup->pay_group_code.'] '.$paygroup->pay_group_name ?></option>
<?php endforeach; ?>
</select>
<span class="input-group-append">
<button type="submit" class="btn btn-info btn-flat">Select this Group</button>
</span>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-header">
<h3 class="card-title">List of Payroll Transaction</h3>
</div>
<div class="card-body">
<div class="card-body table-responsive p-0">
<?= $paytransid ?>
</div>
</div>
<div class="card-footer">
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#mdlAddPayTrans">Add Payroll Transaction</button>
</div>
</div>
</div>
</div>
<?= $this->endSection() ?>
<!-- .Main content -->
<!-- Javascript -->
<?= $this->section('js') ?>
<!-- Select2 -->
<script src="<?= base_url() ?>adminlte/plugins/select2/js/select2.full.min.js"></script>
<script>
$(document).ready(function() {
//Initialize Select2 Elements
$('.select2').select2();
});
</script>
<?= $this->endSection() ?>
<!-- .Javascript -->

@ -0,0 +1,159 @@
<!-- Extend area where template is defined -->
<?= $this->extend('templates/adminlte/generalcontent') ?>
<!-- .Extend -->
<!-- Title of the page -->
<?= $this->section('title') ?>Payroll Transaction<?= $this->endSection() ?>
<!-- .Title -->
<!-- CSS of the page -->
<?= $this->section('css') ?>
<!-- daterange picker -->
<link rel="stylesheet" href="<?= base_url() ?>adminlte/plugins/daterangepicker/daterangepicker.css">
<?= $this->endSection() ?>
<!-- .CSS -->
<!-- body attribute - class definition -->
<?= $this->section('bodyclass') ?>sidebar-mini<?= $this->endSection() ?>
<!-- .body attribute -->
<!-- Container title -->
<?= $this->section('containertitle') ?>Payroll Transaction<?= $this->endSection() ?>
<!-- .Container title -->
<!-- Active breadcrumb -->
<?= $this->section('activebreadcrumb') ?>Payroll Transaction<?= $this->endSection() ?>
<!-- .Active breadcrumb -->
<!-- Main content -->
<?= $this->section('main') ?>
<!-- Modal Add Branch -->
<div class="modal fade" id="mdlAddPayTrans">
<div class="modal-dialog">
<div class="modal-content">
<form action="<?= url_to('payroll/addpaytrans') ?>" method="post">
<div class="modal-header">
<h4 class="modal-title" >New Payroll Transaction</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="row">
<div class="col-12">
<p class="lead">Payroll Group Information</p>
<div class="row">
<div class="col-12">
<div class="form-group">
<label>Select Payroll Type</label>
<select class="form-control" name="paytype_id">
<?php foreach($paytypes as $paytype): ?>
<?php $selected = (old('paytype_id') == $paytype->paytype_id) ? 'selected' : ''; ?>
<?= '<option value="'.$paytype->paytype_id.'" '.$selected.'>['.$paytype->paytype_code.'] '.$paytype->paytype_name.'</option>' ?>
<?php endforeach; ?>
</select>
</div>
<div class="form-group">
<label>Select Schedule</label>
<select class="form-control" name="payschedule_id">
<?php foreach($paySchedules as $paySchedule): ?>
<?= '<option value="'.$paySchedule->payschedule_id.'" '.$selected.'>['.$paySchedule->sched_code.'] '.$paySchedule->sched_name.'</option>' ?>
<?php endforeach; ?>
</select>
</div>
<div class="form-group">
<label>Payroll period:</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">
<i class="far fa-calendar-alt"></i>
</span>
</div>
<input type="text" class="form-control float-right" id="txtPayrollFromTo" name="payroll_from_to">
<input type="hidden" id="txtPayrollFrom" name="payroll_from">
<input type="hidden" id="txtPayrollTo" name="payroll_to">
<!-- set default value -->
<input type="hidden" name="total_emp" value="0">
<input type="hidden" name="total_gross" value="0">
<input type="hidden" name="is_open" value="1">
</div>
<!-- /.input group -->
</div>
<div class="form-group">
<label for="txtNoOfDays">Number of Days</label>
<input class="form-control" type="text" id="txtNoOfDays" name="no_of_days" value="<?= old('no_of_days') ?>" readonly>
</div>
<div class="form-group">
<label for="txtRemarks">Remarks</label>
<textarea class="form-control" rows="3" placeholder="Enter remarks here..." name="remarks" id="txtRemarks"><?= old('remarks') ?></textarea>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary">Save changes</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</form>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-header">
<h3 class="card-title">List of Payroll Transaction</h3>
</div>
<div class="card-body">
<div class="card-body table-responsive p-0">
<?= $tblPayTrans ?>
</div>
</div>
<div class="card-footer">
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#mdlAddPayTrans">Add Payroll Transaction</button>
</div>
</div>
</div>
</div>
<?= $this->endSection() ?>
<!-- .Main content -->
<!-- Javascript -->
<?= $this->section('js') ?>
<!-- InputMask -->
<script src="<?= base_url() ?>adminlte/plugins/moment/moment.min.js"></script>
<script src="<?= base_url() ?>adminlte/plugins/inputmask/jquery.inputmask.min.js"></script>
<!-- date-range-picker -->
<script src="<?= base_url() ?>adminlte/plugins/daterangepicker/daterangepicker.js"></script>
<script>
$(document).ready(function() {
//Date range picker
$('#txtPayrollFromTo').daterangepicker();
$("#txtPayrollFromTo").on("change", function() {
var from = $(this).data('daterangepicker').startDate.format('YYYY-MM-DD');
var to = $(this).data('daterangepicker').endDate.format('YYYY-MM-DD');
$("#txtNoOfDays").val(moment(to).diff(moment(from), 'days') + 1);
$("#txtPayrollFrom").val(from);
$("#txtPayrollTo").val(to);
});
});
</script>
<?= $this->endSection() ?>
<!-- .Javascript -->

@ -275,16 +275,16 @@
<a href="#" class="nav-link"> <a href="#" class="nav-link">
<i class="nav-icon far fa-image"></i> <i class="nav-icon far fa-image"></i>
<p> <p>
Payroll Preparation Payroll Processing
<i class="right fas fa-angle-left"></i> <i class="right fas fa-angle-left"></i>
</p> </p>
</a> </a>
<ul class="nav nav-treeview"> <ul class="nav nav-treeview">
<li class="nav-item"> <li class="nav-item">
<a href="#" class="nav-link"> <a href="/payroll/paytrans" class="nav-link">
<i class="nav-icon far fa-image"></i> <i class="nav-icon far fa-image"></i>
<p> <p>
Initialize Payroll Payroll Transactios
</p> </p>
</a> </a>
</li> </li>

Loading…
Cancel
Save