|
|
|
@ -169,12 +169,81 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Modal Edit Income -->
|
|
|
|
|
<div class="modal fade" id="mdlEditIncome">
|
|
|
|
|
<div class="modal-dialog">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<form action="<?= url_to('payroll/addcompben') ?>" method="post">
|
|
|
|
|
<div class="modal-header bg-warning">
|
|
|
|
|
<h4 class="modal-title" >Edit Employee Income</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">Employee Income Information</p>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<?php if($empLoaded) : ?>
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="txtEmpPayIndedId">Income Name</label>
|
|
|
|
|
<input type="hidden" name="emppayinded_id" >
|
|
|
|
|
<input class="form-control" type="text" readonly id="txtEmpPayIndedId" name="inded_name">
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<input type="hidden" name="payschedule_id" value="<?= $_GET['payschedid'] ?>">
|
|
|
|
|
<input type="hidden" name="emppay_id" value="<?= $selectedEmployee->emppay_id ?>" >
|
|
|
|
|
<input type="hidden" name="emp_id" value="<?= $selectedEmployee->employee_id ?>" >
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<div class="form-check">
|
|
|
|
|
<input class="form-check-input" type="radio" id="rdoFixedAmount" name="amount_type" value="fixed" checked>
|
|
|
|
|
<label for="rdoFixedAmount" class="form-check-label">Fixed amount.</label>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-check">
|
|
|
|
|
<input class="form-check-input" type="radio" id="rdoPercentageAmount" name="amount_type" value="perc">
|
|
|
|
|
<label for="rdoPercentageAmount" class="form-check-label">Amount is in percentage.</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="txtAmount">Amount</label>
|
|
|
|
|
<input class="form-control" type="number" id="txtAmount" name="amount" values="<?= old('amount') ?>">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<div class="custom-control custom-checkbox">
|
|
|
|
|
<input class="custom-control-input" type="checkbox" id="chkIsOverride" name="is_override">
|
|
|
|
|
<label for="chkIsOverride" class="custom-control-label">Override computations if there are any.</label>
|
|
|
|
|
<p><small><i>Override will implement this amount and not the computational amount made like in SSS, Philhealth, Pag-IBIG and taxastion</i></small></p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<?php else : ?>
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<p class="text-danger">No Employee Loaded. Please select employee first</p>
|
|
|
|
|
</div>
|
|
|
|
|
<?php endif ?>
|
|
|
|
|
</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 Type</h3>
|
|
|
|
|
<h3 class="card-title">Select Schedule and Employee</h3>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
<div class="row">
|
|
|
|
@ -211,101 +280,129 @@
|
|
|
|
|
</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">Payroll Income and Deduction Details</h3>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<?php if($empLoaded): ?>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<?php if($empLoaded): ?>
|
|
|
|
|
<h3>Payroll Income and Deduction Details</h3>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-6 col-xs-6">
|
|
|
|
|
<p><strong>Employee Name:</strong> <?= $selectedEmployee->last_name . ', ' . $selectedEmployee->first_name ?></p>
|
|
|
|
|
<p><strong>Employee ID:</strong> <?= $selectedEmployee->company_issued_id ?></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6 col-xs-6 text-right">
|
|
|
|
|
<p><strong>Basic Salary</strong> <?= $selectedEmployee->basic_monthly_pay ?></p>
|
|
|
|
|
<p><strong>Date:</strong> 20/09/2024</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<table class="table table-bordered">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Description</th>
|
|
|
|
|
<th colspan="2" class="text-center">Amount</th>
|
|
|
|
|
<th>Action</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><span class="pl-3">Basic Salary</span></td>
|
|
|
|
|
<td> </td>
|
|
|
|
|
<td class="text-right"><?= number_format($selectedEmployee->basic_semi_monthly_pay, 2, ".", ",") ?></td>
|
|
|
|
|
<td> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
$grossTotal = 0;
|
|
|
|
|
$deductionTotal = 0;
|
|
|
|
|
$netTotal = 0;
|
|
|
|
|
|
|
|
|
|
foreach($empPayIncomeList as $empPayIncome):?>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><span class="pl-3"><?= $empPayIncome->inded_name ?></span></td>
|
|
|
|
|
<td> </td>
|
|
|
|
|
<td class="text-right"><?= number_format($empPayIncome->amount, 2, ".", ",") ?></td>
|
|
|
|
|
<td> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
<?php
|
|
|
|
|
<div class="col-6 col-xs-6">
|
|
|
|
|
<p><strong>Employee Name:</strong> <?= $selectedEmployee->last_name . ', ' . $selectedEmployee->first_name ?></p>
|
|
|
|
|
<p><strong>Employee ID:</strong> <?= $selectedEmployee->company_issued_id ?></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6 col-xs-6 text-right">
|
|
|
|
|
<p><strong>Basic Salary</strong> <?= $selectedEmployee->basic_monthly_pay ?></p>
|
|
|
|
|
<p><strong>Date:</strong> 20/09/2024</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<table class="table table-bordered">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Description</th>
|
|
|
|
|
<th colspan="2" class="text-center">Amount</th>
|
|
|
|
|
<th>Action</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<?php
|
|
|
|
|
$grossTotal = $selectedEmployee->basic_semi_monthly_pay;
|
|
|
|
|
$taxableGross = $selectedEmployee->basic_semi_monthly_pay;
|
|
|
|
|
$deductionTotal = 0;
|
|
|
|
|
?>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><span class="pl-3">Basic Salary</span></td>
|
|
|
|
|
<td> </td>
|
|
|
|
|
<td class="text-right"><?= number_format($selectedEmployee->basic_semi_monthly_pay, 2, ".", ",") ?></td>
|
|
|
|
|
<td> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
<?php foreach($empPayIncomeList as $empPayIncome):?>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><span class="pl-3"><?= $empPayIncome->inded_name ?></span></td>
|
|
|
|
|
<td> </td>
|
|
|
|
|
<td class="text-right"><?= number_format($empPayIncome->amount, 2, ".", ",") ?></td>
|
|
|
|
|
<td>
|
|
|
|
|
<a href="#" class="ml-3" data-toggle="tooltip" title="Edit Income Information"
|
|
|
|
|
data-emppayinded_id = "<?= $empPayIncome->emppayinded_id ?>"
|
|
|
|
|
data-inded_name = "<?= $empPayIncome->inded_name ?>"
|
|
|
|
|
data-emppay_id = "<?= $empPayIncome->emppay_id ?>"
|
|
|
|
|
data-payschedule_id = "<?= $empPayIncome->payschedule_id ?>"
|
|
|
|
|
data-inded_id = "<?= $empPayIncome->inded_id ?>"
|
|
|
|
|
data-is_fixed_amt = "<?= $empPayIncome->is_fixed_amt ?>"
|
|
|
|
|
data-is_percent_amt = "<?= $empPayIncome->is_percent_amt ?>"
|
|
|
|
|
data-amount = "<?= $empPayIncome->amount ?>"
|
|
|
|
|
data-is_override = "<?= $empPayIncome->is_override ?>"
|
|
|
|
|
onclick="editIncome(this)"><i class="fas fa-edit"></i></a>
|
|
|
|
|
<a href="#" class="ml-3" data-emppayinded_id = "<?= $empPayIncome->emppayinded_id ?>" data-toggle="tooltip" title="Delete Income Information"><i class="fas fa-trash "></i></a>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
$grossTotal += $empPayIncome->amount;
|
|
|
|
|
|
|
|
|
|
endforeach; ?>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><strong>Gross Total</strong></td>
|
|
|
|
|
<td> </td>
|
|
|
|
|
<td class="text-right"><strong>Php <?= number_format($grossTotal, 2, ".", ","); ?></strong></td>
|
|
|
|
|
<td> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<?php foreach($empPayDeductionList as $empPayDeduction):?>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><span class="pl-3"><?= $empPayDeduction->inded_name ?></span></td>
|
|
|
|
|
<td class="text-right">-<?= number_format($empPayDeduction->amount, 2, ".", ",") ?></td>
|
|
|
|
|
<td> </td>
|
|
|
|
|
<td> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
<?php
|
|
|
|
|
$grossTotal += $empPayIncome->amount;
|
|
|
|
|
if($empPayIncome->is_taxable) $taxableGross += $empPayIncome->amount;
|
|
|
|
|
|
|
|
|
|
endforeach; ?>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><strong>Gross Total</strong></td>
|
|
|
|
|
<td> </td>
|
|
|
|
|
<td class="text-right"><strong>Php <?= number_format($grossTotal, 2, ".", ","); ?></strong></td>
|
|
|
|
|
<td> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<?php foreach($empPayDeductionList as $empPayDeduction):?>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><span class="pl-3"><?= $empPayDeduction->inded_name ?></span></td>
|
|
|
|
|
<td class="text-right">-<?= number_format($empPayDeduction->amount, 2, ".", ",") ?></td>
|
|
|
|
|
<td> </td>
|
|
|
|
|
<td>
|
|
|
|
|
<a href="#" class="ml-3" data-toggle="tooltip" title="Edit Deduction Information" ><i class="fas fa-edit "></i></a>
|
|
|
|
|
<a href="#" class="ml-3" data-toggle="tooltip" title="Delete Deduction Information"><i class="fas fa-trash "></i></a>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
$deductionTotal += $empPayDeduction->amount;
|
|
|
|
|
|
|
|
|
|
endforeach;
|
|
|
|
|
?>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><strong>Total Deductions</strong></td>
|
|
|
|
|
<td class="text-right"><strong>Php <?= number_format($deductionTotal, 2, ".", ","); ?></strong></td>
|
|
|
|
|
<td> </td>
|
|
|
|
|
<td> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
<tfoot>
|
|
|
|
|
<tr>
|
|
|
|
|
<th><span class="text-uppercase">Net Income</span></th>
|
|
|
|
|
<td> </td>
|
|
|
|
|
<th class="text-right">Php <?= number_format($grossTotal - $deductionTotal, 2, ".", ",") ?></th>
|
|
|
|
|
<td> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tfoot>
|
|
|
|
|
</table>
|
|
|
|
|
<?php else: ?>
|
|
|
|
|
<p>Select an employee first then click on "Load Income & Deduction" button</p>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-footer">
|
|
|
|
|
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#mdlAddIncome">Add Income</button>
|
|
|
|
|
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#mdlAddDeduction">Add Deduction</button>
|
|
|
|
|
</div>
|
|
|
|
|
$deductionTotal += $empPayDeduction->amount;
|
|
|
|
|
|
|
|
|
|
endforeach;
|
|
|
|
|
?>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><strong>Total Deductions</strong></td>
|
|
|
|
|
<td class="text-right"><strong>Php <?= number_format($deductionTotal, 2, ".", ","); ?></strong></td>
|
|
|
|
|
<td> </td>
|
|
|
|
|
<td> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
<tfoot>
|
|
|
|
|
<tr>
|
|
|
|
|
<th><span class="text-uppercase">Net Income</span></th>
|
|
|
|
|
<td> </td>
|
|
|
|
|
<th class="text-right">Php <?= number_format($grossTotal - $deductionTotal, 2, ".", ",") ?></th>
|
|
|
|
|
<td> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tfoot>
|
|
|
|
|
</table>
|
|
|
|
|
<?php else: ?>
|
|
|
|
|
<p>Select an employee first then click on "Load Income & Deduction" button</p>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-footer">
|
|
|
|
|
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#mdlAddIncome">Add Income</button>
|
|
|
|
|
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#mdlAddDeduction">Add Deduction</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -332,6 +429,11 @@ $('.select2').select2();
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function editIncome(element) {
|
|
|
|
|
|
|
|
|
|
$('#mdlEditIncome').modal('show');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|