mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-12 11:11:31 +00:00
resolved conflicts
This commit is contained in:
Executable
+140
@@ -0,0 +1,140 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css"/>
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">{{ __('payroll.allowances_deductions') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('payroll.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('payroll.finance_home') }}</a></li>
|
||||
<li><a href="{{ route('payroll.index') }}"><i class="fa fa-eye"></i> {{ __('payroll.view_payrolls') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> {{ __('payroll.allowances_deductions') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('payroll::payroll.menu')
|
||||
|
||||
<div class="white-box">
|
||||
@php $patient = \Illuminate\Support\Facades\DB::table('patients')->where('id', $member->patient_id)->first(); @endphp
|
||||
|
||||
<h4>{{ __('payroll.personal_information') }}</h4>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th><b>{{ __('payroll.staff_member') }}</b></th>
|
||||
<td>{{ $patient->first_name }} {{ $patient->last_name }}</td>
|
||||
<th><b>{{ __('payroll.staff_patient_number') }}</b></th>
|
||||
<td>{{ $patient->number }}</td>
|
||||
<th><b>{{ __('payroll.staff_contact') }}</b></th>
|
||||
<td>{{ $patient->phone }}</td>
|
||||
@php
|
||||
$contract_periods = json_decode($member->contract_period, true);
|
||||
$contract_periods = end($contract_periods);
|
||||
@endphp
|
||||
<th><b>{{ __('payroll.contract') }}</b></th>
|
||||
<td>{{ [1 => 'Permanent', 2 => 'Probation', 3 => 'Contract'][$member->contract] ?? 'N/A' }}</td>
|
||||
<th><b>{{ __('payroll.contract_expiry') }}</b></th>
|
||||
<td>{{ streamline_date($contract_periods[1]) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<hr>
|
||||
|
||||
{{ Form::open(['route' => 'payroll.save_allowances_or_deductions']) }}
|
||||
|
||||
{{ Form::hidden('member_id', $member->id) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('type', __('payroll.type')) }}
|
||||
{{ Form::select('type', $type, '', ['class' => 'form-control col-sm-12 compulsory','required', 'onclick' => 'show_income_account(this.value)']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('amount', __('payroll.amount')) }}
|
||||
{{ Form::number('amount','',['class' => 'compulsory form-control', 'required']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="income_account_div" style="display: none">
|
||||
{{ Form::label('income_account', __('payroll.income_account')) }}
|
||||
{{ Form::select('income_account',$income_accounts,'',['class' => 'form-control']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('recurring', __('payroll.is_recurring')) }}
|
||||
<br>
|
||||
{{ Form::radio('recurring', 1, false, ["required", 'id' => 'recurring_yes','onclick' => 'show_period()']) }} {{ __('payroll.yes') }}
|
||||
{{ Form::radio('recurring', 0, true, ["required", 'id' => 'recurring_no', 'onclick' => 'hide_period()']) }} {{ __('payroll.no') }}
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="recurring_period_div" style="display: none">
|
||||
{{ Form::label('recurring_period', __('payroll.recurring_period')) }}
|
||||
<br>
|
||||
{{ Form::radio('recurring_period', 1, false, ['id' => 'recurring_period_yes','onclick' => 'show_date()']) }} {{ __('payroll.defined_date') }}
|
||||
{{ Form::radio('recurring_period', 0, false, ['id' => 'recurring_period_no', 'onclick' => 'hide_date()']) }} {{ __('payroll.end_of_contract') }}
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="recurring_final_date_div" style="display: none">
|
||||
{{ Form::label('recurring_final_date', __('payroll.recurring_final_date')) }}
|
||||
{{ Form::text('recurring_final_date','',['class' => 'form-control','readonly','id'=>'recurring_final_date']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('reason',__('payroll.description')) }}
|
||||
{{ Form::textarea('reason','',['class' => 'form-control compulsory', 'required']) }}
|
||||
</div>
|
||||
|
||||
{{ Form::button(__('payroll.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button(__('payroll.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('#recurring_final_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd/mm/yyyy'
|
||||
});
|
||||
|
||||
function show_income_account(type) {
|
||||
if(type == 0) {
|
||||
$('#income_account_div').hide();
|
||||
} else {
|
||||
$('#income_account_div').show();
|
||||
}
|
||||
}
|
||||
|
||||
function show_period() {
|
||||
$('#recurring_period_div').show();
|
||||
}
|
||||
|
||||
function hide_period() {
|
||||
$('#recurring_period_div').hide();
|
||||
$('#recurring_final_date_div').hide();
|
||||
}
|
||||
|
||||
function show_date() {
|
||||
$('#recurring_final_date_div').show();
|
||||
}
|
||||
|
||||
function hide_date() {
|
||||
$('#recurring_final_date_div').hide();
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
Executable
+133
@@ -0,0 +1,133 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
|
||||
|
||||
<style type="text/css">
|
||||
#divToPrint{
|
||||
font-size: 13px;
|
||||
color: #7c7c7c;
|
||||
}
|
||||
|
||||
#receipt_table{
|
||||
font-size: 1em;
|
||||
font-weight: normal;
|
||||
font-family: monospace
|
||||
}
|
||||
|
||||
#receipt_table th{
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
#receipt_table td{
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.receipt-label{
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.receipt-title{
|
||||
font-weight: bolder;
|
||||
text-decoration: underline;
|
||||
display: block; font-family:
|
||||
monospace
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row bg-title">
|
||||
<div class="col-md-5">
|
||||
<h4>{{ __('payroll.allowances_deductions') }} {{ __('payroll.receipt') }}</h4>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('payroll.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('payroll.finance_home') }}</a></li>
|
||||
<li><a href="{{ route('payroll.index') }}"><i class="fa fa-eye"></i> {{ __('payroll.view_payrolls') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> {{ __('payroll.allowances_deductions') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="white-box">
|
||||
<div class="row" style="float:right;"><button class="btn btn-success glyphicon glyphicon-print" onclick="print_receipt()"> {{ __('payroll.print') }}</button></div>
|
||||
<div class="row" id="divToPrint">
|
||||
<div class="col-sm-3"></div>
|
||||
<div class="col-sm-6" style="text-align: center;">
|
||||
<p style="text-align: center; font-size: 1em">
|
||||
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace"><b>{{ $hospital_information->name }}</b></span>
|
||||
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace">{{ $hospital_information->address }}</span>
|
||||
<span class="receipt-label"><b>Tel:</b> {{ $hospital_information->phone_number }}</span><br>
|
||||
<span class="receipt-label"><b>{{ __('payroll.email') }}:</b> {{ $hospital_information->email }}</span><br>
|
||||
<span class="receipt-label"><b>{{ __('payroll.cashier') }}:</b> {{ auth()->user()->first_name }} {{ auth()->user()->last_name }}</span><br>
|
||||
<span class="receipt-label"><b>{{ __('payroll.date') }}:</b> {{ streamline_date_time_short($records->created_at) }}</span><br>
|
||||
<span class="receipt-label"><b>{{ __('payroll.receipt_number') }} :</b> {{ $records->receipt_number }}</span><br>
|
||||
@php $patient_id = get_name($records->member_id, 'id', 'patient_id', 'payrolls'); @endphp
|
||||
<span class="receipt-label"><b>{{ __('payroll.staff_name') }}</b> : {{ get_full_name($patient_id, 'id', 'first_name', 'last_name', 'patients') }}</span><br>
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<table class="table" id="receipt_table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><b>{{ __('payroll.type') }}</b></td>
|
||||
<td>
|
||||
<b>
|
||||
@if($records->type == 0)
|
||||
{{ __('payroll.allowance') }}
|
||||
@else
|
||||
{{ __('payroll.deduction') }}
|
||||
@endif
|
||||
</b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><b>{{ __('payroll.period') }}</b></td>
|
||||
<td><b>{{ $records->month }} / {{ $records->year }}</b></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><b>{{ __('payroll.amount') }}</b></td>
|
||||
<td><b>{{ ugandan_shillings($records->amount) }}</b></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><b>{{ __('payroll.reason') }}</b></td>
|
||||
<td><b>{{ $records->reason }}</b></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
</div>
|
||||
<i style="font-size: 0.8em; margin-left: 50%;">© Stre@mline</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('styles')
|
||||
<script type="text/javascript">
|
||||
function print_receipt() {
|
||||
let myDiv = document.getElementById('divToPrint');
|
||||
let newWindow = window.open('', 'SecondWindow', 'toolbar=0,stat=0');
|
||||
|
||||
newWindow.document.write("<html><body " +
|
||||
"class='' " +
|
||||
" onload='window.print()'>" +
|
||||
myDiv.innerHTML +
|
||||
"</body></html>");
|
||||
newWindow.document.close();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
Executable
+148
@@ -0,0 +1,148 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">{{ __('payroll.allowances_deductions') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('payroll.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('payroll.finance_home') }}</a></li>
|
||||
<li><a href="{{ route('payroll.index') }}"><i class="fa fa-eye"></i> {{ __('payroll.view_payrolls') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> {{ __('payroll.allowances_deductions') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('payroll::payroll.menu')
|
||||
|
||||
<div class="white-box">
|
||||
@php $patient = \Illuminate\Support\Facades\DB::table('patients')->where('id', $member->patient_id)->first(); @endphp
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
<h4>{{ __('payroll.personal_information') }}</h4>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th><b>{{ __('payroll.staff_member') }}</b></th>
|
||||
<td>{{ $patient->first_name }} {{ $patient->last_name }}</td>
|
||||
<th><b>{{ __('payroll.staff_patient_number') }}</b></th>
|
||||
<td>{{ $patient->number }}</td>
|
||||
<th><b>{{ __('payroll.staff_contact') }}</b></th>
|
||||
<td>{{ $patient->phone }}</td>
|
||||
@php
|
||||
$contract_periods = json_decode($member->contract_period, true);
|
||||
$contract_periods = end($contract_periods);
|
||||
$total_deductions = 0;
|
||||
$total_allowances = 0;
|
||||
@endphp
|
||||
<th><b>{{ __('payroll.contract') }}</b></th>
|
||||
<td>{{ [1 => 'Permanent', 2 => 'Probation', 3 => 'Contract'][$member->contract] ?? 'N/A' }}</td>
|
||||
<th><b>{{ __('payroll.contract_expiry') }}</b></th>
|
||||
<td>{{ streamline_date($contract_periods[1]) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6"><h4>{{ __('payroll.allowances_deductions_details') }}</h4></div>
|
||||
<div class="col-md-6">
|
||||
<a class="btn btn-success pull-right" href="/payroll/add_allowances_or_deductions/{{$member->id}}">{{ __('payroll.add') }}</a>
|
||||
<a class="btn btn-success pull-right" href="/payroll/print_allowances_or_deductions/{{$member->id}}" target="_blank" style="margin-right: 30px">{{ __('payroll.print') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('payroll.type') }}</th>
|
||||
<th>{{ __('payroll.amount') }}</th>
|
||||
<th>{{ __('payroll.income_account') }}</th>
|
||||
<th>{{ __('payroll.is_recurring') }}</th>
|
||||
<th>{{ __('payroll.recurring_period') }}</th>
|
||||
<th>{{ __('payroll.recurring_final_date') }}</th>
|
||||
<th>{{ __('payroll.reason') }}</th>
|
||||
<th>{{ __('payroll.added_to_payslip') }}</th>
|
||||
<th>{{ __('payroll.created_by') }}</th>
|
||||
<th>{{ __('payroll.created_on') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(count($records) > 0)
|
||||
@foreach($records as $record)
|
||||
<tr>
|
||||
<td>
|
||||
@if($record->type == 0)
|
||||
@php $total_allowances += $record->amount; @endphp
|
||||
{{ __('payroll.allowance') }}
|
||||
@else
|
||||
@php $total_deductions += $record->amount; @endphp
|
||||
{{ __('payroll.deduction') }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ ugandan_shillings($record->amount) }}</td>
|
||||
<td>{{ $income_accounts[$record->income_account_id] ?? 'N/A' }}</td>
|
||||
<td>{{ [0 => 'No', 1 => 'Yes'][$record->recurring] ?? 'N/A' }}</td>
|
||||
<td>{{ [0 => 'End of Contract', 1 => 'Defined Date'][$record->recurring_period] ?? 'N/A' }}</td>
|
||||
<td>{{ $record->recurring_final_date ? streamline_date($record->recurring_final_date) : 'N/A' }}</td>
|
||||
<td>{{ $record->reason }}</td>
|
||||
<td>
|
||||
@if($record->billed == 0)
|
||||
<span style="color: red">{{ __('payroll.no') }}</span>
|
||||
@else
|
||||
<span style="color: darkgreen">{{ __('payroll.yes') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ get_full_name($record->created_by, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
<td>{{ streamline_date_time($record->created_at) }}</td>
|
||||
<td><a href="/payroll/remove_allowance_deduction/{{ $record->id }}" class="btn btn-sm btn-danger">Remove</a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="11" class="text-center"><h5><code>{{ __('payroll.no_records_available') }}</code></h5></td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td><b>Total Allowances</b></td>
|
||||
<td>{{ ugandan_shillings($total_allowances) }}</td>
|
||||
<td><b>Total Deductions</b></td>
|
||||
<td>{{ ugandan_shillings($total_deductions) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.flash.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/pdfmake.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/vfs_fonts.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.html5.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.print.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
'csv', 'excel', 'pdf', 'print'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+253
@@ -0,0 +1,253 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css"/>
|
||||
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">{{ __('payroll.create_multiple_employees') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('payroll.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('payroll.finance_home') }}</a></li>
|
||||
<li><a href="{{ route('payroll.index') }}"><i class="fa fa-eye"></i> {{ __('payroll.view_payrolls') }}</a></li>
|
||||
<li class="active"><i class="fa fa-plus"></i> {{ __('payroll.create_multiple_employees') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('payroll::payroll.menu')
|
||||
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
|
||||
{{ Form::open(['route' => ['payroll.bulk_store']]) }}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover color-table success-table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">{{ __('payroll.staff_member') }}</th>
|
||||
<th class="text-center">{{ __('payroll.position') }}</th>
|
||||
<th class="text-center">{{ __('payroll.department') }}</th>
|
||||
<th class="text-center">{{ __('payroll.payroll_categories') }}</th>
|
||||
<th class="text-center">{{ __('payroll.social_security_number') }}</th>
|
||||
<th class="text-center">{{ __('payroll.tin_number') }}</th>
|
||||
<th class="text-center">{{ __('payroll.salary_scale') }}</th>
|
||||
<th class="text-center">{{ __('payroll.contract_type') }}</th>
|
||||
<th class="text-center">{{ __('payroll.contract_start') }}</th>
|
||||
<th class="text-center">{{ __('payroll.contract_end') }}</th>
|
||||
<th class="text-center">{{ __('payroll.bank') }}</th>
|
||||
<th class="text-center">{{ __('payroll.bank_account_number') }}</th>
|
||||
<th class="text-center">{{ __('payroll.basic_pay') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class='input_fields_body'>
|
||||
@php
|
||||
$option_positions = "";
|
||||
foreach ($positions as $key => $value){
|
||||
$option_positions .= "<option value='$key'>$value</option>";
|
||||
}
|
||||
|
||||
$option_departments = "";
|
||||
foreach ($departments as $key => $value){
|
||||
$option_departments .= "<option value='$key'>$value</option>";
|
||||
}
|
||||
|
||||
$option_contracts = "";
|
||||
foreach ($contracts as $key => $value){
|
||||
$option_contracts .= "<option value='$key'>$value</option>";
|
||||
}
|
||||
|
||||
$option_banks = "";
|
||||
foreach ($banks as $key => $value){
|
||||
$option_banks .= "<option value='$key'>$value</option>";
|
||||
}
|
||||
|
||||
$option_payroll_categories = "";
|
||||
foreach ($payroll_categories as $key => $value){
|
||||
$option_payroll_categories .= "<option value='$key'>$value</option>";
|
||||
}
|
||||
|
||||
$option_salary_scales = "";
|
||||
foreach ($salary_scales as $key => $value){
|
||||
$option_salary_scales .= "<option value='$key'>$value</option>";
|
||||
}
|
||||
@endphp
|
||||
<tr>
|
||||
<td>
|
||||
<select class='patient_full_name form-control' name='patient_id[]' id='patient_full_name_0'></select>
|
||||
</td>
|
||||
<td>
|
||||
<select name='position[]' class='form-control compulsory' required>@php echo $option_positions; @endphp</select>
|
||||
</td>
|
||||
<td>
|
||||
<select name='department[]' class='form-control compulsory' required>@php echo $option_departments; @endphp</select>
|
||||
</td>
|
||||
<td>
|
||||
<select name='payroll_category[]' class='form-control compulsory' required>@php echo $option_payroll_categories; @endphp</select>
|
||||
</td>
|
||||
<td>
|
||||
<input type='text' name='nssf_number[]' class='form-control'>
|
||||
</td>
|
||||
<td>
|
||||
<input type='text' name='tin_number[]' class='form-control'>
|
||||
</td>
|
||||
<td>
|
||||
<select name='salary_scale[]' class='form-control' required>@php echo $option_salary_scales; @endphp</select>
|
||||
</td>
|
||||
<td>
|
||||
<select name='contract[]' class='form-control compulsory' required>@php echo $option_contracts; @endphp</select>
|
||||
</td>
|
||||
<td><input type='text' name='contract_start_date[]' class='form-control start_date' readonly></td>
|
||||
<td><input type='text' name='contract_end_date[]' class='form-control end_date' readonly></td>
|
||||
<td>
|
||||
<select name='payroll_bank_id[]' class='form-control compulsory' required>@php echo $option_banks; @endphp</select>
|
||||
</td>
|
||||
<td>
|
||||
<input type='number' name='bank_account_number[]' class='form-control compulsory' required>
|
||||
</td>
|
||||
<td>
|
||||
<input type='number' name='basic_pay[]' id='basic_pay_0' class='form-control compulsory' required onchange='check_basic_pay(0)'>
|
||||
|
||||
<br><br>
|
||||
<label for='social_security_amount'>{{ __('payroll.social_security_amount') }}</label>
|
||||
<input type='number' name='social_security_amount[]' class='form-control compulsory' required id='social_security_amount_0'>
|
||||
|
||||
<br><br>
|
||||
<label for='tax_amount'>{{ __('payroll.tax_amount') }}</label>
|
||||
<input type='number' name='tax_amount[]' class='form-control compulsory' required id='tax_amount_0'>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<a class="btn btn-success btn-xs" onclick="add_new_row()">{{ __('triage.add_row') }}</a>
|
||||
|
||||
<hr>
|
||||
|
||||
{{ Form::button(__('payroll.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button(__('payroll.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
function check_basic_pay(id) {
|
||||
let data = 'amount=' + $('#basic_pay_' + id).val();
|
||||
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/payroll/calculate_paye",
|
||||
data: data,
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
$('#tax_amount_' + id).val(result);
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/payroll/calculate_nssf",
|
||||
data: data,
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
$('#social_security_amount_' + id).val(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
initialize_dates();
|
||||
generalSelect2Set('patient_full_name_0');
|
||||
|
||||
let max_rows = 20;
|
||||
let wrapper = $(".input_fields_body");
|
||||
let x = 1;
|
||||
|
||||
$(wrapper).on("click", ".remove_field", function (e) {
|
||||
e.preventDefault();
|
||||
$(this).parent('td').parent('tr').remove();
|
||||
x--;
|
||||
});
|
||||
|
||||
function add_new_row() {
|
||||
if (x < max_rows) {
|
||||
$(wrapper).append("<tr>\
|
||||
<td><select class='patient_full_name form-control' name='patient_id[]' id='patient_full_name_" + x + "'></select></td>\
|
||||
<td><select name='position[]' class='form-control compulsory' required>@php echo $option_positions; @endphp</select></td>\
|
||||
<td><select name='department[]' class='form-control compulsory' required>@php echo $option_departments; @endphp</select></td>\
|
||||
<td><select name='payroll_category[]' class='form-control compulsory' required>@php echo $option_payroll_categories; @endphp</select></td>\
|
||||
<td><input type='text' name='nssf_number[]' class='form-control'></td>\
|
||||
<td><input type='text' name='tin_number[]' class='form-control'></td>\
|
||||
<td><select name='salary_scale[]' class='form-control' required>@php echo $option_salary_scales; @endphp</select></td>\
|
||||
<td><select name='contract[]' class='form-control compulsory' required>@php echo $option_contracts; @endphp</select></td>\
|
||||
<td><input type='text' name='contract_start_date[]' class='form-control start_date' readonly></td>\
|
||||
<td><input type='text' name='contract_end_date[]' class='form-control end_date' readonly></td>\
|
||||
<td><select name='payroll_bank_id[]' class='form-control compulsory' required>@php echo $option_banks; @endphp</select></td>\
|
||||
<td><input type='number' name='bank_account_number[]' class='form-control compulsory' required></td>\
|
||||
<td><input type='number' name='basic_pay[]' class='form-control compulsory' id='basic_pay_" + x + "' required onchange='check_basic_pay(" + x + ")'>\
|
||||
<br><br>\
|
||||
<label for='social_security_amount'>Social Security Amount</label>\
|
||||
<input type='number' name='social_security_amount[]' class='form-control compulsory' required id='social_security_amount_" + x + "'>\
|
||||
<br><br>\
|
||||
<label for='tax_amount'>Tax Amount</label>\
|
||||
<input type='number' name='tax_amount[]' class='form-control compulsory' required id='tax_amount_" + x + "'></td>\
|
||||
<td style='width: 1%;'><a class='remove_field btn btn-sm btn-rounded btn-danger' style='color: white;'><i class='fa fa-trash'></i></a></td></tr>");
|
||||
|
||||
generalSelect2Set('patient_full_name_'+x);
|
||||
initialize_dates();
|
||||
|
||||
x++;
|
||||
}
|
||||
}
|
||||
|
||||
function generalSelect2Set(id) {
|
||||
$('#'+id).select2({
|
||||
width: "100%",
|
||||
placeholder: "<?php echo "Patient's Full Name" ?>",
|
||||
ajax: {
|
||||
url: '/patients/search_patient_by_name_number',
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
processResults: function (data) {
|
||||
return {
|
||||
results: $.map(data, function (item) {
|
||||
return {
|
||||
text: item.first_name + " " + item.last_name + " ("+ item.number + ") " + item.phone,
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function initialize_dates() {
|
||||
$('.start_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd/mm/yyyy'
|
||||
});
|
||||
|
||||
$('.end_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd/mm/yyyy'
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
+157
@@ -0,0 +1,157 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">Edit multiple payrolls</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> Finance Home</a></li>
|
||||
<li><a href="{{ route('payroll.index') }}"><i class="fa fa-eye"></i> Payroll</a></li>
|
||||
<li class="active"><i class="fa fa-pencil"></i> Edit multiple payrolls</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
@include ('errors.list')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="white-box">
|
||||
{{ Form::model($payrolls, ['method' => 'ANY', 'route' => ['payroll.bulk_update']]) }}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">{{ __('payroll.staff_member') }}</th>
|
||||
<th class="text-center">{{ __('payroll.position') }}</th>
|
||||
<th class="text-center">{{ __('payroll.department') }}</th>
|
||||
<th class="text-center">{{ __('payroll.payroll_categories') }}</th>
|
||||
<th class="text-center">{{ __('payroll.social_security_number') }}</th>
|
||||
<th class="text-center">{{ __('payroll.tin_number') }}</th>
|
||||
<th class="text-center">{{ __('payroll.salary_scale') }}</th>
|
||||
<th class="text-center">{{ __('payroll.contract_type') }}</th>
|
||||
<th class="text-center">{{ __('payroll.contract_start') }}</th>
|
||||
<th class="text-center">{{ __('payroll.contract_end') }}</th>
|
||||
<th class="text-center">{{ __('payroll.bank') }}</th>
|
||||
<th class="text-center">{{ __('payroll.bank_account_number') }}</th>
|
||||
<th class="text-center">{{ __('payroll.basic_pay') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($payrolls as $payroll)
|
||||
{{ Form::hidden('id[]', $payroll->id) }}
|
||||
<tr>
|
||||
<td>{{ get_full_name($payroll->patient_id, 'id', 'first_name', 'last_name', 'patients') }}</td>
|
||||
<td>
|
||||
{{ Form::select('position[]', $positions, $payroll->position, ['class' => 'form-control compulsory', 'required']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::select('department[]', $departments, $payroll->department, ['class' => 'form-control compulsory', 'required']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::select('payroll_category[]', $payroll_categories, $payroll->payroll_category, ['class' => 'form-control compulsory', 'required']) }}
|
||||
</td>
|
||||
<td>
|
||||
<input type='text' name='nssf_number[]' class='form-control' value='{{ $payroll->nssf_number }}'>
|
||||
</td>
|
||||
<td>
|
||||
<input type='text' name='tin_number[]' class='form-control' value='{{ $payroll->tin_number }}'>
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::select('salary_scale[]', $salary_scales, $payroll->salary_scale, ['class' => 'form-control compulsory', 'required']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::select('contract[]', $contracts, $payroll->contract, ['class' => 'form-control compulsory', 'required']) }}
|
||||
</td>
|
||||
@php
|
||||
$contract_periods = json_decode($payroll->contract_period, true);
|
||||
$contract_periods = end($contract_periods);
|
||||
@endphp
|
||||
<td><input type='text' name='contract_start_date[]' class='form-control start_date' value='{{ date_format(date_create($contract_periods[0]), 'd/m/Y') }}' readonly></td>
|
||||
<td><input type='text' name='contract_end_date[]' class='form-control end_date' value='{{ date_format(date_create($contract_periods[1]), 'd/m/Y') }}' readonly></td>
|
||||
<td>
|
||||
{{ Form::select('payroll_bank_id[]', $banks, $payroll->payroll_bank_id, ['class' => 'form-control compulsory', 'required']) }}
|
||||
</td>
|
||||
<td>
|
||||
<input type='number' name='bank_account_number[]' class='form-control compulsory' value='{{ $payroll->bank_account_number }}' required>
|
||||
</td>
|
||||
<td>
|
||||
<input type='number' name='basic_pay[]' class='form-control compulsory' value='{{ $payroll->basic_pay }}' id='basic_pay_{{ $payroll->id }}' required onchange='check_basic_pay({{ $payroll->id }})'>
|
||||
|
||||
<br><br>
|
||||
<label for='social_security_amount'>{{ __('payroll.social_security_amount') }}</label>
|
||||
<input type='number' name='social_security_amount[]' class='form-control compulsory' value='{{ $payroll->social_security_amount }}' required id='social_security_amount_{{ $payroll->id }}'>
|
||||
|
||||
<br><br>
|
||||
<label for='tax_amount'>{{ __('payroll.tax_amount') }}</label>
|
||||
<input type='number' name='tax_amount[]' class='form-control compulsory' value='{{ $payroll->tax_amount }}' required id='tax_amount_{{ $payroll->id }}'>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
{{ Form::button('Submit',['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10', 'onclick'=>'return confirm("All unselected records will not be edited. Continue?")']) }}
|
||||
{{ Form::button('Cancel',['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
function check_basic_pay(id) {
|
||||
let data = 'amount=' + $('#basic_pay_' + id).val();
|
||||
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/payroll/calculate_paye",
|
||||
data: data,
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
$('#tax_amount_' + id).val(result);
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/payroll/calculate_nssf",
|
||||
data: data,
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
$('#social_security_amount_' + id).val(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('.start_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd/mm/yyyy'
|
||||
});
|
||||
|
||||
$('.end_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd/mm/yyyy'
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+208
@@ -0,0 +1,208 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css"/>
|
||||
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">{{ __('payroll.add_payroll') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('payroll.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('payroll.finance_home') }}</a></li>
|
||||
<li><a href="{{ route('payroll.index') }}"><i class="fa fa-eye"></i> {{ __('payroll.view_payrolls') }}</a></li>
|
||||
<li class="active"><i class="fa fa-plus"></i> {{ __('payroll.add_payroll') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('payroll::payroll.menu')
|
||||
|
||||
<div class="white-box">
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
|
||||
{{ Form::open(['route' => 'payroll.store', 'data-toggle' => 'validator']) }}
|
||||
|
||||
{{ Form::hidden('patient_id', 0, ['id' => 'patient_id']) }}
|
||||
|
||||
<h3>{{ __('payroll.personal_information') }}</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<select class="patient_full_name form-control" style="width:100%;" name="patient_full_name" id="patient_full_name"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 text-left" id="patient_info" style="display: none;"></div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>{{ __('payroll.payroll_information') }}</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('nssf_number',__('payroll.social_security_number')) }}
|
||||
{{ Form::text('nssf_number','',['class' => 'form-control']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('tin_number',__('payroll.tin_number')) }}
|
||||
{{ Form::text('tin_number','',['class' => 'form-control']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('salary_scale',__('payroll.salary_scale')) }}
|
||||
{{ Form::select('salary_scale',$salary_scales,'',['class' => 'form-control']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('contract',__('payroll.contract_type')) }}
|
||||
{{ Form::select('contract',['- select -', 1 => 'Permanent', 2 => 'Probation', 3 => 'Contract'],'',['class' => 'form-control']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('contract_start_date', __('payroll.contract_start')) }}
|
||||
{{ Form::text('contract_start_date','',['class' => 'form-control','readonly','id'=>'contract_start_date']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('contract_end_date', __('payroll.contract_end')) }}
|
||||
{{ Form::text('contract_end_date','',['class' => 'form-control','readonly','id'=>'contract_end_date']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('payroll_bank_id',__('payroll.bank')) }}
|
||||
{{ Form::select('payroll_bank_id',$banks,'',['class' => 'form-control compulsory','required']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('bank_account_number',__('payroll.bank_account_number')) }}
|
||||
{{ Form::number('bank_account_number','',['class' => 'form-control compulsory', 'required']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('basic_pay',__('payroll.basic_pay')) }}
|
||||
{{ Form::number('basic_pay','',['class' => 'form-control compulsory', 'required', 'id' => 'basic_pay']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('social_security_amount',__('payroll.social_security_amount')) }}
|
||||
{{ Form::number('social_security_amount',0,['class' => 'form-control', 'id' => 'social_security_amount']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('tax_amount',__('payroll.tax_amount')) }}
|
||||
{{ Form::number('tax_amount',0,['class' => 'form-control', 'id' => 'tax_amount']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('position',__('payroll.position')) }}
|
||||
{{ Form::select('position',$positions,'',['class' => 'form-control compulsory','required']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('department',__('payroll.department')) }}
|
||||
{{ Form::select('department',$departments,'',['class' => 'form-control compulsory','required']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('payroll_category',__('payroll.payroll_categories')) }}
|
||||
{{ Form::select('payroll_category',$payroll_categories,'',['class' => 'form-control compulsory','required']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::button(__('payroll.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button(__('payroll.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('#basic_pay').change(function() {
|
||||
let data = 'amount=' + $(this).val();
|
||||
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/payroll/calculate_paye",
|
||||
data: data,
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
$('#tax_amount').val(result);
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/payroll/calculate_nssf",
|
||||
data: data,
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
$('#social_security_amount').val(result);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#contract_start_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd/mm/yyyy'
|
||||
});
|
||||
|
||||
$('#contract_end_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd/mm/yyyy'
|
||||
});
|
||||
|
||||
$('.patient_full_name').change(function() {
|
||||
let id = $('#patient_full_name').val();
|
||||
$('#patient_id').val(id);
|
||||
|
||||
$.ajax({
|
||||
method: 'GET',
|
||||
url: "/patients/update_patient_info/" + id,
|
||||
success: function(response){
|
||||
$('#patient_info').html(response).show();
|
||||
},
|
||||
error: function (error) {
|
||||
console.log(error);
|
||||
}
|
||||
});
|
||||
}).select2({
|
||||
placeholder: "<?php echo "Patient's Full Name" ?>",
|
||||
ajax: {
|
||||
url: '/patients/search_patient_by_name_number',
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
processResults: function (data) {
|
||||
return {
|
||||
results: $.map(data, function (item) {
|
||||
return {
|
||||
text: item.first_name + " " + item.last_name + " ("+ item.number + ") " + item.phone,
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
$('.select').select2();
|
||||
</script>
|
||||
@endpush
|
||||
+294
@@ -0,0 +1,294 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
|
||||
<style>
|
||||
th, td { white-space: nowrap; }
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">Create multiple payrolls</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> Finance Home</a></li>
|
||||
<li><a href="{{ route('payroll.index') }}"><i class="fa fa-eye"></i> Payroll</a></li>
|
||||
<li class="active"><i class="fa fa-plus"></i> Create multiple payrolls</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
|
||||
<div class="white-box">
|
||||
<div class="row">
|
||||
<div class="col-sm-3"></div>
|
||||
<div class="col-sm-6">
|
||||
<h4>Filter members by bank</h4>
|
||||
{{ Form::open(['route' => 'payroll.create_bulk_payment']) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('bank_id', 'Bank') }}
|
||||
{{ Form::select('bank_id', $banks, '', ['class' => 'form-control']) }}
|
||||
</div>
|
||||
|
||||
{{ Form::button('Submit',['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="white-box">
|
||||
{{ Form::open(['route' => ['payroll.store_bulk_payment']]) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('year','Payment Year') }}
|
||||
{{ Form::select('year',$years,'',['class' => 'form-control compulsory', 'required', 'id' => 'year']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('month','Payment Month') }}
|
||||
{{ Form::select('month',$months,'',['class' => 'form-control compulsory', 'required', 'id' => 'month']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Member Name</th>
|
||||
<th>Member Position</th>
|
||||
<th>Member Department</th>
|
||||
<th>Deductions</th>
|
||||
<th>NSSF Payment</th>
|
||||
<th>PAYE Payment</th>
|
||||
<th>Basic Pay</th>
|
||||
<th>Allowances</th>
|
||||
<th>Total Pay</th>
|
||||
<th>Total Deductions</th>
|
||||
<th>Net Pay</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
// for the counter
|
||||
$i = 0;
|
||||
@endphp
|
||||
@foreach($payrolls as $payroll)
|
||||
<tr>
|
||||
<td>
|
||||
{{ Form::checkbox('index[]', $i, null, ['class' => 'edit_id']) }}
|
||||
{{ Form::hidden('member_id[]', $payroll->id, ['id' => 'member_id_' . $i]) }}
|
||||
{{ Form::hidden('bank_id[]', $payroll->payroll_bank_id) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $payroll->first_name }} {{ $payroll->last_name }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $positions[$payroll->position] }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $departments[$payroll->department] }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('deductions[]','',['class' => 'form-control compulsory deduction_changes_' . $i, 'required', 'readonly', 'id' => 'deductions_' . $i]) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('nssf_payment[]','',['class' => 'form-control compulsory deduction_changes_' . $i, 'required', 'readonly', 'id' => 'nssf_payment_' . $i]) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('paye_payment[]','',['class' => 'form-control compulsory deduction_changes_' . $i, 'required', 'readonly', 'id' => 'paye_payment_' . $i]) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('basic_pay[]',$payroll->basic_pay,['class' => 'form-control compulsory allowance_changes_' . $i, 'required', 'readonly', 'id' => 'basic_pay_' . $i]) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('advances[]','',['class' => 'form-control compulsory allowance_changes_' . $i, 'required', 'readonly', 'id' => 'advances_' . $i]) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('gross_pay[]','',['class' => 'form-control compulsory', 'required', 'readonly', 'id' => 'gross_pay_' . $i]) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('total_deductions[]','',['class' => 'form-control compulsory', 'required', 'readonly', 'id' => 'total_deductions_' . $i]) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('net_pay[]','',['class' => 'form-control compulsory', 'required', 'readonly', 'id' => 'net_pay_' . $i]) }}
|
||||
</td>
|
||||
</tr>
|
||||
@php
|
||||
// increment counter
|
||||
$i++;
|
||||
@endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
{{ Form::button('Submit',['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10', 'onclick'=>'return confirm("Please make sure all compulsory fields in red have been filled or the record(s) will be disregarded")']) }}
|
||||
{{ Form::button('Cancel',['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/js/validator.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
<script>
|
||||
$('.table').DataTable();
|
||||
|
||||
$(document).ready(function(){
|
||||
let month = '';
|
||||
let year = '';
|
||||
|
||||
$("#year").change(function(){
|
||||
year = this.value;
|
||||
checkAllowancesOrDeductions();
|
||||
});
|
||||
|
||||
$("#month").change(function(){
|
||||
month = this.value;
|
||||
checkAllowancesOrDeductions();
|
||||
});
|
||||
|
||||
function checkAllowancesOrDeductions(){
|
||||
if (month !== '' || year !== '') {
|
||||
// loop through all to get id's for the
|
||||
$('.edit_id').each(function(){
|
||||
let id = this.value;
|
||||
let member_id = $('#member_id_' + id).val();
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/payroll/get_allowance_or_deductions",
|
||||
data: {month: month, year: year, member_id: member_id},
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
let split_result = result.split(",");
|
||||
alert(id);
|
||||
$('#deductions_' + id).val(split_result[1]);
|
||||
$('#advances_' + id).val(split_result[0]);
|
||||
calculateDeductions(id);
|
||||
calculateAllowances(id);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// loop through all to get id's for the
|
||||
$('.edit_id').each(function(){
|
||||
let id = this.value;
|
||||
|
||||
// get the basic pay
|
||||
let amount = $('#basic_pay_' + id).val();
|
||||
|
||||
// calculate paye and nssf then get totals
|
||||
calculatePaye(amount, id);
|
||||
calculateNssf(amount, id);
|
||||
calculateAllowances(id);
|
||||
});
|
||||
|
||||
// calculate the total PAYE value
|
||||
function calculatePaye(amount, id) {
|
||||
let data = 'amount=' + amount;
|
||||
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/payroll/calculate_paye",
|
||||
data: data,
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
// set the paye in the text box
|
||||
$('#paye_payment_' + id).val(result);
|
||||
calculateDeductions(id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// calculate the total NSSF value
|
||||
function calculateNssf(amount, id){
|
||||
let data = 'amount=' + amount;
|
||||
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/payroll/calculate_nssf",
|
||||
data: data,
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
// set the nssf in the text box
|
||||
$('#nssf_payment_' + id).val(result);
|
||||
calculateDeductions(id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// calculate the total deductions value
|
||||
function calculateDeductions(id) {
|
||||
// loop through all with class of deduction_changes adding the totals
|
||||
let amount = 0;
|
||||
|
||||
$('.deduction_changes_' + id).each(function(){
|
||||
amount += +this.value;
|
||||
});
|
||||
|
||||
$('#total_deductions_' + id).val(amount);
|
||||
|
||||
// calculate total pay
|
||||
calculateNetpay(id);
|
||||
}
|
||||
|
||||
// calculate the total allowances value
|
||||
function calculateAllowances(id) {
|
||||
// loop through all with class of allowance_changes adding the totals
|
||||
let amount = 0;
|
||||
|
||||
$('.allowance_changes_' + id).each(function(){
|
||||
amount += +this.value;
|
||||
});
|
||||
|
||||
$('#gross_pay_' + id).val(amount);
|
||||
|
||||
// calculate total pay
|
||||
calculateNetpay(id);
|
||||
}
|
||||
|
||||
// calculate total amount to pay staff
|
||||
function calculateNetpay(id) {
|
||||
// get the gross pay
|
||||
let gross_pay = $('#gross_pay_' + id).val();
|
||||
|
||||
// get the deductions pay
|
||||
let total_deductions = $('#total_deductions_' + id).val();
|
||||
|
||||
let net_pay = +gross_pay - +total_deductions;
|
||||
|
||||
$('#net_pay_' + id).val(net_pay);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@@ -0,0 +1,177 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css"/>
|
||||
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">{{ __('payroll.edit_employee') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('payroll.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('payroll.finance_home') }}</a></li>
|
||||
<li><a href="{{ route('payroll.index') }}"><i class="fa fa-eye"></i> {{ __('payroll.view_payrolls') }}</a></li>
|
||||
<li class="active"><i class="fa fa-plus"></i> {{ __('payroll.edit') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('payroll::payroll.menu')
|
||||
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
|
||||
{{ Form::model($payroll, ['method' => 'PUT', 'route' => ['payroll.update',$payroll], 'data-toggle' => 'validator']) }}
|
||||
@php $patient = \Illuminate\Support\Facades\DB::table('patients')->where('id', $payroll->patient_id)->first(); @endphp
|
||||
|
||||
<h3>{{ __('payroll.personal_information') }}</h3>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th><b>{{ __('payroll.staff_member') }}</b></th>
|
||||
<td>{{ $patient->first_name }} {{ $patient->last_name }}</td>
|
||||
<th><b>{{ __('payroll.staff_patient_number') }}</b></th>
|
||||
<td>{{ $patient->number }}</td>
|
||||
<th><b>{{ __('payroll.staff_contact') }}</b></th>
|
||||
<td>{{ $patient->phone }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>{{ __('payroll.payroll_information') }}</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('nssf_number',__('payroll.social_security_number')) }}
|
||||
{{ Form::text('nssf_number',$payroll->nssf_number,['class' => 'form-control']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('tin_number',__('payroll.tin_number')) }}
|
||||
{{ Form::text('tin_number',$payroll->tin_number,['class' => 'form-control']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('salary_scale',__('payroll.salary_scale')) }}
|
||||
{{ Form::select('salary_scale',$salary_scales,$payroll->salary_scale,['class' => 'form-control']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('contract',__('payroll.contract_type')) }}
|
||||
{{ Form::select('contract',['- select -', 1 => 'Permanent', 2 => 'Probation', 3 => 'Contract'],$payroll->contract,['class' => 'form-control']) }}
|
||||
</div>
|
||||
|
||||
@php
|
||||
$contract_periods = json_decode($payroll->contract_period, true);
|
||||
$contract_periods = end($contract_periods);
|
||||
@endphp
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('contract_start_date', __('payroll.contract_start')) }}
|
||||
{{ Form::text('contract_start_date',date_format(date_create($contract_periods[0]), 'd/m/Y'),['class' => 'form-control','readonly','id'=>'contract_start_date']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('contract_end_date', __('payroll.contract_end')) }}
|
||||
{{ Form::text('contract_end_date',date_format(date_create($contract_periods[1]), 'd/m/Y'),['class' => 'form-control','readonly','id'=>'contract_end_date']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('payroll_bank_id',__('payroll.bank')) }}
|
||||
{{ Form::select('payroll_bank_id',$banks,$payroll->payroll_bank_id,['class' => 'form-control compulsory','required']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('bank_account_number',__('payroll.bank_account_number')) }}
|
||||
{{ Form::number('bank_account_number',$payroll->bank_account_number,['class' => 'form-control compulsory', 'required']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('basic_pay',__('payroll.basic_pay')) }}
|
||||
{{ Form::number('basic_pay',$payroll->basic_pay,['class' => 'form-control compulsory', 'required', 'id' => 'basic_pay']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('social_security_amount',__('payroll.social_security_amount')) }}
|
||||
{{ Form::number('social_security_amount',$payroll->social_security_amount,['class' => 'form-control', 'id' => 'social_security_amount']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('tax_amount',__('payroll.tax_amount')) }}
|
||||
{{ Form::number('tax_amount',$payroll->tax_amount,['class' => 'form-control', 'id' => 'tax_amount']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('position',__('payroll.position')) }}
|
||||
{{ Form::select('position',$positions,$payroll->position,['class' => 'form-control compulsory','required']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('department',__('payroll.department')) }}
|
||||
{{ Form::select('department',$departments,$payroll->department,['class' => 'form-control compulsory','required']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('payroll_category',__('payroll.payroll_categories')) }}
|
||||
{{ Form::select('payroll_category',$payroll_categories,$payroll->payroll_category,['class' => 'form-control compulsory','required']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::button('Submit',['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button('Cancel',['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('#basic_pay').change(function() {
|
||||
let data = 'amount=' + $(this).val();
|
||||
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/payroll/calculate_paye",
|
||||
data: data,
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
$('#tax_amount').val(result);
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/payroll/calculate_nssf",
|
||||
data: data,
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
$('#social_security_amount').val(result);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#contract_start_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd/mm/yyyy'
|
||||
});
|
||||
|
||||
$('#contract_end_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd/mm/yyyy'
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+239
@@ -0,0 +1,239 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/icheck/skins/all.css') }}" rel="stylesheet">
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">Edit Payslip</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> Finance Home</a></li>
|
||||
<li><a href="{{ route('payroll.index') }}"><i class="fa fa-eye"></i> Payroll</a></li>
|
||||
<li class="active"><i class="fa fa-pencil"></i> Edit Payslip</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
|
||||
{{ Form::open(['route' => 'payroll.update_payslip', 'data-toggle' => 'validator']) }}
|
||||
|
||||
{{ Form::hidden('id', $payslip->id) }}
|
||||
|
||||
<h3>Staff Member Information</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<table class="table table-striped table-bordered">
|
||||
<tr>
|
||||
<th>Member Name</th>
|
||||
<td>{{ $member->first_name }} {{ $member->last_name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Member Contact</th>
|
||||
<td>{{ $member->contact }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<table class="table table-striped table-bordered">
|
||||
<tr>
|
||||
<th>Member Position</th>
|
||||
<td>{{ $positions[$member->position] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Member Department</th>
|
||||
<td>{{ $departments[$member->department] }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Salary and allowances</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('year','Payment Year') }}
|
||||
{{ Form::select('year',$years,$payslip->year,['class' => 'form-control compulsory','required', 'id' => 'year']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('basic_pay','Basic Pay') }}
|
||||
{{ Form::number('basic_pay',$payslip->basic_pay,['class' => 'form-control compulsory allowance_changes', 'required', 'readonly', 'id' => 'basic_pay']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('allowances','Allowances') }}
|
||||
{{ Form::number('allowances','0',['class' => 'form-control', 'id' => 'allowances', 'readonly']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('month','Payment Month') }}
|
||||
{{ Form::select('month',$months,$payslip->month,['class' => 'form-control compulsory','required', 'id' => 'month']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('gross_pay','Gross Pay') }}
|
||||
{{ Form::number('gross_pay',$payslip->gross_pay,['class' => 'form-control compulsory', 'required', 'readonly', 'id' => 'gross_pay']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Deductions</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('nssf_payment','NSSF') }}
|
||||
{{ Form::number('nssf_payment',$payslip->nssf_payment,['class' => 'form-control compulsory deduction_changes', 'required', 'readonly', 'id' => 'nssf_payment']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('deductions','Deductions') }}
|
||||
{{ Form::number('deductions','0',['class' => 'form-control deduction_changes', 'id' => 'deductions', 'readonly']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('paye_payment','PAYE') }}
|
||||
{{ Form::number('paye_payment',$payslip->paye_payment,['class' => 'form-control compulsory deduction_changes', 'required', 'readonly', 'id' => 'paye_payment']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('total_deductions','Total Deductions') }}
|
||||
{{ Form::number('total_deductions',$payslip->total_deductions,['class' => 'form-control compulsory', 'required', 'readonly', 'id' => 'total_deductions']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Totals</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3"></div>
|
||||
<div class="col-sm-6">
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('net_pay','Net Pay') }}
|
||||
{{ Form::number('net_pay',$payslip->net_pay,['class' => 'form-control compulsory', 'required', 'readonly', 'id' => 'net_pay']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
|
||||
{{ Form::button('Submit',['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button('Cancel',['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/js/validator.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('elite/bower_components/icheck/icheck.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/icheck/icheck.init.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('elite/js/mask.js') }}"></script>
|
||||
|
||||
<script>
|
||||
let month = '';
|
||||
let year = '';
|
||||
let member_id = <?php echo $member->id; ?>;
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
// check if any value in the allowance section has been changed
|
||||
$(".allowance_changes").change(function(){
|
||||
// call the function which changes allowance total
|
||||
calculateAllowances();
|
||||
});
|
||||
|
||||
$("#year").change(function(){
|
||||
year = this.value;
|
||||
checkAllowancesOrDeductions();
|
||||
});
|
||||
|
||||
$("#month").change(function(){
|
||||
month = this.value;
|
||||
checkAllowancesOrDeductions();
|
||||
});
|
||||
|
||||
// check if any value in the deductions section has been changed
|
||||
$(".deduction_changes").change(function(){
|
||||
// call the function which changes deductions total
|
||||
calculateDeductions();
|
||||
});
|
||||
});
|
||||
|
||||
function checkAllowancesOrDeductions(){
|
||||
if (month !== '' || year !== '') {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/payroll/get_allowance_or_deductions",
|
||||
data: {month: month, year: year, member_id: member_id},
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
let split_result = result.split(",");
|
||||
$('#deductions').val(split_result[1]);
|
||||
$('#allowances').val(split_result[0]);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// calculate the total deductions value
|
||||
function calculateDeductions() {
|
||||
// loop through all with class of deduction_changes adding the totals
|
||||
let amount = 0;
|
||||
|
||||
$('.deduction_changes').each(function(){
|
||||
amount += +this.value;
|
||||
});
|
||||
|
||||
$('#total_deductions').val(amount);
|
||||
|
||||
// calculate total pay
|
||||
calculateNetpay();
|
||||
}
|
||||
|
||||
// calculate the total allowances value
|
||||
function calculateAllowances() {
|
||||
// loop through all with class of allowance_changes adding the totals
|
||||
let amount = 0;
|
||||
|
||||
$('.allowance_changes').each(function(){
|
||||
amount += +this.value;
|
||||
});
|
||||
|
||||
$('#gross_pay').val(amount);
|
||||
|
||||
// calculate total pay
|
||||
calculateNetpay();
|
||||
}
|
||||
|
||||
// calculate total amount to pay staff
|
||||
function calculateNetpay() {
|
||||
// get the gross pay
|
||||
let gross_pay = $('#gross_pay').val();
|
||||
|
||||
// get the deductions pay
|
||||
let total_deductions = $('#total_deductions').val();
|
||||
|
||||
let net_pay = +gross_pay - +total_deductions;
|
||||
|
||||
$('#net_pay').val(net_pay);
|
||||
}
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">{{ __('payroll.staff_members') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('payroll.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('payroll.finance_home') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> {{ __('payroll.view_payrolls') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('payroll::payroll.menu')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="white-box">
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('payroll.staff_member') }}</th>
|
||||
<th>{{ __('payroll.position') }}</th>
|
||||
<th>{{ __('payroll.department') }}</th>
|
||||
<th>{{ __('payroll.contract') }}</th>
|
||||
<th>{{ __('payroll.bank') }}</th>
|
||||
<th>{{ __('payroll.basic_pay') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($payrolls as $payroll)
|
||||
<tr>
|
||||
<td>{{ $payroll->first_name }} {{ $payroll->last_name }}</td>
|
||||
<td>{{ $positions[$payroll->position] }}</td>
|
||||
<td>{{ $departments[$payroll->department] }}</td>
|
||||
<td>{{ $payroll->contract }}</td>
|
||||
<td>{{ $banks[$payroll->payroll_bank_id] }}</td>
|
||||
<td>{{ ugandan_shillings($payroll->basic_pay) }}</td>
|
||||
<td>
|
||||
{{ Form::model($payroll->id ,['method' => 'POST', 'route' => ['payroll.activate', $payroll->id]]) }}
|
||||
<button type="submit" class="btn btn-warning" onclick="return confirm('Are you sure?')"><i class="fa fa-check"></i> Activate</button>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.flash.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/pdfmake.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/vfs_fonts.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.html5.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.print.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
'csv', 'excel', 'pdf', 'print'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">Inactive Payslips</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> Finance Home</a></li>
|
||||
<li><a href="{{ route('payroll.index') }}"><i class="fa fa-eye"></i> Payroll</a></li>
|
||||
<li class="active"><i class="fa fa-trash"></i> Inactive Payslips</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
<p class="text-muted m-b-30">Export data to CSV, Excel, PDF & Print</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Staff Member</th>
|
||||
<th>Payment Period</th>
|
||||
<th>Headship</th>
|
||||
<th>Calls</th>
|
||||
<th>Other</th>
|
||||
<th>Staff Society</th>
|
||||
<th>School Fees</th>
|
||||
<th>Other Debts</th>
|
||||
<th>Advances</th>
|
||||
<th>Vehicle Hire</th>
|
||||
<th>Patient Debts</th>
|
||||
<th>PAYE</th>
|
||||
<th>NSSF</th>
|
||||
<th>Basic Pay</th>
|
||||
<th>Gross Pay</th>
|
||||
<th>Total Deductions</th>
|
||||
<th>Net Pay</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($payments as $payment)
|
||||
<tr>
|
||||
<td>{{ $member_details_first_name[$payment->member_id] }} {{ $member_details_last_name[$payment->member_id] }}</td>
|
||||
<td>{{ $payment->month }}, {{ $payment->year }}</td>
|
||||
<td>{{ ugandan_shillings($payment->headship) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->calls) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->other) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->staff_society) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->school_fees) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->other_debts) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->advances) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->vehicle_hire) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->patient_debts) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->paye_payment) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->nssf_payment) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->basic_pay) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->gross_pay) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->total_deductions) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->net_pay) }}</td>
|
||||
<td>
|
||||
{{ Form::model($payment->id ,['method' => 'POST', 'route' => ['payroll.activate_payslip', $payment->id]]) }}
|
||||
<button type="submit" class="btn btn-warning" onclick="return confirm('Are you sure?')"><i class="fa fa-check"></i> Activate</button>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.flash.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/pdfmake.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/vfs_fonts.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.html5.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.print.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
'csv', 'excel', 'pdf', 'print'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@@ -0,0 +1,207 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">{{ __('payroll.staff_members') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('payroll.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('payroll.finance_home') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> {{ __('payroll.view_payrolls') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('payroll::payroll.menu')
|
||||
|
||||
<div class="white-box">
|
||||
{{ Form::open(['route' => 'payroll.index_search', 'data-toggle' => 'validator']) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
{{ Form::label('payroll_category', __('payroll.payroll_category')) }}
|
||||
{{ Form::select('payroll_category', $payroll_categories, '', ['class' => 'form-control']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
{{ Form::label('contract_type', __('payroll.contract')) }}
|
||||
{{ Form::select('contract_type', $contract_types, '', ['class' => 'form-control']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
{{ Form::label('payroll_scale', __('payroll.salary_scale')) }}
|
||||
{{ Form::select('payroll_scale', $salary_scales, '', ['class' => 'form-control']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
{{ Form::label('department', __('payroll.department')) }}
|
||||
{{ Form::select('department', $departments, '', ['class' => 'form-control']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group" style="margin-top: 25px;">
|
||||
{{ Form::submit(__('investigations.search'), ['class'=>'btn btn-success pull-right']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
<a href="#" class="nav-item btn btn-warning ti-pencil" onclick="select_for_edit()"> {{ __('payroll.edit_multiple_employees') }}</a>
|
||||
|
||||
<hr>
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
@if($criteria !== '')
|
||||
<p>Search criteria : <code>{{ $criteria }}</code></p>
|
||||
@endif
|
||||
|
||||
{{ Form::open(['route' => 'payroll.edit.bulk_edit', 'data-toggle' => 'validator']) }}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="show_edits" style="display: none"></th>
|
||||
<th>{{ __('payroll.staff_member') }}</th>
|
||||
<th>{{ __('payroll.position') }}</th>
|
||||
<th>{{ __('payroll.department') }}</th>
|
||||
<th>{{ __('payroll.payroll_category') }}</th>
|
||||
<th>{{ __('payroll.contract') }}</th>
|
||||
<th>{{ __('payroll.contract_period') }}</th>
|
||||
<th>{{ __('payroll.salary_scale') }}</th>
|
||||
<th>{{ __('payroll.bank') }}</th>
|
||||
<th>{{ __('payroll.basic_pay') }}</th>
|
||||
<th class="hide_edits"></th>
|
||||
<th class="hide_edits"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $total_basic_pay = 0; @endphp
|
||||
@foreach($payrolls as $payroll)
|
||||
@php
|
||||
$contract_periods = json_decode($payroll->contract_period, true);
|
||||
$contract_periods = end($contract_periods);
|
||||
$total_basic_pay += $payroll->basic_pay;
|
||||
@endphp
|
||||
<tr>
|
||||
<td class="show_edits" style="display: none"><input type="checkbox" name="ids_to_edit[]" value="{{ $payroll->id }}"></td>
|
||||
<td>{{ $payroll->first_name . ' ' . $payroll->last_name }} ({{ $payroll->number . ' / ' . $payroll->phone }})</td>
|
||||
<td>{{ $positions[$payroll->position] }}</td>
|
||||
<td>{{ $departments[$payroll->department] }}</td>
|
||||
<td>{{ $payroll_categories[$payroll->department] }}</td>
|
||||
<td>{{ $contract_types[$payroll->contract] ?? 'N/A' }}</td>
|
||||
<td>
|
||||
@if(\Carbon\Carbon::yesterday() > \Carbon\Carbon::parse($contract_periods[1]))
|
||||
<span style="color: red">{{ streamline_date($contract_periods[0]) }} to {{ streamline_date($contract_periods[1]) }}</span>
|
||||
@elseif(\Carbon\Carbon::today()->addMonths(3) > \Carbon\Carbon::parse($contract_periods[1]))
|
||||
<span style="color: darkorange">{{ streamline_date($contract_periods[0]) }} to {{ streamline_date($contract_periods[1]) }}</span>
|
||||
@else
|
||||
<span style="color: darkgreen">{{ streamline_date($contract_periods[0]) }} to {{ streamline_date($contract_periods[1]) }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $salary_scales[$payroll->salary_scale] }}</td>
|
||||
<td>{{ $banks[$payroll->payroll_bank_id] }}</td>
|
||||
<td>{{ ugandan_shillings($payroll->basic_pay) }}</td>
|
||||
<td class="hide_edits">
|
||||
<a href="/payroll/view_payroll_member_details{{ $payroll->id }}" class="btn btn-info btn-sm">{{ __('payroll.view_details') }}</a>
|
||||
</td>
|
||||
<td class="hide_edits">
|
||||
<a href="/payroll/deactivate{{ $payroll->id }}" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure?')">{{ __('payroll.delete_member') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td><b>Total Basic Pay</b></td>
|
||||
<td>{{ ugandan_shillings($total_basic_pay) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="show_edits btn btn-success btn-sm" type="submit" style="display: none">Submit For Edits</button>
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.flash.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/pdfmake.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/vfs_fonts.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.html5.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.print.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
pageLength: 100,
|
||||
buttons: [{
|
||||
extend: 'copy',
|
||||
exportOptions: {
|
||||
columns: [0, 1, 2, 3, 4, 5, 6, 7]
|
||||
},
|
||||
title: 'Payroll Employees'
|
||||
},
|
||||
{
|
||||
extend: 'csv',
|
||||
exportOptions: {
|
||||
columns: [0, 1, 2, 3, 4, 5, 6, 7]
|
||||
},
|
||||
title: 'Payroll Employees'
|
||||
},
|
||||
{
|
||||
extend: 'pdf',
|
||||
exportOptions: {
|
||||
columns: [0, 1, 2, 3, 4, 5, 6, 7]
|
||||
},
|
||||
title: 'Payroll Employees'
|
||||
},
|
||||
{
|
||||
extend: 'print',
|
||||
exportOptions: {
|
||||
columns: [0, 1, 2, 3, 4, 5, 6, 7]
|
||||
},
|
||||
title: 'Payroll Employees'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
function select_for_edit() {
|
||||
$('.show_edits').show();
|
||||
$('.hide_edits').hide();
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
+290
@@ -0,0 +1,290 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/icheck/skins/all.css') }}" rel="stylesheet">
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">Add Payroll</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> Finance Home</a></li>
|
||||
<li><a href="{{ route('payroll.index') }}"><i class="fa fa-eye"></i> Payroll</a></li>
|
||||
<li class="active"><i class="fa fa-plus"></i> Create</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
|
||||
{{ Form::open(['route' => 'payroll.save_payment', 'data-toggle' => 'validator']) }}
|
||||
|
||||
{{ Form::hidden('member_id', $id, ['id' => 'member_id']) }}
|
||||
|
||||
<h3>Staff Member Information</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<table class="table table-striped table-bordered">
|
||||
<tr>
|
||||
<th>Member Name</th>
|
||||
<td>{{ $member->first_name }} {{ $member->last_name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Member Contact</th>
|
||||
<td>{{ $member->phone }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Member Bank</th>
|
||||
{{ Form::hidden('bank_id', $member->payroll_bank_id) }}
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<table class="table table-striped table-bordered">
|
||||
<tr>
|
||||
<th>Member Position</th>
|
||||
<td>{{ $positions[$member->position] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Member Department</th>
|
||||
<td>{{ $departments[$member->department] }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Salary and allowances</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('year','Payment Year') }}
|
||||
{{ Form::select('year',$years,'',['class' => 'form-control compulsory','required', 'id' => 'year']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('basic_pay','Basic Pay') }}
|
||||
{{ Form::number('basic_pay',$basic_pay,['class' => 'form-control compulsory allowance_changes', 'required', 'readonly', 'id' => 'basic_pay']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('allowances','Allowances') }}
|
||||
{{ Form::number('allowances','0',['class' => 'form-control allowance_changes', 'id' => 'allowances', 'readonly']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('month','Payment Month') }}
|
||||
{{ Form::select('month',$months,'',['class' => 'form-control compulsory','required', 'id' => 'month']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('gross_pay','Gross Pay') }}
|
||||
{{ Form::number('gross_pay','',['class' => 'form-control compulsory', 'required', 'readonly', 'id' => 'gross_pay']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Deductions</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('nssf_payment','NSSF') }}
|
||||
{{ Form::number('nssf_payment','',['class' => 'form-control compulsory deduction_changes', 'required', 'readonly', 'id' => 'nssf_payment']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('deductions','Deductions') }}
|
||||
{{ Form::number('deductions','0',['class' => 'form-control deduction_changes', 'id' => 'deductions', 'readonly']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('paye_payment','PAYE') }}
|
||||
{{ Form::number('paye_payment','',['class' => 'form-control compulsory deduction_changes', 'required', 'readonly', 'id' => 'paye_payment']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('total_deductions','Total Deductions') }}
|
||||
{{ Form::number('total_deductions','',['class' => 'form-control compulsory', 'required', 'readonly', 'id' => 'total_deductions']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Totals</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3"></div>
|
||||
<div class="col-sm-6">
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('net_pay','Net Pay') }}
|
||||
{{ Form::number('net_pay','',['class' => 'form-control compulsory', 'required', 'readonly', 'id' => 'net_pay']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
|
||||
{{ Form::button('Submit',['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button('Cancel',['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/js/validator.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('elite/bower_components/icheck/icheck.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/icheck/icheck.init.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('elite/js/mask.js') }}"></script>
|
||||
|
||||
<script>
|
||||
let month = '';
|
||||
let year = '';
|
||||
let member_id = <?php echo $id; ?>;
|
||||
|
||||
$(document).ready(function () {
|
||||
// when page has finished loading, set the initial values
|
||||
setInitialValues();
|
||||
|
||||
// check if any value in the allowance section has been changed
|
||||
$(".allowance_changes").change(function(){
|
||||
// call the function which changes allowance total
|
||||
calculateAllowances();
|
||||
});
|
||||
|
||||
$("#year").change(function(){
|
||||
year = this.value;
|
||||
checkAllowancesOrDeductions();
|
||||
});
|
||||
|
||||
$("#month").change(function(){
|
||||
month = this.value;
|
||||
checkAllowancesOrDeductions();
|
||||
});
|
||||
|
||||
// check if any value in the deductions section has been changed
|
||||
$(".deduction_changes").change(function(){
|
||||
// call the function which changes deductions total
|
||||
calculateDeductions();
|
||||
});
|
||||
});
|
||||
|
||||
function checkAllowancesOrDeductions(){
|
||||
if (month !== '' || year !== '') {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/payroll/get_allowance_or_deductions",
|
||||
data: {month: month, year: year, member_id: member_id},
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
let split_result = result.split(",");
|
||||
$('#deductions').val(split_result[1]);
|
||||
$('#allowances').val(split_result[0]);
|
||||
calculateDeductions();
|
||||
calculateAllowances();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// set the initial values for the form
|
||||
function setInitialValues() {
|
||||
// get the basic pay
|
||||
let amount = $('#basic_pay').val();
|
||||
|
||||
// calculate paye and nssf then get totals
|
||||
calculateNssf(amount);
|
||||
calculateAllowances();
|
||||
}
|
||||
|
||||
// calculate the total NSSF value
|
||||
function calculateNssf(amount){
|
||||
let data = 'amount=' + amount;
|
||||
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/payroll/calculate_nssf",
|
||||
data: data,
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
// set the nssf in the text box
|
||||
$('#nssf_payment').val(result);
|
||||
calculatePaye(amount - result);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// calculate the total PAYE value
|
||||
function calculatePaye(amount) {
|
||||
let data = 'amount=' + amount;
|
||||
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/payroll/calculate_paye",
|
||||
data: data,
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
// set the paye in the text box
|
||||
$('#paye_payment').val(result);
|
||||
calculateDeductions();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// calculate the total deductions value
|
||||
function calculateDeductions() {
|
||||
// loop through all with class of deduction_changes adding the totals
|
||||
let amount = 0;
|
||||
|
||||
$('.deduction_changes').each(function(){
|
||||
amount += +this.value;
|
||||
});
|
||||
|
||||
$('#total_deductions').val(amount);
|
||||
|
||||
// calculate total pay
|
||||
calculateNetpay();
|
||||
}
|
||||
|
||||
// calculate the total allowances value
|
||||
function calculateAllowances() {
|
||||
// loop through all with class of allowance_changes adding the totals
|
||||
let amount = 0;
|
||||
|
||||
$('.allowance_changes').each(function(){
|
||||
amount += +this.value;
|
||||
});
|
||||
|
||||
$('#gross_pay').val(amount);
|
||||
|
||||
// calculate total pay
|
||||
calculateNetpay();
|
||||
}
|
||||
|
||||
// calculate total amount to pay staff
|
||||
function calculateNetpay() {
|
||||
// get the gross pay
|
||||
let gross_pay = $('#gross_pay').val();
|
||||
|
||||
// get the deductions pay
|
||||
let total_deductions = $('#total_deductions').val();
|
||||
|
||||
let net_pay = +gross_pay - +total_deductions;
|
||||
|
||||
$('#net_pay').val(net_pay);
|
||||
}
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
@@ -0,0 +1,10 @@
|
||||
<div class="white-box">
|
||||
<a href="/payroll/create" class="nav-item btn btn-success ti-plus"> {{ __('payroll.add_payroll_employee') }}</a>
|
||||
<a href="/payroll/bulk_create" class="nav-item btn btn-success ti-plus"> {{ __('payroll.add_multiple_payroll_employees') }}</a>
|
||||
<a href="{{ route('payroll.index') }}" class="nav-item btn btn-primary ti-plus"> {{ __('payroll.view_payrolls') }}</a>
|
||||
<a href="/payroll/create_bulk_payment" class="nav-item btn btn-primary ti-money"> {{ __('payroll.pay_multiple_employees') }}</a>
|
||||
<a href="{{ route('payroll.inactive') }}" class="nav-item btn btn-danger ti-trash"> {{ __('payroll.inactive_payrolls') }}</a>
|
||||
<a href="/payroll_salary_scales" class="nav-item btn btn-primary ti-plus"> {{ __('payroll.manage_salary_scale') }}</a>
|
||||
<a href="{{ route('payroll_schedules.create') }}" class="nav-item btn btn-success ti-plus"> Create Payroll Schedule</a>
|
||||
<a href="{{ route('payroll_schedules.index') }}" class="nav-item btn btn-primary ti-pencil"> View Payroll Schedules</a>
|
||||
</div>
|
||||
+134
@@ -0,0 +1,134 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ app()->getLocale() }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('uploads/streamline/color/streamline_icon-02.png') }}">
|
||||
<title>{{ config('app.name', 'Stre@mline') }}</title>
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
body{
|
||||
/*font-size: 1.2em;*/
|
||||
}
|
||||
|
||||
thead {
|
||||
/*display: table-header-group;*/
|
||||
}
|
||||
|
||||
tfoot {
|
||||
/*display: table-row-group;*/
|
||||
}
|
||||
|
||||
tr {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
@include('layouts.header_pdf_print')
|
||||
|
||||
@php $patient = \Illuminate\Support\Facades\DB::table('patients')->where('id', $member->patient_id)->first(); @endphp
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
<h4>{{ __('payroll.personal_information') }}</h4>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th><b>{{ __('payroll.staff_member') }}</b></th>
|
||||
<td>{{ $patient->first_name }} {{ $patient->last_name }}</td>
|
||||
<th><b>{{ __('payroll.staff_patient_number') }}</b></th>
|
||||
<td>{{ $patient->number }}</td>
|
||||
<th><b>{{ __('payroll.staff_contact') }}</b></th>
|
||||
<td>{{ $patient->phone }}</td>
|
||||
@php
|
||||
$contract_periods = json_decode($member->contract_period, true);
|
||||
$contract_periods = end($contract_periods);
|
||||
$total_deductions = 0;
|
||||
$total_allowances = 0;
|
||||
@endphp
|
||||
<th><b>{{ __('payroll.contract') }}</b></th>
|
||||
<td>{{ [1 => 'Permanent', 2 => 'Probation', 3 => 'Contract'][$member->contract] ?? 'N/A' }}</td>
|
||||
<th><b>{{ __('payroll.contract_expiry') }}</b></th>
|
||||
<td>{{ streamline_date($contract_periods[1]) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<h4>{{ __('payroll.allowances_deductions_details') }}</h4>
|
||||
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('payroll.type') }}</th>
|
||||
<th>{{ __('payroll.amount') }}</th>
|
||||
<th>{{ __('payroll.income_account') }}</th>
|
||||
<th>{{ __('payroll.is_recurring') }}</th>
|
||||
<th>{{ __('payroll.recurring_period') }}</th>
|
||||
<th>{{ __('payroll.recurring_final_date') }}</th>
|
||||
<th>{{ __('payroll.reason') }}</th>
|
||||
<th>{{ __('payroll.added_to_payslip') }}</th>
|
||||
<th>{{ __('payroll.created_by') }}</th>
|
||||
<th>{{ __('payroll.created_on') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(count($records) > 0)
|
||||
@foreach($records as $record)
|
||||
<tr>
|
||||
<td>
|
||||
@if($record->type == 0)
|
||||
@php $total_allowances += $record->amount; @endphp
|
||||
{{ __('payroll.allowance') }}
|
||||
@else
|
||||
@php $total_deductions += $record->amount; @endphp
|
||||
{{ __('payroll.deduction') }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ ugandan_shillings($record->amount) }}</td>
|
||||
<td>{{ $income_accounts[$record->income_account_id] ?? 'N/A' }}</td>
|
||||
<td>{{ [0 => 'No', 1 => 'Yes'][$record->recurring] ?? 'N/A' }}</td>
|
||||
<td>{{ [0 => 'End of Contract', 1 => 'Defined Date'][$record->recurring_period] ?? 'N/A' }}</td>
|
||||
<td>{{ $record->recurring_final_date ? streamline_date($record->recurring_final_date) : 'N/A' }}</td>
|
||||
<td>{{ $record->reason }}</td>
|
||||
<td>
|
||||
@if($record->billed == 0)
|
||||
<span style="color: red">{{ __('payroll.no') }}</span>
|
||||
@else
|
||||
<span style="color: darkgreen">{{ __('payroll.yes') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ get_full_name($record->created_by, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
<td>{{ streamline_date_time($record->created_at) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="11" class="text-center"><h5><code>{{ __('payroll.no_records_available') }}</code></h5></td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td><b>Total Allowances</b></td>
|
||||
<td>{{ ugandan_shillings($total_allowances) }}</td>
|
||||
<td><b>Total Deductions</b></td>
|
||||
<td>{{ ugandan_shillings($total_deductions) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+248
@@ -0,0 +1,248 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ app()->getLocale() }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('uploads/streamline/color/streamline_icon-02.png') }}">
|
||||
<title>{{ config('app.name', 'Stre@mline') }}</title>
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
body{
|
||||
/*font-size: 1.2em;*/
|
||||
}
|
||||
|
||||
thead {
|
||||
/*display: table-header-group;*/
|
||||
}
|
||||
|
||||
tfoot {
|
||||
/*display: table-row-group;*/
|
||||
}
|
||||
|
||||
tr {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
@include('layouts.header_pdf_print')
|
||||
|
||||
@php $patient = \Illuminate\Support\Facades\DB::table('patients')->where('id', $member->patient_id)->first(); @endphp
|
||||
|
||||
<h4>{{ __('payroll.personal_information') }}</h4>
|
||||
|
||||
<table class="table table-light table-sm table-borderless">
|
||||
<tr>
|
||||
<th><b>{{ __('payroll.staff_member') }}</b></th>
|
||||
<td>{{ $patient->first_name }} {{ $patient->last_name }}</td>
|
||||
<th><b>{{ __('payroll.staff_patient_number') }}</b></th>
|
||||
<td>{{ $patient->number }}</td>
|
||||
<th><b>{{ __('payroll.staff_contact') }}</b></th>
|
||||
<td>{{ $patient->phone }}</td>
|
||||
@php
|
||||
$contract_periods = json_decode($member->contract_period, true);
|
||||
$contract_periods = end($contract_periods);
|
||||
@endphp
|
||||
<th><b>{{ __('payroll.contract') }}</b></th>
|
||||
<td>{{ [1 => 'Permanent', 2 => 'Probation', 3 => 'Contract'][$member->contract] ?? 'N/A' }}</td>
|
||||
<th><b>{{ __('payroll.contract_expiry') }}</b></th>
|
||||
<td>{{ streamline_date($contract_periods[1]) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<h4>{{ __('payroll.payroll_information') }}</h4>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<table class="table table-sm">
|
||||
<tr>
|
||||
<th>{{ __('payroll.social_security_number') }}</th>
|
||||
<td>{{ $member->nssf_number }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('payroll.tin_number') }}</th>
|
||||
<td>{{ $member->tin_number }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('payroll.salary_scale') }}</th>
|
||||
<td>{{ $salary_scales[$member->salary_scale] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('payroll.contract_type') }}</th>
|
||||
<td>{{ [1 => 'Permanent', 2 => 'Probation', 3 => 'Contract'][$member->contract] ?? '' }}</td>
|
||||
</tr>
|
||||
|
||||
@php
|
||||
$contract_periods = json_decode($member->contract_period, true);
|
||||
$contract_periods = end($contract_periods);
|
||||
@endphp
|
||||
|
||||
<tr>
|
||||
<th>{{ __('payroll.contract_start') }}</th>
|
||||
<td>{{ streamline_date($contract_periods[0]) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('payroll.contract_end') }}</th>
|
||||
<td>{{ streamline_date($contract_periods[1]) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<table class="table table-sm">
|
||||
<tr>
|
||||
<th>{{ __('payroll.bank') }}</th>
|
||||
<td>{{ $banks[$member->payroll_bank_id] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('payroll.bank_account_number') }}</th>
|
||||
<td>{{ $member->bank_account_number }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('payroll.basic_pay') }}</th>
|
||||
<td>{{ $member->basic_pay }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('payroll.position') }}</th>
|
||||
<td>{{ $positions[$member->position] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('payroll.department') }}</th>
|
||||
<td>{{ $departments[$member->department] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('payroll.payroll_categories') }}</th>
|
||||
<td>{{ $payroll_categories[$member->payroll_category] }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(count($payments) > 0)
|
||||
|
||||
<hr>
|
||||
|
||||
<h4>Payments</h4>
|
||||
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Payment Period</th>
|
||||
<th>Allowances</th>
|
||||
<th>Deductions</th>
|
||||
<th>PAYE</th>
|
||||
<th>NSSF</th>
|
||||
<th>Basic Pay</th>
|
||||
<th>Gross Pay</th>
|
||||
<th>Total Deductions</th>
|
||||
<th>Net Pay</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($payments as $payment)
|
||||
<tr>
|
||||
<td>{{ $payment->month }}, {{ $payment->year }}</td>
|
||||
<td>{{ ugandan_shillings($payment->allowances) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->deductions) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->paye_payment) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->nssf_payment) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->basic_pay) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->gross_pay) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->total_deductions) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->net_pay) }}</td>
|
||||
<td>
|
||||
{{ Form::model($payment->id ,['method' => 'POST', 'route' => ['payroll.view_payslip', $payment->id]]) }}
|
||||
<button type="submit" class="fcbtn btn btn-outline btn-info btn-sm btn-1c"><i class="fa fa-eye"></i> Print Payslip</button>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::model($payment->id ,['method' => 'POST', 'route' => ['payroll.edit_payslip', $payment->id]]) }}
|
||||
<button type="submit" class="btn btn-info btn-sm"><i class="fa fa-pencil"></i> Edit Payslip</button>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::model($payment->id ,['method' => 'POST', 'route' => ['payroll.destroy_payslip', $payment->id]]) }}
|
||||
<button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure?')"><i class="fa fa-trash"></i> Delete Payslip</button>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
|
||||
@if(count($allow_deductions) > 0)
|
||||
<br>
|
||||
|
||||
<h4>{{ __('payroll.allowances_deductions') }}</h4>
|
||||
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('payroll.type') }}</th>
|
||||
<th>{{ __('payroll.amount') }}</th>
|
||||
<th>{{ __('payroll.reason') }}</th>
|
||||
<th>{{ __('payroll.added_to_payslip') }}</th>
|
||||
<th>{{ __('payroll.created_by') }}</th>
|
||||
<th>{{ __('payroll.created_on') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$total_deductions = 0;
|
||||
$total_allowances = 0;
|
||||
@endphp
|
||||
|
||||
@foreach($allow_deductions as $record)
|
||||
<tr>
|
||||
<td>
|
||||
@if($record->type == 0)
|
||||
@php $total_allowances += $record->amount; @endphp
|
||||
{{ __('payroll.allowance') }}
|
||||
@else
|
||||
@php $total_deductions += $record->amount; @endphp
|
||||
{{ __('payroll.deduction') }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ ugandan_shillings($record->amount) }}</td>
|
||||
<td>{{ $record->reason }}</td>
|
||||
<td>
|
||||
@if($record->billed == 0)
|
||||
<span style="color: red">{{ __('payroll.no') }}</span>
|
||||
@else
|
||||
<span style="color: darkgreen">{{ __('payroll.yes') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ get_full_name($record->created_by, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
<td>{{ streamline_date_time($record->created_at) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
<tr>
|
||||
<td colspan="3" class="text-center">
|
||||
<b>Total Allowances</b>: {{ ugandan_shillings($total_allowances) }}
|
||||
</td>
|
||||
<td colspan="3" class="text-center">
|
||||
<b>Total Deductions</b>: {{ ugandan_shillings($total_deductions) }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Executable
+282
@@ -0,0 +1,282 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">{{ __('payroll.member_details') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('payroll.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('payroll.finance_home') }}</a></li>
|
||||
<li><a href="{{ route('payroll.index') }}"><i class="fa fa-eye"></i> {{ __('payroll.view_payrolls') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> {{ __('payroll.details') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('payroll::payroll.menu')
|
||||
|
||||
<div class="white-box">
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
|
||||
<a href="/payroll/{{ $member->id }}/edit/" class="btn btn-info"><i class="fa fa-pencil"></i> {{ __('payroll.edit_details') }}</a>
|
||||
|
||||
<a href="/payroll/print_staff_details/{{ $member->id }}/" class="btn btn-info" target="_blank"><i class="fa fa-print"></i> {{ __('payroll.print_details') }}</a>
|
||||
|
||||
<hr>
|
||||
|
||||
@php $patient = \Illuminate\Support\Facades\DB::table('patients')->where('id', $member->patient_id)->first(); @endphp
|
||||
|
||||
<h4>{{ __('payroll.personal_information') }}</h4>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th><b>{{ __('payroll.staff_member') }}</b></th>
|
||||
<td>{{ $patient->first_name }} {{ $patient->last_name }}</td>
|
||||
<th><b>{{ __('payroll.staff_patient_number') }}</b></th>
|
||||
<td>{{ $patient->number }}</td>
|
||||
<th><b>{{ __('payroll.staff_contact') }}</b></th>
|
||||
<td>{{ $patient->phone }}</td>
|
||||
@php
|
||||
$contract_periods = json_decode($member->contract_period, true);
|
||||
$contract_periods = end($contract_periods);
|
||||
@endphp
|
||||
<th><b>{{ __('payroll.contract') }}</b></th>
|
||||
<td>{{ [1 => 'Permanent', 2 => 'Probation', 3 => 'Contract'][$member->contract] ?? 'N/A' }}</td>
|
||||
<th><b>{{ __('payroll.contract_expiry') }}</b></th>
|
||||
<td>{{ streamline_date($contract_periods[1]) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h4>{{ __('payroll.payroll_information') }}</h4>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<table class="table table-striped table-bordered">
|
||||
<tr>
|
||||
<th>{{ __('payroll.social_security_number') }}</th>
|
||||
<td>{{ $member->nssf_number }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('payroll.tin_number') }}</th>
|
||||
<td>{{ $member->tin_number }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('payroll.salary_scale') }}</th>
|
||||
<td>{{ $salary_scales[$member->salary_scale] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('payroll.contract_type') }}</th>
|
||||
<td>{{ [1 => 'Permanent', 2 => 'Probation', 3 => 'Contract'][$member->contract] ?? '' }}</td>
|
||||
</tr>
|
||||
|
||||
@php
|
||||
$contract_periods = json_decode($member->contract_period, true);
|
||||
$contract_periods = end($contract_periods);
|
||||
@endphp
|
||||
|
||||
<tr>
|
||||
<th>{{ __('payroll.contract_start') }}</th>
|
||||
<td>{{ streamline_date($contract_periods[0]) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('payroll.contract_end') }}</th>
|
||||
<td>{{ streamline_date($contract_periods[1]) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<table class="table table-striped table-bordered">
|
||||
<tr>
|
||||
<th>{{ __('payroll.bank') }}</th>
|
||||
<td>{{ $banks[$member->payroll_bank_id] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('payroll.bank_account_number') }}</th>
|
||||
<td>{{ $member->bank_account_number }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('payroll.basic_pay') }}</th>
|
||||
<td>{{ $member->basic_pay }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('payroll.position') }}</th>
|
||||
<td>{{ $positions[$member->position] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('payroll.department') }}</th>
|
||||
<td>{{ $departments[$member->department] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('payroll.payroll_categories') }}</th>
|
||||
<td>{{ $payroll_categories[$member->payroll_category] }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<h4>Payments</h4>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Payment Period</th>
|
||||
<th>Allowances</th>
|
||||
<th>Deductions</th>
|
||||
<th>PAYE</th>
|
||||
<th>NSSF</th>
|
||||
<th>Basic Pay</th>
|
||||
<th>Gross Pay</th>
|
||||
<th>Total Deductions</th>
|
||||
<th>Net Pay</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(count($payments) > 0)
|
||||
@foreach($payments as $payment)
|
||||
<tr>
|
||||
<td>{{ $payment->month }}, {{ $payment->year }}</td>
|
||||
<td>{{ ugandan_shillings($payment->allowances) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->deductions) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->paye_payment) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->nssf_payment) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->basic_pay) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->gross_pay) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->total_deductions) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->net_pay) }}</td>
|
||||
<td>
|
||||
{{ Form::model($payment->id ,['method' => 'POST', 'route' => ['payroll.view_payslip', $payment->id]]) }}
|
||||
<button type="submit" class="fcbtn btn btn-outline btn-info btn-sm btn-1c"><i class="fa fa-eye"></i> Print Payslip</button>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::model($payment->id ,['method' => 'POST', 'route' => ['payroll.edit_payslip', $payment->id]]) }}
|
||||
<button type="submit" class="btn btn-info btn-sm"><i class="fa fa-pencil"></i> Edit Payslip</button>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::model($payment->id ,['method' => 'POST', 'route' => ['payroll.destroy_payslip', $payment->id]]) }}
|
||||
<button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure?')"><i class="fa fa-trash"></i> Delete Payslip</button>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr><td colspan="12" class="text-center"><code>{{ __('payroll.no_records_available') }}</code></td></tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<a href="/payroll/make_payment{{ $member->id }}" class="btn btn-info">{{ __('payroll.pay_member') }}</a>
|
||||
|
||||
<hr>
|
||||
|
||||
<h4>{{ __('payroll.allowances_deductions') }}</h4>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('payroll.type') }}</th>
|
||||
<th>{{ __('payroll.amount') }}</th>
|
||||
<th>{{ __('payroll.income_account') }}</th>
|
||||
<th>{{ __('payroll.is_recurring') }}</th>
|
||||
<th>{{ __('payroll.recurring_period') }}</th>
|
||||
<th>{{ __('payroll.recurring_final_date') }}</th>
|
||||
<th>{{ __('payroll.reason') }}</th>
|
||||
<th>{{ __('payroll.added_to_payslip') }}</th>
|
||||
<th>{{ __('payroll.created_by') }}</th>
|
||||
<th>{{ __('payroll.created_on') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(count($allow_deductions) > 0)
|
||||
@php
|
||||
$total_deductions = 0;
|
||||
$total_allowances = 0;
|
||||
@endphp
|
||||
|
||||
@foreach($allow_deductions as $record)
|
||||
<tr>
|
||||
<td>
|
||||
@if($record->type == 0)
|
||||
@php $total_allowances += $record->amount; @endphp
|
||||
{{ __('payroll.allowance') }}
|
||||
@else
|
||||
@php $total_deductions += $record->amount; @endphp
|
||||
{{ __('payroll.deduction') }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ ugandan_shillings($record->amount) }}</td>
|
||||
<td>{{ $income_accounts[$record->income_account_id] ?? 'N/A' }}</td>
|
||||
<td>{{ [0 => 'No', 1 => 'Yes'][$record->recurring] ?? 'N/A' }}</td>
|
||||
<td>{{ [0 => 'End of Contract', 1 => 'Defined Date'][$record->recurring_period] ?? 'N/A' }}</td>
|
||||
<td>{{ $record->recurring_final_date ? streamline_date($record->recurring_final_date) : 'N/A' }}</td>
|
||||
<td>{{ $record->reason }}</td>
|
||||
<td>
|
||||
@if($record->billed == 0)
|
||||
<span style="color: red">{{ __('payroll.no') }}</span>
|
||||
@else
|
||||
<span style="color: darkgreen">{{ __('payroll.yes') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ get_full_name($record->created_by, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
<td>{{ streamline_date_time($record->created_at) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
<tr>
|
||||
<td colspan="5" class="text-center">
|
||||
<b>Total Allowances</b>: {{ ugandan_shillings($total_allowances) }}
|
||||
</td>
|
||||
<td colspan="5" class="text-center">
|
||||
<b>Total Deductions</b>: {{ ugandan_shillings($total_deductions) }}
|
||||
</td>
|
||||
</tr>
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="11" class="text-center"><h5><code>{{ __('payroll.no_records_available') }}</code></h5></td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<a href="/payroll/allowances_or_deductions/{{ $member->id }}" class="btn btn-info">{{ __('payroll.allowances_deductions') }}</a>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.flash.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/pdfmake.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/vfs_fonts.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.html5.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.print.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
'csv', 'excel', 'pdf', 'print'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
Executable
+155
@@ -0,0 +1,155 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
|
||||
<style>
|
||||
th, td { white-space: nowrap; }
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">Payroll Payments</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> Finance Home</a></li>
|
||||
<li><a href="{{ route('payroll.index') }}"><i class="fa fa-eye"></i> Payroll</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> Payments</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
{{ Form::open(['route' => 'payroll.view_payroll_payments' , 'data-toggle' => 'validator']) }}
|
||||
<div class="row">
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
{{ Form::label('start_date','Date From') }}
|
||||
{{ Form::text('start_date','',['class' => 'form-control compulsory', 'required','readonly','id'=>'start_date']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
{{ Form::label('end_date','Date To') }}
|
||||
{{ Form::text('end_date','',['class' => 'form-control compulsory', 'required','readonly','id'=>'end_date']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
{{ Form::label('bank_id','Bank') }}
|
||||
{{ Form::select('bank_id', $banks,'',['class' => 'form-control compulsory', 'required']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<br>
|
||||
{{ Form::button('Search',['type'=>'submit','class'=>'btn btn-rounded btn-success waves-effect waves-light m-r-10']) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
<h4><label class="label label-info">From {{ streamline_date($start) }} To {{ streamline_date($end) }} For Bank: {{ $banks[$bank_id] }}</label></h4>
|
||||
<br>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Staff Member</th>
|
||||
<th>Payment Period</th>
|
||||
<th>Allowances</th>
|
||||
<th>Deductions</th>
|
||||
<th>PAYE</th>
|
||||
<th>NSSF</th>
|
||||
<th>Basic Pay</th>
|
||||
<th>Gross Pay</th>
|
||||
<th>Total Deductions</th>
|
||||
<th>Net Pay</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($payments as $payment)
|
||||
<tr>
|
||||
<td>{{ $member_details_first_name[$payment->member_id] }} {{ $member_details_last_name[$payment->member_id] }}</td>
|
||||
<td>{{ $payment->month }}, {{ $payment->year }}</td>
|
||||
<td>{{ ugandan_shillings($payment->allowances) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->deductions) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->paye_payment) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->nssf_payment) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->basic_pay) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->gross_pay) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->total_deductions) }}</td>
|
||||
<td>{{ ugandan_shillings($payment->net_pay) }}</td>
|
||||
<td>
|
||||
{{ Form::model($payment->id ,['method' => 'POST', 'route' => ['payroll.view_payslip', $payment->id]]) }}
|
||||
<button type="submit" class="fcbtn btn btn-outline btn-info btn-sm btn-1c"><i class="fa fa-eye"></i> Print Payslip</button>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::model($payment->id ,['method' => 'POST', 'route' => ['payroll.edit_payslip', $payment->id]]) }}
|
||||
<button type="submit" class="btn btn-info btn-sm"><i class="fa fa-pencil"></i> Edit Payslip</button>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::model($payment->id ,['method' => 'POST', 'route' => ['payroll.destroy_payslip', $payment->id]]) }}
|
||||
<button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure?')"><i class="fa fa-trash"></i> Delete Payslip</button>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.flash.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/pdfmake.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/vfs_fonts.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.html5.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.print.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
'csv', 'excel', 'pdf', 'print'
|
||||
]
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#start_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
|
||||
$('#end_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+196
@@ -0,0 +1,196 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">Payslip</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> Finance Home</a></li>
|
||||
<li><a href="{{ route('payroll.index') }}"><i class="fa fa-eye"></i> Payroll</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> Payslip</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
|
||||
<a class="btn btn-success btn-rounded btn-sm pull-right" onclick="printElementContent()">Print</a>
|
||||
<br>
|
||||
|
||||
<div id="print_div">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<img src="{{ asset(isset($hospital_information->logo) ? $hospital_information->logo : 'uploads/logo/logo-sm.png') }}" width="90px" height="70px" alt="" class="pull-left">
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
<h4><b>{{ $hospital_information->name }}</b></h4>
|
||||
<p class="text-muted">
|
||||
{{ $hospital_information->address }}
|
||||
<br>
|
||||
{{ $hospital_information->phone_number }}
|
||||
<br>
|
||||
{{ $hospital_information->email }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<h4>Staff Member Information</h4>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<table class="table table-striped table-bordered">
|
||||
<tr>
|
||||
<th>Names</th>
|
||||
<td>{{ $member->first_name }} {{ $member->last_name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Contact</th>
|
||||
<td>{{ $member->contact }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Position</th>
|
||||
<td>{{ $positions[$member->position] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Department</th>
|
||||
<td>{{ $departments[$member->department] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<td>{{ $payslip->month }} {{ $payslip->year }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<table class="table table-striped table-bordered">
|
||||
<tr>
|
||||
<th>Salary Scale</th>
|
||||
<td>{{ $member->salary_scale }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>NSSF Number</th>
|
||||
<td>{{ $member->nssf_number }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>TIN Number</th>
|
||||
<td>{{ $member->tin_number }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Bank Account Name</th>
|
||||
<td>{{ $banks[$member->payroll_bank_id] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Bank Account Number</th>
|
||||
<td>{{ $member->bank_account_number }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h4>Salary/Allowances</h4>
|
||||
<table class="table table-striped table-bordered">
|
||||
<tr>
|
||||
<th>Basic Pay</th>
|
||||
<td>{{ ugandan_shillings($payslip->basic_pay) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Allowances</th>
|
||||
<td>{{ ugandan_shillings($payslip->allowances) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h4>Deductions</h4>
|
||||
|
||||
<table class="table table-striped table-bordered">
|
||||
<tr>
|
||||
<th>NSSF</th>
|
||||
<td>{{ ugandan_shillings($payslip->nssf_payment) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>PAYE</th>
|
||||
<td>{{ ugandan_shillings($payslip->paye_payment) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Deductions</th>
|
||||
<td>{{ ugandan_shillings($payslip->deductions) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<table class="table table-striped table-bordered">
|
||||
<tr>
|
||||
<th>Gross Pay</th>
|
||||
<td>{{ ugandan_shillings($payslip->gross_pay) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<table class="table table-striped table-bordered">
|
||||
<tr>
|
||||
<th>Total Deductions</th>
|
||||
<td>{{ ugandan_shillings($payslip->total_deductions) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<table class="table table-striped table-bordered">
|
||||
<tr>
|
||||
<th>Net Pay</th>
|
||||
<td>{{ ugandan_shillings($payslip->net_pay) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
function printElementContent(){
|
||||
let mywindow = window.open('', 'PRINT', 'height=400,width=600');
|
||||
let css = '<link href="/elite/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">';
|
||||
css += '<link href="/elite/bower_components/datatables/jquery.dataTables.min.css" rel="stylesheet">';
|
||||
css += '<style>';
|
||||
css += '.col-md-4 { width:33.3%; float:left; }';
|
||||
css += '.col-md-6 { width:50%; float:left; }';
|
||||
css += '</style>';
|
||||
|
||||
mywindow.document.write('<html><head><title></title>');
|
||||
mywindow.document.write('</head><body>');
|
||||
mywindow.document.write(css);
|
||||
mywindow.document.write($("#print_div").html());
|
||||
mywindow.document.write('</body></html>');
|
||||
mywindow.document.close();
|
||||
|
||||
setTimeout(function () {
|
||||
mywindow.focus();
|
||||
mywindow.print();
|
||||
mywindow.remove();
|
||||
}, 500);
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">{{ __('payroll_categories.add_category') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('payroll_categories.dashboard') }}</a></li>
|
||||
<li><a href="/payroll_categories/index">{{ __('payroll_categories.payroll_categories') }}</a></li>
|
||||
<li class="active">{{ __('payroll_categories.create') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('payroll::payroll_categories.menu')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
<div class="white-box">
|
||||
{{ Form::open(['route' => 'payroll_categories.store', 'data-toggle' => 'validator']) }}
|
||||
<div class="form-group" id="optionsList">
|
||||
{{ Form::label('name', __('payroll_categories.payroll_categories_name')) }}
|
||||
{{ Form::text('name', '', ['class' => 'form-control compulsory', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
{{ Form::button(__('payroll_categories.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10 submit-btn']) }}
|
||||
{{ Form::button(__('payroll_categories.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/js/validator.js') }}"></script>
|
||||
<script type="text/javascript"></script>
|
||||
@endpush
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">{{ __('payroll_categories.edit') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('payroll_categories.dashboard') }}</a></li>
|
||||
<li><a href="/payroll_categories/index">{{ __('payroll_categories.payroll_categories') }}</a></li>
|
||||
<li class="active">{{ __('payroll_categories.edit') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('payroll::payroll_categories.menu')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
<div class="white-box">
|
||||
{{ Form::model($category, ['method' => 'PUT', 'route' => ['payroll_categories.update',$category], 'data-toggle' => 'validator']) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('name', __('payroll_categories.payroll_categories_name')) }}
|
||||
{{ Form::text('name', $category->name, ['class' => 'form-control compulsory', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
{{ Form::button(__('payroll_categories.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button(__('payroll_categories.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/js/validator.js') }}"></script>
|
||||
@endpush
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">{{ __('payroll_categories.activate_category') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('payroll_categories.dashboard') }}</a></li>
|
||||
<li><a href="/payroll_categories/index">{{ __('payroll_categories.payroll_categories') }}</a></li>
|
||||
<li class="active">{{ __('payroll_categories.activate') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('payroll::payroll_categories.menu')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="white-box">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('payroll_categories.payroll_categories_name') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($categories as $category)
|
||||
<tr>
|
||||
<td>{{ $category->name }}</td>
|
||||
<td>
|
||||
{{ Form::model($category->id ,['method' => 'POST', 'route' => ['payroll_categories.activate', $category->id]]) }}
|
||||
<button type="submit" class="btn btn-warning" onclick="return confirm('<?php echo __('payroll_categories.are_you_sure');?>')"><i class="fa fa-check"></i> {{ __('payroll_categories.activate') }}</button>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.flash.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/pdfmake.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/vfs_fonts.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.html5.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.print.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'pdf', 'print'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+106
@@ -0,0 +1,106 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">{{ __('payroll_categories.payroll_categories') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('payroll_categories.dashboard') }}</a></li>
|
||||
<li><a href="/payroll_categories/index">{{ __('payroll_categories.payroll_categories') }}</a></li>
|
||||
<li class="active">{{ __('payroll_categories.view') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('payroll::payroll_categories.menu')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="white-box">
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('payroll_categories.payroll_categories_name') }}</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($categories as $category)
|
||||
<tr>
|
||||
<td>{{ $category->name }}</td>
|
||||
<td>
|
||||
<a href="/payroll_categories/{{ $category->id }}/edit/" class="btn btn-info"><i class="fa fa-pencil"></i> {{ __('payroll_categories.edit') }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::model($category->id ,['method' => 'DELETE', 'route' => ['payroll_categories.destroy', $category->id]]) }}
|
||||
<button type="submit" class="btn btn-danger" onclick="return confirm('<?php echo __('payroll_categories.are_you_sure');?>')"><i class="fa fa-trash"></i> {{ __('payroll_categories.delete') }}</button>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.flash.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/pdfmake.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/vfs_fonts.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.html5.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.print.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
'copy', 'csv', {
|
||||
extend: 'pdf',
|
||||
exportOptions: {
|
||||
columns: [0]
|
||||
},
|
||||
title: 'Payroll Categories'
|
||||
},
|
||||
{
|
||||
extend: 'print',
|
||||
exportOptions: {
|
||||
columns: [0]
|
||||
},
|
||||
title: 'Payroll Categories'
|
||||
},
|
||||
{
|
||||
extend: 'excel',
|
||||
exportOptions: {
|
||||
columns: [0]
|
||||
},
|
||||
title: 'Payroll Categories'
|
||||
}
|
||||
]
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<a href="{{ route('payroll_categories.create') }}" class="nav-item btn btn-success ti-plus"> {{ __('payroll_categories.add_category') }}</a>
|
||||
<a href="{{ route('payroll_categories.index') }}" class="nav-item btn btn-primary ti-pencil"> {{ __('payroll_categories.view_category') }}</a>
|
||||
<a href="{{ route('payroll_categories.inactive') }}" class="nav-item btn btn-warning ti-pencil"> {{ __('payroll_categories.inactive_category') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
Executable
+37
@@ -0,0 +1,37 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">{{ __('finance.edit_social_security_rate') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('finance.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('finance.finance_home') }}</a></li>
|
||||
<li class="active"><i class="fa fa-pencil"></i> {{ __('finance.edit_payroll_defaults') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
|
||||
{{ Form::model(1 ,['method' => 'POST', 'route' => ['payroll_defaults.save_nssf_rate', 1]]) }}
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('nssf_rate', __('finance.social_security_rate')) }}
|
||||
{{ Form::number('nssf_rate', $nssf_rate->nssf_rate, ['class' => 'form-control compulsory', 'required', 'step' => '0.01']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
{{ Form::button(__('finance.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button(__('finance.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/js/validator.js') }}"></script>
|
||||
@endpush
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">{{ __('finance.edit_tax_rate') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('finance.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('finance.finance_home') }}</a></li>
|
||||
<li class="active"><i class="fa fa-pencil"></i> {{ __('finance.edit_payroll_defaults') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
|
||||
{{ Form::open(['route' => 'payroll_defaults.save_tax_rate', 'data-toggle' => 'validator']) }}
|
||||
|
||||
@php
|
||||
$tax_from = json_decode($tax_rate_record->tax_from);
|
||||
$tax_to = json_decode($tax_rate_record->tax_to);
|
||||
$tax_rate = json_decode($tax_rate_record->tax_rate);
|
||||
@endphp
|
||||
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>From</th>
|
||||
<th>To</th>
|
||||
<th>Tax Percentage (0 - 100)</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody class='input_fields_body'>
|
||||
@if(!is_null($tax_from))
|
||||
@for($i = 0; $i < count($tax_from); $i++)
|
||||
<tr>
|
||||
<td><input type='number' name='from[]' id='from_0' class='form-control compulsory' value='{{ $tax_from[$i] }}' required></td>
|
||||
<td><input type='number' name='to[]' id='to_0' class='form-control compulsory' value='{{ $tax_to[$i] }}' required></td>
|
||||
<td><input type='number' name='tax_rate[]' id='tax_rate_0' class='form-control compulsory' value='{{ $tax_rate[$i] }}' required></td>
|
||||
<td style='width: 1%;'>
|
||||
@if($i > 0)
|
||||
<a class='remove_field btn btn-sm btn-rounded btn-danger' style='color: white;'><i class='fa fa-trash'></i></a>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endfor
|
||||
@else
|
||||
<tr>
|
||||
<td><input type='number' name='from[]' id='from_0' class='form-control compulsory' required></td>
|
||||
<td><input type='number' name='to[]' id='to_0' class='form-control compulsory' required></td>
|
||||
<td><input type='number' name='tax_rate[]' id='tax_rate_0' class='form-control compulsory' required></td>
|
||||
<td style='width: 1%;'></td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a class="btn btn-success btn-xs" onclick="add_new_row()">{{ __('triage.add_row') }}</a>
|
||||
|
||||
<br><br>
|
||||
|
||||
{{ Form::button(__('finance.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button(__('finance.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/js/validator.js') }}"></script>
|
||||
|
||||
<script>
|
||||
let max_rows = 20;
|
||||
let wrapper = $(".input_fields_body");
|
||||
let x = 1;
|
||||
|
||||
$(wrapper).on("click", ".remove_field", function (e) {
|
||||
e.preventDefault();
|
||||
$(this).parent('td').parent('tr').remove();
|
||||
x--;
|
||||
});
|
||||
|
||||
function add_new_row() {
|
||||
if (x < max_rows) {
|
||||
$(wrapper).append("<tr>\
|
||||
<td><input type='number' name='from[]' id='from_0' class='form-control compulsory' required></td>\
|
||||
<td><input type='number' name='to[]' id='to_0' class='form-control compulsory' required></td>\
|
||||
<td><input type='number' name='tax_rate[]' id='tax_rate_0' class='form-control compulsory' required></td>\
|
||||
<td style='width: 1%;'><a class='remove_field btn btn-sm btn-rounded btn-danger' style='color: white;'><i class='fa fa-trash'></i></a></td></tr>");
|
||||
|
||||
x++;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">{{ __('payroll_salary_scale.add_category') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('payroll_salary_scale.dashboard') }}</a></li>
|
||||
<li><a href="/salary_scales/index">{{ __('payroll_salary_scale.salary_scale') }}</a></li>
|
||||
<li class="active">{{ __('payroll_salary_scale.create') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('payroll::payroll_salary_scales.menu')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
<div class="white-box">
|
||||
{{ Form::open(['route' => 'payroll_salary_scales.store', 'data-toggle' => 'validator']) }}
|
||||
<div class="form-group" id="optionsList">
|
||||
{{ Form::label('name', __('payroll_salary_scale.salary_scale_name')) }}
|
||||
{{ Form::text('name', '', ['class' => 'form-control compulsory', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
{{ Form::button(__('payroll_salary_scale.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10 submit-btn']) }}
|
||||
{{ Form::button(__('payroll_salary_scale.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/js/validator.js') }}"></script>
|
||||
<script type="text/javascript"></script>
|
||||
@endpush
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">{{ __('payroll_salary_scale.edit') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('payroll_salary_scale.dashboard') }}</a></li>
|
||||
<li><a href="/salary_scales/index">{{ __('payroll_salary_scale.salary_scale') }}</a></li>
|
||||
<li class="active">{{ __('payroll_salary_scale.edit') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('payroll::payroll_salary_scales.menu')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
<div class="white-box">
|
||||
{{ Form::model($scale, ['method' => 'PUT', 'route' => ['payroll_salary_scales.update',$scale], 'data-toggle' => 'validator']) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('name', __('payroll_salary_scale.salary_scale_name')) }}
|
||||
{{ Form::text('name', $scale->name, ['class' => 'form-control compulsory', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
{{ Form::button(__('payroll_salary_scale.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button(__('payroll_salary_scale.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/js/validator.js') }}"></script>
|
||||
@endpush
|
||||
Executable
+77
@@ -0,0 +1,77 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">{{ __('payroll_salary_scale.activate_category') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('payroll_salary_scale.dashboard') }}</a></li>
|
||||
<li><a href="/salary_scales/index">{{ __('payroll_salary_scale.salary_scale') }}</a></li>
|
||||
<li class="active">{{ __('payroll_salary_scale.activate') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('payroll::payroll_salary_scales.menu')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="white-box">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('payroll_salary_scale.salary_scale_name') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($scales as $scale)
|
||||
<tr>
|
||||
<td>{{ $scale->name }}</td>
|
||||
<td>
|
||||
{{ Form::model($scale->id ,['method' => 'POST', 'route' => ['payroll_salary_scales.activate', $scale->id]]) }}
|
||||
<button type="submit" class="btn btn-warning" onclick="return confirm('<?php echo __('payroll_salary_scale.are_you_sure');?>')"><i class="fa fa-check"></i> {{ __('payroll_salary_scale.activate') }}</button>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.flash.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/pdfmake.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/vfs_fonts.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.html5.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.print.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'pdf', 'print'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+106
@@ -0,0 +1,106 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">{{ __('payroll_salary_scale.salary_scale') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('payroll_salary_scale.dashboard') }}</a></li>
|
||||
<li><a href="/salary_scales/index">{{ __('payroll_salary_scale.salary_scale') }}</a></li>
|
||||
<li class="active">{{ __('payroll_salary_scale.view') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('payroll::payroll_salary_scales.menu')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="white-box">
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('payroll_salary_scale.salary_scale_name') }}</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($scales as $scale)
|
||||
<tr>
|
||||
<td>{{ $scale->name }}</td>
|
||||
<td>
|
||||
<a href="/payroll_salary_scales/{{ $scale->id }}/edit/" class="btn btn-info"><i class="fa fa-pencil"></i> {{ __('payroll_salary_scale.edit') }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::model($scale->id ,['method' => 'DELETE', 'route' => ['payroll_salary_scales.destroy', $scale->id]]) }}
|
||||
<button type="submit" class="btn btn-danger" onclick="return confirm('<?php echo __('payroll_salary_scale.are_you_sure');?>')"><i class="fa fa-trash"></i> {{ __('payroll_salary_scale.delete') }}</button>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.flash.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/pdfmake.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/vfs_fonts.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.html5.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.print.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
'copy', 'csv', {
|
||||
extend: 'pdf',
|
||||
exportOptions: {
|
||||
columns: [0]
|
||||
},
|
||||
title: 'Payroll Categories'
|
||||
},
|
||||
{
|
||||
extend: 'print',
|
||||
exportOptions: {
|
||||
columns: [0]
|
||||
},
|
||||
title: 'Payroll Categories'
|
||||
},
|
||||
{
|
||||
extend: 'excel',
|
||||
exportOptions: {
|
||||
columns: [0]
|
||||
},
|
||||
title: 'Payroll Categories'
|
||||
}
|
||||
]
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<a href="{{ route('payroll_salary_scales.create') }}" class="nav-item btn btn-success ti-plus"> {{ __('payroll_salary_scale.add_scale') }}</a>
|
||||
<a href="{{ route('payroll_salary_scales.index') }}" class="nav-item btn btn-primary ti-pencil"> {{ __('payroll_salary_scale.view_category') }}</a>
|
||||
<a href="{{ route('payroll_salary_scales.inactive') }}" class="nav-item btn btn-warning ti-pencil"> {{ __('payroll_salary_scale.inactive_category') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,375 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css"/>
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">{{ __('payroll.payroll_schedules') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('payroll.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('payroll.finance_home') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> {{ __('payroll.payroll_schedules') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('payroll::payroll.menu')
|
||||
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
|
||||
{{ Form::open(['route' => 'payroll_schedules.create']) }}
|
||||
|
||||
<h3>{{ __('payroll.filter_by_category') }}</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
{{ Form::label('payroll_category',__('payroll.payroll_category')) }}
|
||||
{{ Form::select('payroll_category',$payroll_categories,'',['class' => 'form-control compulsory','required']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group" style="margin-top: 25px;">
|
||||
{{ Form::submit(__('investigations.search'), ['class'=>'btn btn-success']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::close() }}
|
||||
|
||||
@if(count($employees) > 0)
|
||||
<hr>
|
||||
|
||||
<h3>{{ __('payroll.payroll_schedule_details') }}</h3>
|
||||
|
||||
{{ Form::open(['route' => 'payroll_schedules.save_schedule', 'data-toggle' => 'validator']) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('name', __('payroll.payroll_schedule_name')) }}
|
||||
{{ Form::text('name','',['class' => 'form-control compulsory', 'required']) }}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
{{ Form::label('pay_year',__('payroll.payment_year')) }}
|
||||
{{ Form::select('pay_year',$years,'',['class' => 'form-control compulsory','required']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('salaries_expense_account',__('payroll.salaries_expenses_account')) }}
|
||||
{{ Form::select('salaries_expense_account',$expense_accounts,'',['class' => 'form-control compulsory','required']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('salaries_payable_account',__('payroll.salaries_payable_account')) }}
|
||||
{{ Form::select('salaries_payable_account',$payable_accounts,'',['class' => 'form-control compulsory','required']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
{{ Form::label('pay_month',__('payroll.payment_month')) }}
|
||||
{{ Form::select('pay_month',$months,'',['class' => 'form-control compulsory','required']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('tax_expense_account',__('payroll.tax_expense_account')) }}
|
||||
{{ Form::select('tax_expense_account',$expense_accounts,'',['class' => 'form-control compulsory','required']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('tax_payable_account',__('payroll.tax_payable_account')) }}
|
||||
{{ Form::select('tax_payable_account',$payable_accounts,'',['class' => 'form-control compulsory','required']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
{{ Form::label('due_date', __('payroll.due_date')) }}
|
||||
{{ Form::text('due_date','',['class' => 'form-control compulsory', 'readonly', 'required', 'id'=>'due_date']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('social_security_expense_account',__('payroll.social_security_expense_account')) }}
|
||||
{{ Form::select('social_security_expense_account',$expense_accounts,'',['class' => 'form-control compulsory','required']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('social_security_payable_account',__('payroll.social_security_payable_account')) }}
|
||||
{{ Form::select('social_security_payable_account',$payable_accounts,'',['class' => 'form-control compulsory','required']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('memo', __('payroll.memo')) }}
|
||||
<textarea name="memo" placeholder="Memo" class="form-control compulsory" required rows="5"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>{{ __('payroll.employee_name') }}</th>
|
||||
<th>{{ __('payroll.payroll_category') }}</th>
|
||||
<th>{{ __('payroll.basic_pay') }}</th>
|
||||
<th>{{ __('payroll.allowances') }}</th>
|
||||
<th>{{ __('payroll.gross_pay') }}</th>
|
||||
<th>{{ __('payroll.tax_amount') }}</th>
|
||||
<th>{{ __('payroll.social_security_amount') }}</th>
|
||||
<th>{{ __('payroll.deductions') }}</th>
|
||||
<th>{{ __('payroll.total_deductions') }}</th>
|
||||
<th>{{ __('payroll.net_pay') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($employees as $employee)
|
||||
<tr id="row_{{ $employee->id }}" class="to_remove">
|
||||
<td>
|
||||
<input type="checkbox" id="chk" class="employee_check" value="{{ $employee->id }}" />
|
||||
{{ Form::hidden('employee_id[]', $employee->id) }}
|
||||
</td>
|
||||
<td>{{ $employee->first_name . ' ' . $employee->last_name }} ({{ $employee->number }})</td>
|
||||
<td>{{ $payroll_categories[$employee->payroll_category] }}</td>
|
||||
{{ Form::hidden('payroll_category[]', $employee->payroll_category) }}
|
||||
@php
|
||||
$deductions = 0;
|
||||
$allowances = 0;
|
||||
$deductions_arr = [];
|
||||
$allowances_arr = [];
|
||||
|
||||
$allow_deducts = \Illuminate\Support\Facades\DB::table('payroll_allowances_or_deductions')->where('billed', 0)->where('member_id', $employee->id)->whereNull('deleted_at')->get();
|
||||
|
||||
foreach ($allow_deducts as $allow_deduct) {
|
||||
if ($allow_deduct->type == 0) {
|
||||
$allowances += $allow_deduct->amount;
|
||||
$allowances_arr[] = $allow_deduct->id;
|
||||
} else {
|
||||
$deductions += $allow_deduct->amount;
|
||||
$deductions_arr[] = $allow_deduct->id;
|
||||
}
|
||||
}
|
||||
|
||||
$gross_pay = $employee->basic_pay + $allowances;
|
||||
$total_deductions = $employee->tax_amount + $employee->social_security_amount + $deductions;
|
||||
@endphp
|
||||
{{ Form::hidden('allowances_arr[]', implode(',', $allowances_arr), ['id' => 'allowances_arr_' . $employee->id]) }}
|
||||
{{ Form::hidden('deductions_arr[]', implode(',', $deductions_arr), ['id' => 'deductions_arr_' . $employee->id]) }}
|
||||
|
||||
<td>{{ Form::number('basic_pay[]', $employee->basic_pay, ['class' => 'form-control compulsory basic_pay_field', 'required', 'id' => 'basic_pay_' . $employee->id]) }}</td>
|
||||
<td>
|
||||
{{ Form::number('allowance[]', $allowances, ['class' => 'form-control compulsory allowance_field', 'readonly', 'required', 'id' => 'allowance_' . $employee->id]) }}
|
||||
|
||||
<a href="#row_{{ $employee->id }}" onclick="view_allowances({{ $employee->id }})">View Allowances</a>
|
||||
</td>
|
||||
<td>{{ Form::number('gross_pay[]', $gross_pay, ['class' => 'form-control compulsory gross_pay_field', 'readonly', 'required', 'id' => 'gross_pay_' . $employee->id]) }}</td>
|
||||
<td>{{ Form::number('tax[]', $employee->tax_amount, ['class' => 'form-control compulsory tax_field', 'required', 'id' => 'tax_' . $employee->id]) }}</td>
|
||||
<td>{{ Form::number('social_security[]', $employee->social_security_amount, ['class' => 'form-control compulsory social_security_field', 'required', 'id' => 'social_security_' . $employee->id]) }}</td>
|
||||
<td>
|
||||
{{ Form::number('deductions[]', $deductions, ['class' => 'form-control compulsory deductions_field', 'readonly', 'required', 'id' => 'deductions_' . $employee->id]) }}
|
||||
|
||||
<a href="#row_{{ $employee->id }}" onclick="view_deductions({{ $employee->id }})">View Deductions</a>
|
||||
</td>
|
||||
<td>{{ Form::number('total_deductions[]', $total_deductions, ['class' => 'form-control compulsory total_deductions_field', 'readonly', 'required', 'id' => 'total_deductions_' . $employee->id]) }}</td>
|
||||
<td>{{ Form::number('net_pay[]', ($gross_pay - $total_deductions), ['class' => 'form-control compulsory net_pay_field', 'readonly', 'required', 'id' => 'net_pay_' . $employee->id]) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
<tr>
|
||||
<td><b>TOTALS</b></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td id="basic_pay_total"></td>
|
||||
<td id="allowance_total"></td>
|
||||
<td id="gross_pay_total"></td>
|
||||
<td id="tax_total"></td>
|
||||
<td id="social_security_total"></td>
|
||||
<td id="deductions_total"></td>
|
||||
<td id="total_deductions_total"></td>
|
||||
<td id="net_pay_total"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<input type="button" id="confirm_selection_btn" class="btn btn-success btn-rounded pull-right" value="{{ __('payroll.confirm_selection') }}" />
|
||||
<button class="btn btn-success btn-rounded pull-right" style="display: none;" id="submit_selection_btn">{{ __('payroll.submit') }}</button>
|
||||
|
||||
<br><br>
|
||||
|
||||
{{ Form::close() }}
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="modal" id="modal_allowance_details" tabindex="-1" role="dialog" aria-labelledby="debt_plan_modal_label" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Allowance/Deduction Details</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('payroll.type') }}</th>
|
||||
<th>{{ __('payroll.amount') }}</th>
|
||||
<th>{{ __('payroll.is_recurring') }}</th>
|
||||
<th>{{ __('payroll.recurring_final_date') }}</th>
|
||||
<th>{{ __('payroll.reason') }}</th>
|
||||
<th>{{ __('payroll.created_by') }}</th>
|
||||
<th>{{ __('payroll.created_on') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="allowance_deductions_details_body"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function (){
|
||||
calculate_totals();
|
||||
});
|
||||
|
||||
function view_allowances(id) {
|
||||
let ids = $('#allowances_arr_' + id).val();
|
||||
|
||||
if (ids !== '') {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "/payroll_schedules/get_allowance_deductions_details",
|
||||
data: {'ids':ids},
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
$('#allowance_deductions_details_body').html(result);
|
||||
$('#modal_allowance_details').modal('show')
|
||||
}
|
||||
});
|
||||
} else {
|
||||
alert('No allowances available');
|
||||
}
|
||||
}
|
||||
|
||||
function view_deductions(id) {
|
||||
let ids = $('#deductions_arr_' + id).val();
|
||||
|
||||
if (ids !== '') {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "/payroll_schedules/get_allowance_deductions_details",
|
||||
data: {'ids':ids},
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
$('#allowance_deductions_details_body').html(result);
|
||||
$('#modal_allowance_details').modal('show')
|
||||
}
|
||||
});
|
||||
} else {
|
||||
alert('No allowances available');
|
||||
}
|
||||
}
|
||||
|
||||
function calculate_totals() {
|
||||
let basic_pay_total = 0;
|
||||
let allowance_total = 0;
|
||||
let gross_pay_total = 0;
|
||||
let tax_total = 0;
|
||||
let social_security_total = 0;
|
||||
let deductions_total = 0;
|
||||
let total_deductions_total = 0;
|
||||
let net_pay_total = 0;
|
||||
|
||||
$(".basic_pay_field").each(function(){
|
||||
basic_pay_total += +$(this).val();
|
||||
});
|
||||
|
||||
$(".allowance_field").each(function(){
|
||||
allowance_total += +$(this).val();
|
||||
});
|
||||
|
||||
$(".gross_pay_field").each(function(){
|
||||
gross_pay_total += +$(this).val();
|
||||
});
|
||||
|
||||
$(".tax_field").each(function(){
|
||||
tax_total += +$(this).val();
|
||||
});
|
||||
|
||||
$(".social_security_field").each(function(){
|
||||
social_security_total += +$(this).val();
|
||||
});
|
||||
|
||||
$(".deductions_field").each(function(){
|
||||
deductions_total += +$(this).val();
|
||||
});
|
||||
|
||||
$(".total_deductions_field").each(function(){
|
||||
total_deductions_total += +$(this).val();
|
||||
});
|
||||
|
||||
$(".net_pay_field").each(function(){
|
||||
net_pay_total += +$(this).val();
|
||||
});
|
||||
|
||||
$('#basic_pay_total').text(numberWithCommas(basic_pay_total));
|
||||
$('#allowance_total').text(numberWithCommas(allowance_total));
|
||||
$('#gross_pay_total').text(numberWithCommas(gross_pay_total));
|
||||
$('#tax_total').text(numberWithCommas(tax_total));
|
||||
$('#social_security_total').text(numberWithCommas(social_security_total));
|
||||
$('#deductions_total').text(numberWithCommas(deductions_total));
|
||||
$('#total_deductions_total').text(numberWithCommas(total_deductions_total));
|
||||
$('#net_pay_total').text(numberWithCommas(net_pay_total));
|
||||
}
|
||||
|
||||
function numberWithCommas(x) {
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
|
||||
$('#due_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd/mm/yyyy'
|
||||
});
|
||||
|
||||
$('.employee_check').click(function() {
|
||||
if($(this).is(':checked')){
|
||||
$(this).parent().parent().css({'background-color': '#FFFF99'});
|
||||
$('#row_' + $(this).val()).removeClass('to_remove');
|
||||
} else{
|
||||
$(this).parent().parent().css({'background-color': '#fff'});
|
||||
$('#row_' + $(this).val()).addClass('to_remove');
|
||||
}
|
||||
});
|
||||
|
||||
$("#confirm_selection_btn").click(function (e) {
|
||||
let is_employee_selected = $('input:checkbox').is(':checked');
|
||||
|
||||
if (is_employee_selected) {
|
||||
$(".to_remove").remove();
|
||||
$(".employee_check").attr("disabled", "disabled");
|
||||
|
||||
$('#submit_selection_btn').show();
|
||||
$('#confirm_selection_btn').hide();
|
||||
calculate_totals();
|
||||
} else {
|
||||
e.preventDefault();
|
||||
alert("Please select an employee before continuing");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@@ -0,0 +1,160 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">{{ __('payroll.payroll_schedules') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('payroll.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('payroll.finance_home') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> {{ __('payroll.payroll_schedules') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('payroll::payroll.menu')
|
||||
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
|
||||
<a class="btn btn-success btn-sm pull-right" target="_blank" href="/payroll_schedules/print_details/{{ $schedule->id }}">Print</a>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<tr>
|
||||
<th><b>{{ __('payroll.payroll_schedule_name') }}</b></th>
|
||||
<td>{{ $schedule->name }}</td>
|
||||
<th><b>{{ __('payroll.created_by') }}</b></th>
|
||||
<td>{{ get_full_name($schedule->created_by, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
<th><b>{{ __('payroll.created_at') }}</b></th>
|
||||
<td>{{ streamline_date_time($schedule->created_at) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><b>{{ __('payroll.payment_year') }}</b></th>
|
||||
<td>{{ $schedule->pay_year }}</td>
|
||||
<th><b>{{ __('payroll.payment_month') }}</b></th>
|
||||
<td>{{ $schedule->pay_month }}</td>
|
||||
<th><b>{{ __('payroll.due_date') }}</b></th>
|
||||
<td>{{ streamline_date($schedule->due_date) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><b>{{ __('payroll.salaries_expenses_account') }}</b></th>
|
||||
<td>{{ $expense_accounts[$schedule->salaries_expense_account] }}</td>
|
||||
<th><b>{{ __('payroll.tax_expense_account') }}</b></th>
|
||||
<td>{{ $expense_accounts[$schedule->tax_expense_account] }}</td>
|
||||
<th><b>{{ __('payroll.social_security_expense_account') }}</b></th>
|
||||
<td>{{ $expense_accounts[$schedule->social_security_expense_account] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><b>{{ __('payroll.salaries_payable_account') }}</b></th>
|
||||
<td>{{ $payable_accounts[$schedule->salaries_payable_account] }}</td>
|
||||
<th><b>{{ __('payroll.tax_payable_account') }}</b></th>
|
||||
<td>{{ $payable_accounts[$schedule->tax_payable_account] }}</td>
|
||||
<th><b>{{ __('payroll.social_security_payable_account') }}</b></th>
|
||||
<td>{{ $payable_accounts[$schedule->social_security_payable_account] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><b>{{ __('payroll.memo') }}</b></th>
|
||||
<td colspan="5">{{ $schedule->memo }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<br><br>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('payroll.employee_name') }}</th>
|
||||
<th>{{ __('payroll.payroll_category') }}</th>
|
||||
<th>{{ __('payroll.basic_pay') }}</th>
|
||||
<th>{{ __('payroll.allowances') }}</th>
|
||||
<th>{{ __('payroll.gross_pay') }}</th>
|
||||
<th>{{ __('payroll.tax_amount') }}</th>
|
||||
<th>{{ __('payroll.social_security_amount') }}</th>
|
||||
<th>{{ __('payroll.deductions') }}</th>
|
||||
<th>{{ __('payroll.total_deductions') }}</th>
|
||||
<th>{{ __('payroll.net_pay') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$payroll_category_arr = explode(",", $schedule->payroll_category);
|
||||
$employee_id_arr = explode(",", $schedule->employee_id);
|
||||
$basic_pay_arr = explode(",", $schedule->basic_pay);
|
||||
$allowances_arr = explode(",", $schedule->allowances);
|
||||
$gross_pay_arr = explode(",", $schedule->gross_pay);
|
||||
$tax_amount_arr = explode(",", $schedule->tax_amount);
|
||||
$social_security_amount_arr = explode(",", $schedule->social_security_amount);
|
||||
$deductions_arr = explode(",", $schedule->deductions);
|
||||
$total_deductions_arr = explode(",", $schedule->total_deductions);
|
||||
$net_pay_arr = explode(",", $schedule->net_pay);
|
||||
|
||||
$basic_pay_total = 0;
|
||||
$allowances_total = 0;
|
||||
$gross_pay_total = 0;
|
||||
$tax_amount_total = 0;
|
||||
$social_security_amount_total = 0;
|
||||
$deductions_total = 0;
|
||||
$total_deductions_total = 0;
|
||||
$net_pay_total = 0;
|
||||
@endphp
|
||||
|
||||
@for($i = 0; $i < count($employee_id_arr); $i++)
|
||||
@php
|
||||
$employee = \Illuminate\Support\Facades\DB::table('payrolls')->where('id', $employee_id_arr[$i])->first();
|
||||
$patient = \Illuminate\Support\Facades\DB::table('patients')->where('id', $employee->patient_id)->first();
|
||||
|
||||
$basic_pay_total += $basic_pay_arr[$i];
|
||||
$allowances_total += $allowances_arr[$i];
|
||||
$gross_pay_total += $gross_pay_arr[$i];
|
||||
$tax_amount_total += $tax_amount_arr[$i];
|
||||
$social_security_amount_total += $social_security_amount_arr[$i];
|
||||
$deductions_total += $deductions_arr[$i];
|
||||
$total_deductions_total += $total_deductions_arr[$i];
|
||||
$net_pay_total += $net_pay_arr[$i];
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $patient->first_name . ' ' . $patient->last_name }} ({{ $patient->number }})</td>
|
||||
<td>{{ $payroll_categories[$employee->payroll_category] }}</td>
|
||||
{{ Form::hidden('payroll_category[]', $employee->payroll_category) }}
|
||||
|
||||
<td>{{ ugandan_shillings($basic_pay_arr[$i]) }}</td>
|
||||
<td>{{ ugandan_shillings($allowances_arr[$i]) }}</td>
|
||||
<td>{{ ugandan_shillings($gross_pay_arr[$i]) }}</td>
|
||||
<td>{{ ugandan_shillings($tax_amount_arr[$i]) }}</td>
|
||||
<td>{{ ugandan_shillings($social_security_amount_arr[$i]) }}</td>
|
||||
<td>{{ ugandan_shillings($deductions_arr[$i]) }}</td>
|
||||
<td>{{ ugandan_shillings($total_deductions_arr[$i]) }}</td>
|
||||
<td>{{ ugandan_shillings($net_pay_arr[$i]) }}</td>
|
||||
</tr>
|
||||
@endfor
|
||||
|
||||
<tr>
|
||||
<td><b>TOTALS</b></td>
|
||||
<td></td>
|
||||
<td>{{ ugandan_shillings($basic_pay_total) }}</td>
|
||||
<td>{{ ugandan_shillings($allowances_total) }}</td>
|
||||
<td>{{ ugandan_shillings($gross_pay_total) }}</td>
|
||||
<td>{{ ugandan_shillings($tax_amount_total) }}</td>
|
||||
<td>{{ ugandan_shillings($social_security_amount_total) }}</td>
|
||||
<td>{{ ugandan_shillings($deductions_total) }}</td>
|
||||
<td>{{ ugandan_shillings($total_deductions_total) }}</td>
|
||||
<td>{{ ugandan_shillings($net_pay_total) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
@endpush
|
||||
@@ -0,0 +1,88 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">{{ __('payroll.payroll_schedules') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('payroll.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('payroll.finance_home') }}</a></li>
|
||||
<li class="active"><i class="fa fa-eye"></i> {{ __('payroll.payroll_schedules') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('payroll::payroll.menu')
|
||||
|
||||
<div class="white-box">
|
||||
@include('flash::message')
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('payroll.payroll_schedule_name') }}</th>
|
||||
<th>{{ __('payroll.pay_period') }}</th>
|
||||
<th>{{ __('payroll.total_net_pay') }}</th>
|
||||
<th>{{ __('payroll.due_date') }}</th>
|
||||
<th>{{ __('payroll.payment_date') }}</th>
|
||||
<th>{{ __('payroll.created_at') }}</th>
|
||||
<th>{{ __('payroll.created_by') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $totals = 0; @endphp
|
||||
@foreach($schedules as $schedule)
|
||||
<tr>
|
||||
<td>{{ $schedule->name }}</td>
|
||||
<td>{{ $schedule->pay_month }} {{ $schedule->pay_year }}</td>
|
||||
@php
|
||||
$total_net_pay = array_sum(explode(",", $schedule->net_pay));
|
||||
$totals += $total_net_pay;
|
||||
@endphp
|
||||
<td>{{ ugandan_shillings($total_net_pay) }}</td>
|
||||
<td>{{ streamline_date($schedule->due_date) }}</td>
|
||||
<td>{{ $schedule->payment_date ? streamline_date($schedule->payment_date) : 'Not Paid' }}</td>
|
||||
<td>{{ get_full_name($schedule->created_by, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
<td>{{ streamline_date_time($schedule->created_at) }}</td>
|
||||
<td><a href="/payroll_schedules/details/{{ $schedule->id }}" class="btn btn-sm btn-success">Details</a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<h4>{{ __('payroll.total_net_pay') }}: {{ ugandan_shillings($totals) }}</h4>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.flash.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/pdfmake.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/vfs_fonts.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.html5.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.print.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
pageLength: 100,
|
||||
buttons: ['copy', 'csv', 'pdf', 'print']
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+165
@@ -0,0 +1,165 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ app()->getLocale() }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('uploads/streamline/color/streamline_icon-02.png') }}">
|
||||
<title>{{ config('app.name', 'Stre@mline') }}</title>
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
body{
|
||||
/*font-size: 1.2em;*/
|
||||
}
|
||||
|
||||
thead {
|
||||
/*display: table-header-group;*/
|
||||
}
|
||||
|
||||
tfoot {
|
||||
/*display: table-row-group;*/
|
||||
}
|
||||
|
||||
tr {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
@include('layouts.header_pdf_print')
|
||||
|
||||
<table class="table table-sm">
|
||||
<tr>
|
||||
<th><b>{{ __('payroll.payroll_schedule_name') }}</b></th>
|
||||
<td>{{ $schedule->name }}</td>
|
||||
<th><b>{{ __('payroll.created_by') }}</b></th>
|
||||
<td>{{ get_full_name($schedule->created_by, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
<th><b>{{ __('payroll.created_at') }}</b></th>
|
||||
<td>{{ streamline_date_time($schedule->created_at) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><b>{{ __('payroll.payment_year') }}</b></th>
|
||||
<td>{{ $schedule->pay_year }}</td>
|
||||
<th><b>{{ __('payroll.payment_month') }}</b></th>
|
||||
<td>{{ $schedule->pay_month }}</td>
|
||||
<th><b>{{ __('payroll.due_date') }}</b></th>
|
||||
<td>{{ streamline_date($schedule->due_date) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><b>{{ __('payroll.salaries_expenses_account') }}</b></th>
|
||||
<td>{{ $expense_accounts[$schedule->salaries_expense_account] }}</td>
|
||||
<th><b>{{ __('payroll.tax_expense_account') }}</b></th>
|
||||
<td>{{ $expense_accounts[$schedule->tax_expense_account] }}</td>
|
||||
<th><b>{{ __('payroll.social_security_expense_account') }}</b></th>
|
||||
<td>{{ $expense_accounts[$schedule->social_security_expense_account] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><b>{{ __('payroll.salaries_payable_account') }}</b></th>
|
||||
<td>{{ $payable_accounts[$schedule->salaries_payable_account] }}</td>
|
||||
<th><b>{{ __('payroll.tax_payable_account') }}</b></th>
|
||||
<td>{{ $payable_accounts[$schedule->tax_payable_account] }}</td>
|
||||
<th><b>{{ __('payroll.social_security_payable_account') }}</b></th>
|
||||
<td>{{ $payable_accounts[$schedule->social_security_payable_account] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><b>{{ __('payroll.memo') }}</b></th>
|
||||
<td colspan="5">{{ $schedule->memo }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br><br>
|
||||
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('payroll.employee_name') }}</th>
|
||||
<th>{{ __('payroll.payroll_category') }}</th>
|
||||
<th>{{ __('payroll.basic_pay') }}</th>
|
||||
<th>{{ __('payroll.allowances') }}</th>
|
||||
<th>{{ __('payroll.gross_pay') }}</th>
|
||||
<th>{{ __('payroll.tax_amount') }}</th>
|
||||
<th>{{ __('payroll.social_security_amount') }}</th>
|
||||
<th>{{ __('payroll.deductions') }}</th>
|
||||
<th>{{ __('payroll.total_deductions') }}</th>
|
||||
<th>{{ __('payroll.net_pay') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$payroll_category_arr = explode(",", $schedule->payroll_category);
|
||||
$employee_id_arr = explode(",", $schedule->employee_id);
|
||||
$basic_pay_arr = explode(",", $schedule->basic_pay);
|
||||
$allowances_arr = explode(",", $schedule->allowances);
|
||||
$gross_pay_arr = explode(",", $schedule->gross_pay);
|
||||
$tax_amount_arr = explode(",", $schedule->tax_amount);
|
||||
$social_security_amount_arr = explode(",", $schedule->social_security_amount);
|
||||
$deductions_arr = explode(",", $schedule->deductions);
|
||||
$total_deductions_arr = explode(",", $schedule->total_deductions);
|
||||
$net_pay_arr = explode(",", $schedule->net_pay);
|
||||
|
||||
$basic_pay_total = 0;
|
||||
$allowances_total = 0;
|
||||
$gross_pay_total = 0;
|
||||
$tax_amount_total = 0;
|
||||
$social_security_amount_total = 0;
|
||||
$deductions_total = 0;
|
||||
$total_deductions_total = 0;
|
||||
$net_pay_total = 0;
|
||||
@endphp
|
||||
|
||||
@for($i = 0; $i < count($employee_id_arr); $i++)
|
||||
@php
|
||||
$employee = \Illuminate\Support\Facades\DB::table('payrolls')->where('id', $employee_id_arr[$i])->first();
|
||||
$patient = \Illuminate\Support\Facades\DB::table('patients')->where('id', $employee->patient_id)->first();
|
||||
|
||||
$basic_pay_total += $basic_pay_arr[$i];
|
||||
$allowances_total += $allowances_arr[$i];
|
||||
$gross_pay_total += $gross_pay_arr[$i];
|
||||
$tax_amount_total += $tax_amount_arr[$i];
|
||||
$social_security_amount_total += $social_security_amount_arr[$i];
|
||||
$deductions_total += $deductions_arr[$i];
|
||||
$total_deductions_total += $total_deductions_arr[$i];
|
||||
$net_pay_total += $net_pay_arr[$i];
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $patient->first_name . ' ' . $patient->last_name }} ({{ $patient->number }})</td>
|
||||
<td>{{ $payroll_categories[$employee->payroll_category] }}</td>
|
||||
{{ Form::hidden('payroll_category[]', $employee->payroll_category) }}
|
||||
|
||||
<td>{{ ugandan_shillings($basic_pay_arr[$i]) }}</td>
|
||||
<td>{{ ugandan_shillings($allowances_arr[$i]) }}</td>
|
||||
<td>{{ ugandan_shillings($gross_pay_arr[$i]) }}</td>
|
||||
<td>{{ ugandan_shillings($tax_amount_arr[$i]) }}</td>
|
||||
<td>{{ ugandan_shillings($social_security_amount_arr[$i]) }}</td>
|
||||
<td>{{ ugandan_shillings($deductions_arr[$i]) }}</td>
|
||||
<td>{{ ugandan_shillings($total_deductions_arr[$i]) }}</td>
|
||||
<td>{{ ugandan_shillings($net_pay_arr[$i]) }}</td>
|
||||
</tr>
|
||||
@endfor
|
||||
|
||||
<tr>
|
||||
<td><b>TOTALS</b></td>
|
||||
<td></td>
|
||||
<td>{{ ugandan_shillings($basic_pay_total) }}</td>
|
||||
<td>{{ ugandan_shillings($allowances_total) }}</td>
|
||||
<td>{{ ugandan_shillings($gross_pay_total) }}</td>
|
||||
<td>{{ ugandan_shillings($tax_amount_total) }}</td>
|
||||
<td>{{ ugandan_shillings($social_security_amount_total) }}</td>
|
||||
<td>{{ ugandan_shillings($deductions_total) }}</td>
|
||||
<td>{{ ugandan_shillings($total_deductions_total) }}</td>
|
||||
<td>{{ ugandan_shillings($net_pay_total) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user