mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-11 18:51:31 +00:00
161 lines
8.4 KiB
PHP
161 lines
8.4 KiB
PHP
@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
|