commit
a2ab91048f
@ -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,221 @@
|
|||||||
|
<?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,
|
||||||
|
],
|
||||||
|
'branch_code' => [
|
||||||
|
'type' => 'VARCHAR',
|
||||||
|
'constraint' => 25,
|
||||||
|
'null' => false,
|
||||||
|
'after' => 'company_id',
|
||||||
|
],
|
||||||
|
'dept_id' => [
|
||||||
|
'type' => 'INT',
|
||||||
|
'constraint' => 11,
|
||||||
|
'unsigned' => true,
|
||||||
|
],
|
||||||
|
'job_title_id' => [
|
||||||
|
'type' => 'INT',
|
||||||
|
'constraint' => 11,
|
||||||
|
'unsigned' => true,
|
||||||
|
],
|
||||||
|
'pay_group_id' => [
|
||||||
|
'type' => 'INT',
|
||||||
|
'constraint' => 11,
|
||||||
|
'unsigned' => true,
|
||||||
|
'null' => false,
|
||||||
|
],
|
||||||
|
'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
|
||||||
|
],
|
||||||
|
'actual_work_days' => [
|
||||||
|
'type' => 'DECIMAL',
|
||||||
|
'constraint' => '12,4',
|
||||||
|
'null' => false
|
||||||
|
],
|
||||||
|
'basic_pay' => [
|
||||||
|
'type' => 'DECIMAL',
|
||||||
|
'constraint' => '12,4',
|
||||||
|
'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('paytrans_id', 'pay_trans', 'paytrans_id', 'CASCADE', 'RESTRICT');
|
||||||
|
$this->forge->addForeignKey('company_id', 'company_info', 'company_id', 'CASCADE', 'RESTRICT');
|
||||||
|
$this->forge->addForeignKey('branch_code', 'company_branch', 'branch_code', 'CASCADE', 'RESTRICT');
|
||||||
|
$this->forge->addForeignKey('dept_id', 'company_dept', 'dept_id', 'CASCADE', 'RESTRICT');
|
||||||
|
$this->forge->addForeignKey('job_title_id', 'job_title', 'job_title_id', 'CASCADE', 'RESTRICT');
|
||||||
|
$this->forge->addForeignKey('pay_group_id', 'pay_group', 'pay_group_id', 'CASCADE', 'RESTRICT');
|
||||||
|
$this->forge->addForeignKey('emp_status_id', 'emp_status', 'emp_status_id', 'CASCADE', 'RESTRICT');
|
||||||
|
$this->forge->addForeignKey('employee_id', 'employee', 'employee_id', 'CASCADE', 'RESTRICT');
|
||||||
|
$this->forge->createTable('emp_pay_trans');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
$this->forge->dropTable('emp_pay_trans');
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,120 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Database\Migrations;
|
||||||
|
|
||||||
|
use CodeIgniter\Database\Migration;
|
||||||
|
|
||||||
|
class CreateEmpPayIncomeDeduction extends Migration
|
||||||
|
{
|
||||||
|
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
$this->forge->addField([
|
||||||
|
'emppaytransinded_id' => [
|
||||||
|
'type' => 'INT',
|
||||||
|
'constraint' => 11,
|
||||||
|
'unsigned' => true,
|
||||||
|
'auto_increment' => true
|
||||||
|
],
|
||||||
|
'emppaytrans_id' => [
|
||||||
|
'type' => 'INT',
|
||||||
|
'constraint' => 11,
|
||||||
|
'unsigned' => true,
|
||||||
|
],
|
||||||
|
'inded_id' => [
|
||||||
|
'type' => 'INT',
|
||||||
|
'constraint' => 11,
|
||||||
|
'unsigned' => true,
|
||||||
|
],
|
||||||
|
'payslip_display' => [
|
||||||
|
'type' => 'VARCHAR',
|
||||||
|
'constraint' => 25,
|
||||||
|
'null' => false
|
||||||
|
],
|
||||||
|
'inded_name' => [
|
||||||
|
'type' => 'VARCHAR',
|
||||||
|
'constraint' => 255,
|
||||||
|
'null' => false
|
||||||
|
],
|
||||||
|
'coa_code' => [
|
||||||
|
'type' => 'VARCHAR',
|
||||||
|
'constraint' => 25,
|
||||||
|
'null' => true,
|
||||||
|
],
|
||||||
|
'is_income' => [
|
||||||
|
'type' => 'TINYINT',
|
||||||
|
'constraint' => 1,
|
||||||
|
'null' => false
|
||||||
|
],
|
||||||
|
'is_taxable' => [
|
||||||
|
'type' => 'TINYINT',
|
||||||
|
'constraint' => 1,
|
||||||
|
'null' => false
|
||||||
|
],
|
||||||
|
'include_in_gross' => [
|
||||||
|
'type' => 'TINYINT',
|
||||||
|
'constraint' => 1,
|
||||||
|
'null' => false
|
||||||
|
],
|
||||||
|
'is_fixed_amt' => [
|
||||||
|
'type' => 'TINYINT',
|
||||||
|
'constraint' => 1,
|
||||||
|
'null' => false
|
||||||
|
],
|
||||||
|
'is_percent_amt' => [
|
||||||
|
'type' => 'TINYINT',
|
||||||
|
'constraint' => 1,
|
||||||
|
'null' => false
|
||||||
|
],
|
||||||
|
'amount' => [
|
||||||
|
'type' => 'DECIMAL',
|
||||||
|
'constraint' => '12,4',
|
||||||
|
'null' => false
|
||||||
|
],
|
||||||
|
'base_amount' => [
|
||||||
|
'type' => 'DECIMAL',
|
||||||
|
'constraint' => '12,4',
|
||||||
|
'null' => false
|
||||||
|
],
|
||||||
|
'is_override' => [
|
||||||
|
'type' => 'TINYINT',
|
||||||
|
'constraint' => 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('emppaytransinded_id', true);
|
||||||
|
$this->forge->addForeignKey('emppaytrans_id', 'emp_pay_trans', 'emppaytrans_id', 'CASCADE', 'RESTRICT');
|
||||||
|
$this->forge->createTable('emp_pay_trans_inded');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
$this->forge->dropTable('emp_pay_trans_inded');
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entities;
|
||||||
|
|
||||||
|
use CodeIgniter\Entity\Entity;
|
||||||
|
|
||||||
|
class EmpPayTransIncomeDeduction extends Entity
|
||||||
|
{
|
||||||
|
protected $attributes = [
|
||||||
|
'emppaytransinded_id' => null,
|
||||||
|
'emppaytrans_id' => null,
|
||||||
|
'inded_id' => null,
|
||||||
|
'payslip_display' => null,
|
||||||
|
'inded_name' => null,
|
||||||
|
'coa_code' => null,
|
||||||
|
'is_income' => null,
|
||||||
|
'is_taxable' => null,
|
||||||
|
'include_in_gross' => null,
|
||||||
|
'is_fixed_amt' => null,
|
||||||
|
'is_percent_amt' => null,
|
||||||
|
'amount' => null,
|
||||||
|
'base_amount' => null,
|
||||||
|
'is_override' => null,
|
||||||
|
];
|
||||||
|
protected $datamap = [];
|
||||||
|
protected $dates = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
|
protected $casts = [];
|
||||||
|
}
|
@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entities;
|
||||||
|
|
||||||
|
use CodeIgniter\Entity\Entity;
|
||||||
|
|
||||||
|
class EmployeePayTransaction extends Entity
|
||||||
|
{
|
||||||
|
protected $attributes = [
|
||||||
|
'emppaytrans_id' => null,
|
||||||
|
'paytrans_id' => null,
|
||||||
|
'company_id' => null,
|
||||||
|
'branch_code' => null,
|
||||||
|
'dept_id' => null,
|
||||||
|
'job_title_id' => null,
|
||||||
|
'pay_group_id' => null,
|
||||||
|
'emp_status_id' => null,
|
||||||
|
'employee_id' => null,
|
||||||
|
'company_issued_id' => null,
|
||||||
|
'last_name' => null,
|
||||||
|
'first_name' => null,
|
||||||
|
'middle_name' => null,
|
||||||
|
'suffix' => null,
|
||||||
|
'email_address' => null,
|
||||||
|
'is_ATM' => null,
|
||||||
|
'savings_account' => null,
|
||||||
|
'basic_monthly_pay' => null,
|
||||||
|
'basic_daily_pay' => null,
|
||||||
|
'basic_hourly_pay' => null,
|
||||||
|
'has_cola' => null,
|
||||||
|
'has_philhealth' => null,
|
||||||
|
'has_hdmf' => null,
|
||||||
|
'has_sss' => null,
|
||||||
|
'has_gsis' => null,
|
||||||
|
'actual_work_days' => null,
|
||||||
|
'basic_pay' => null,
|
||||||
|
'gross_income' => null,
|
||||||
|
'taxable_income' => null,
|
||||||
|
'nontaxable_income' => null,
|
||||||
|
'income_tax' => null,
|
||||||
|
'total_deduction' => null,
|
||||||
|
'net_pay' => null,
|
||||||
|
];
|
||||||
|
protected $datamap = [];
|
||||||
|
protected $dates = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
|
protected $casts = [];
|
||||||
|
}
|
@ -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,60 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use CodeIgniter\Model;
|
||||||
|
|
||||||
|
class EmpPayTransIncomeDeductionModel extends Model
|
||||||
|
{
|
||||||
|
protected $table = 'emp_pay_trans_inded';
|
||||||
|
protected $primaryKey = 'emppaytransinded_id';
|
||||||
|
protected $useAutoIncrement = true;
|
||||||
|
protected $returnType = 'array';
|
||||||
|
protected $useSoftDeletes = false;
|
||||||
|
protected $protectFields = true;
|
||||||
|
protected $allowedFields = ['emppaytrans_id',
|
||||||
|
'inded_id',
|
||||||
|
'is_fixed_amt',
|
||||||
|
'is_percent_amt',
|
||||||
|
'amount',
|
||||||
|
'base_amount',
|
||||||
|
'is_override'];
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,100 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use CodeIgniter\Model;
|
||||||
|
|
||||||
|
class EmployeePayTransactionModel extends Model
|
||||||
|
{
|
||||||
|
protected $table = 'emp_pay_trans';
|
||||||
|
protected $primaryKey = 'emppaytrans_id';
|
||||||
|
protected $useAutoIncrement = true;
|
||||||
|
protected $returnType = \App\Entities\EmployeePayTransaction::class;
|
||||||
|
protected $useSoftDeletes = false;
|
||||||
|
protected $protectFields = true;
|
||||||
|
protected $allowedFields = ['paytrans_id',
|
||||||
|
'company_id',
|
||||||
|
'branch_code',
|
||||||
|
'dept_id',
|
||||||
|
'job_title_id',
|
||||||
|
'pay_group_id',
|
||||||
|
'emp_status_id',
|
||||||
|
'employee_id',
|
||||||
|
'company_issued_id',
|
||||||
|
'last_name',
|
||||||
|
'first_name',
|
||||||
|
'middle_name',
|
||||||
|
'suffix',
|
||||||
|
'email_address',
|
||||||
|
'is_ATM',
|
||||||
|
'savings_account',
|
||||||
|
'basic_monthly_pay',
|
||||||
|
'basic_daily_pay',
|
||||||
|
'basic_hourly_pay',
|
||||||
|
'has_cola',
|
||||||
|
'has_philhealth',
|
||||||
|
'has_hdmf',
|
||||||
|
'has_sss',
|
||||||
|
'has_gsis',
|
||||||
|
'actual_work_days',
|
||||||
|
'basic_pay',
|
||||||
|
'gross_income',
|
||||||
|
'taxable_income',
|
||||||
|
'nontaxable_income',
|
||||||
|
'income_tax',
|
||||||
|
'total_deduction',
|
||||||
|
'net_pay'];
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getEmpPayTransByPayGroupId($paygroupid)
|
||||||
|
{
|
||||||
|
$builder = $this->db->table('emp_pay_trans');
|
||||||
|
$builder->select('*');
|
||||||
|
$builder->join('pay_trans', 'pay_trans.paytrans_id = emp_pay_trans.paytrans_id');
|
||||||
|
$builder->join('company_branch', 'company_branch.branch_code = emp_pay_trans.branch_code');
|
||||||
|
$builder->join('company_dept', 'company_dept.dept_id = emp_pay_trans.dept_id');
|
||||||
|
$builder->join('job_title', 'job_title.job_title_id = emp_pay_trans.job_title_id');
|
||||||
|
$builder->join('pay_group', 'pay_group.pay_group_id = emp_pay_trans.pay_group_id');
|
||||||
|
$builder->join('emp_status', 'emp_status.emp_status_id = emp_pay_trans.emp_status_id');
|
||||||
|
$builder->join('employee', 'employee.employee_id = emp_pay_trans.employee_id');
|
||||||
|
$builder->where('emp_pay_trans.pay_group_id', $paygroupid);
|
||||||
|
return $builder->get()->getResult();
|
||||||
|
}
|
||||||
|
}
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,182 @@
|
|||||||
|
<!-- 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">×</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 Employee for Payroll</h3>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<?php if($paygroupid == null || $paygroupid == -1): ?>
|
||||||
|
<p>Please select payroll group.</p>
|
||||||
|
<?php else: ?>
|
||||||
|
<div class="card-body table-responsive p-0">
|
||||||
|
<?php if($showInitBtn): ?>
|
||||||
|
<p>You may change the working days for this payroll cutoff. Deduct days off or absences on <strong>working days</strong> field.</p>
|
||||||
|
<?php else: ?>
|
||||||
|
<p>Adjust entry of each employee by clicking on <strong>Adjust</strong> button</p>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?= $tblEmpPayTrans ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
<div class="card-footer">
|
||||||
|
<?php if($showInitBtn && !($paygroupid == null || $paygroupid == -1)): ?>
|
||||||
|
<a class="btn btn-warning" href="/payroll/emppaytransinit/<?= $initURL ?>">Initialize Payroll</a>
|
||||||
|
<?php elseif($paygroupid == null || $paygroupid == -1): ?>
|
||||||
|
<button type="button" class="btn btn-warning" disabled>Initialize Payroll</button>
|
||||||
|
<?php else: ?>
|
||||||
|
<button type="button" class="btn btn-primary">Generate Payslip</button>
|
||||||
|
<?php endif; ?>
|
||||||
|
</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">×</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 -->
|
Loading…
Reference in New Issue