parent
291eab61d1
commit
07dbb0fb5b
@ -0,0 +1,117 @@
|
||||
<?php
|
||||
// Class Library
|
||||
use App\ClassLib\MiscLib;
|
||||
?>
|
||||
|
||||
<!-- Extend area where template is defined -->
|
||||
<?= $this->extend('templates/adminlte/generalcontent') ?>
|
||||
<!-- .Extend -->
|
||||
|
||||
<!-- Title of the page -->
|
||||
<?= $this->section('title') ?>New User from List<?= $this->endSection() ?>
|
||||
<!-- .Title -->
|
||||
|
||||
<!-- CSS of the page -->
|
||||
<?= $this->section('css') ?>
|
||||
|
||||
<!-- DataTables -->
|
||||
<link rel="stylesheet" href="<?= base_url() ?>adminlte/plugins/datatables-bs4/css/dataTables.bootstrap4.min.css">
|
||||
<link rel="stylesheet" href="<?= base_url() ?>adminlte/plugins/datatables-responsive/css/responsive.bootstrap4.min.css">
|
||||
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
<!-- .CSS -->
|
||||
|
||||
<!-- body attribute - class definition -->
|
||||
<?= $this->section('bodyclass') ?>sidebar-mini<?= $this->endSection() ?>
|
||||
<!-- .body attribute -->
|
||||
|
||||
<!-- Container title -->
|
||||
<?= $this->section('containertitle') ?>New User from Employee List<?= $this->endSection() ?>
|
||||
<!-- .Container title -->
|
||||
|
||||
<!-- Active breadcrumb -->
|
||||
<?= $this->section('breadcrumbs') ?>
|
||||
<li class="breadcrumb-item"><a href="/adminuser">User Maintenance</a></li>
|
||||
<li class="breadcrumb-item active">New User from List</li>
|
||||
<?= $this->endSection() ?>
|
||||
<!-- .Active breadcrumb -->
|
||||
|
||||
<!-- Main content -->
|
||||
<?= $this->section('main') ?>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">List of Users</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table id="tblEmployee" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Employee ID</th>
|
||||
<th>Employee Name</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($employeeList as $employee): ?>
|
||||
<tr>
|
||||
<td><?= $employee->company_issued_id ?></td>
|
||||
<td><?= $employee->last_name.", ".$employee->first_name ?></td>
|
||||
<td>
|
||||
<?php
|
||||
$searchedEmp = auth()->getProvider()->where('employee_id', $employee->company_issued_id)->first();
|
||||
|
||||
if($searchedEmp == null):
|
||||
?>
|
||||
<a href="/adminuser/newuserfromemplist/<?= $employee->company_issued_id ?>" class="btn btn-secondary"><i class="fas fa-user-plus"></i> Create System Account</a>
|
||||
<?php else: ?>
|
||||
<p>Account Created Already</p>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
<!-- .Main content -->
|
||||
|
||||
<!-- Javascript -->
|
||||
|
||||
<?= $this->section('js') ?>
|
||||
|
||||
<!-- DataTables & Plugins -->
|
||||
<script src="<?= base_url() ?>adminlte/plugins/datatables/jquery.dataTables.min.js"></script>
|
||||
<script src="<?= base_url() ?>adminlte/plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
|
||||
<script src="<?= base_url() ?>adminlte/plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
|
||||
<script src="<?= base_url() ?>adminlte/plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#tblEmployee').DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": false,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"info": true,
|
||||
"autoWidth": false,
|
||||
"responsive": true,
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<!-- .Javascript -->
|
@ -0,0 +1,232 @@
|
||||
<!-- Extend area where template is defined -->
|
||||
<?= $this->extend('templates/adminlte/generalcontent') ?>
|
||||
<!-- .Extend -->
|
||||
|
||||
<!-- Title of the page -->
|
||||
<?= $this->section('title') ?>Payslip View<?= $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') ?>Payslip View<?= $this->endSection() ?>
|
||||
<!-- .Container title -->
|
||||
|
||||
<!-- Active breadcrumb -->
|
||||
<?= $this->section('breadcrumbs') ?>
|
||||
<li class="breadcrumb-item active">Payslip View</li>
|
||||
<?= $this->endSection() ?>
|
||||
<!-- .Active breadcrumb -->
|
||||
|
||||
<!-- Main content -->
|
||||
<?= $this->section('main') ?>
|
||||
|
||||
<!-- Modal Add Branch -->
|
||||
<div class="modal fade" id="mdlAddBranch">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form action="<?= url_to('payroll/addpaygroup') ?>" method="post">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" >New Group</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">Select Payroll Period</p>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label for="txtGroupCode">Payroll Group Code</label>
|
||||
<input class="form-control" type="text" id="txtGroupCode" name="pay_group_code" value="<?= old('pay_group_code') ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="txtGroupName">Payroll Group Name</label>
|
||||
<input class="form-control" type="text" id="txtGroupName" name="pay_group_name" values="<?= old('pay_group_name') ?>">
|
||||
</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 Period</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="/remp/payview" method="get">
|
||||
<div class="form-group">
|
||||
<label>Payroll Group</label>
|
||||
<div class="input-group mb-3">
|
||||
<select class="form-control select2 rounded-0" name="paytransid">
|
||||
<option value="-1">-- Select --</option>
|
||||
<?php foreach($payTransactions as $payTrans): ?>
|
||||
<?php $selected = ($paytransid != null && $paytransid == $payTrans->paytrans_id) ? 'selected' : ''; ?>
|
||||
<option value="<?= $payTrans->paytrans_id ?>" <?= $selected ?>><?= '['.($payTrans->is_open ? 'Open' : 'Closed').'] Payroll from '.$payTrans->payroll_from.' to '.$payTrans->payroll_to ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<span class="input-group-append">
|
||||
<button type="submit" class="btn btn-info btn-flat">View Payslip</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($paytransid != null): ?>
|
||||
<?php if($empPayTrans != null): ?>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Payslip View</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table id="tblEmpPayslipView" class="table table-bordered">
|
||||
<tr>
|
||||
<td>Employee Name:</td>
|
||||
<td colspan="3" class="text-bold"><?= $empPayTrans->last_name.", ".$empPayTrans->first_name ?></td>
|
||||
</tr>
|
||||
<tr class="bg-light text-bold">
|
||||
<td>Description</td>
|
||||
<td>Deduction</td>
|
||||
<td>Income</td>
|
||||
<td>Total</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> Basic Pay @<?= number_format($empPayTrans->basic_daily_pay, 2, '.', ',') ?> x <?= number_format($empPayTrans->actual_work_days, 2, '.', ',') ?> days</td>
|
||||
<td> </td>
|
||||
<td><?= number_format($empPayTrans->basic_pay, 2, '.', ','); ?></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$grossIncome = $empPayTrans->basic_pay;
|
||||
$totalDeduction = 0;
|
||||
foreach($empPayTransIncomes as $empPayTransIncome):
|
||||
?>
|
||||
<tr>
|
||||
<td> <?= $empPayTransIncome->payslip_display ?></td>
|
||||
<td> </td>
|
||||
<td><?= number_format($empPayTransIncome->amount, 2, '.', ','); ?></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<?php
|
||||
$grossIncome += $empPayTransIncome->amount;
|
||||
endforeach;
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><strong>Gross Income</strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td class="text-right"><strong><?= number_format($grossIncome, 2, ".", ",") ?></strong></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> Income Tax</td>
|
||||
<td>-<?= number_format($empPayTrans->income_tax, 2, '.', ','); ?></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
|
||||
<?php foreach($empPayTransDeductions as $empPayTransDeduction): ?>
|
||||
<tr>
|
||||
<td> <?= $empPayTransDeduction->payslip_display ?></td>
|
||||
<td>-<?= number_format($empPayTransDeduction->amount, 2, '.', ','); ?></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<?php
|
||||
$totalDeduction += $empPayTransDeduction->amount;
|
||||
endforeach;
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><strong>Total Deduction</strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td class="text-right">-<strong><?= number_format($totalDeduction, 2, ".", ",") ?></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Net Income</strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td class="text-right"><strong><?= number_format($empPayTrans->net_pay, 2, ".", ",") ?></strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<a href="/remp/payprint/<?= $paytransid ?>" target="_blank" class="btn btn-primary">Print Payslip</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Payslip View</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p>No payslip for this cut-off.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?= $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,151 @@
|
||||
<!-- Extend area where template is defined -->
|
||||
<?= $this->extend('templates/adminlte/printcontent') ?>
|
||||
<!-- .Extend -->
|
||||
|
||||
<!-- Title of the page -->
|
||||
<?= $this->section('title') ?>Payslip Printing<?= $this->endSection() ?>
|
||||
<!-- .Title -->
|
||||
|
||||
<!-- Main content -->
|
||||
<?= $this->section('main') ?>
|
||||
|
||||
<!-- title row -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h2 class="page-header">
|
||||
KARAT WORLD
|
||||
<small class="float-right"><span class="text-muted">Employee:</span> [<?= $empPayTrans->company_issued_id ?>] <?= $empPayTrans->last_name.", ".$empPayTrans->first_name ?></small>
|
||||
</h2>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
<!-- info row -->
|
||||
<div class="row invoice-info">
|
||||
<div class="col-sm-4 invoice-col">
|
||||
Payslip of <strong><?= $empPayTrans->last_name.", ".$empPayTrans->first_name ?></strong>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
<div class="col-sm-4 invoice-col">
|
||||
Payroll Period <br>
|
||||
<strong><?= date("F d, Y", strtotime($payTransaction->payroll_from))." to ".date("F d, Y", strtotime($payTransaction->payroll_to)) ?></strong><br>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
<div class="col-sm-4 invoice-col">
|
||||
Payroll Date <br>
|
||||
<strong><?= ($payTransaction->payschedule_id == 1) ? date("F 7, Y", strtotime($payTransaction->payroll_to)) : date("F t, Y", strtotime($payTransaction->payroll_to)) ?></strong>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<!-- Table row -->
|
||||
<div class="row">
|
||||
<div class="col-12 table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Description</th>
|
||||
<th>Deduction</th>
|
||||
<th>Income</th>
|
||||
<th>Total</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td> Basic Pay @<?= number_format($empPayTrans->basic_daily_pay, 2, '.', ',') ?> x <?= number_format($empPayTrans->actual_work_days, 2, '.', ',') ?> days</td>
|
||||
<td> </td>
|
||||
<td><?= number_format($empPayTrans->basic_pay, 2, '.', ',') ?></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<?php
|
||||
$grossIncome = $empPayTrans->basic_pay;
|
||||
$totalDeduction = 0;
|
||||
foreach($empPayTransIncomes as $empPayTransIncome):
|
||||
?>
|
||||
<tr>
|
||||
<td> <?= $empPayTransIncome->payslip_display ?></td>
|
||||
<td> </td>
|
||||
<td><?= number_format($empPayTransIncome->amount, 2, '.', ',') ?></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<?php
|
||||
$grossIncome += $empPayTransIncome->amount;
|
||||
endforeach;
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><strong>Gross Income</strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td class="text-right"><strong><?= number_format($grossIncome, 2, ".", ",") ?></strong></td>
|
||||
</tr>
|
||||
|
||||
<?php foreach($empPayTransDeductions as $empPayTransDeduction): ?>
|
||||
<tr>
|
||||
<td> <?= $empPayTransDeduction->payslip_display ?></td>
|
||||
<td>-<?= number_format($empPayTransDeduction->amount, 2, '.', ','); ?></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<?php
|
||||
$totalDeduction += $empPayTransDeduction->amount;
|
||||
endforeach;
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><strong>Total Deduction</strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td class="text-right">-<strong><?= number_format($totalDeduction, 2, ".", ",") ?></strong></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<div class="row">
|
||||
<!-- accepted payments column -->
|
||||
<div class="col-6">
|
||||
<p class="text-muted well well-sm shadow-none" style="margin-top: 10px;">
|
||||
I have fully read and understood all details concerning my wage for the above stated period. Wherein, I am fully satisfied with the computations made, without prejudice to my behalf. That all data stated above, I hereby acknowledge, to be true and correct.
|
||||
</p>
|
||||
<p class="lead"><?= $empPayTrans->last_name.", ".$empPayTrans->first_name ?></p>
|
||||
<p>____________________________________</p>
|
||||
<p class="text-muted well well-sm shadow-none" style="margin-top: 10px;">
|
||||
<i>Signature of Employee</i>
|
||||
</p>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
<div class="col-6">
|
||||
<p class="lead">Summary of Payslip</p>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th style="width:50%">Gross Income:</th>
|
||||
<td><?= number_format($grossIncome, 2, ".", ",") ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Total Deduction</th>
|
||||
<td>(<?= number_format($totalDeduction, 2, ".", ",") ?>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Tax:</th>
|
||||
<td>(<?= number_format($empPayTrans->income_tax, 2, ".", ",") ?>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Net Income:</th>
|
||||
<td><?= number_format($empPayTrans->net_pay, 2, ".", ",") ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
<!-- .Main content -->
|
||||
|
@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><?= $this->renderSection('title') ?></title>
|
||||
|
||||
<!-- Google Font: Source Sans Pro -->
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="<?= base_url() ?>adminlte/plugins/fontawesome-free/css/all.min.css">
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="<?= base_url() ?>adminlte/dist/css/adminlte.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<!-- Main content -->
|
||||
<section class="invoice">
|
||||
<?= $this->renderSection('main') ?>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- ./wrapper -->
|
||||
<!-- Page specific script -->
|
||||
<script>
|
||||
window.addEventListener("load", window.print());
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue