Salary Management
{{-- FILTER FORM --}}
{{-- SALARY FORM FOR EACH WORKER --}}
| Worker |
Gross Salary |
Allowance |
Deduction |
Net Salary |
Action |
@foreach($workers as $worker)
@php
$sal = $worker->monthly_salary;
$allowance = app\Models\Allowance::where('worker_id','=',$worker->id)->where('year','=',$year)->where('month','=',$month)->sum('amount');
$deduction = app\Models\Deduction::where('worker_id','=',$worker->id)->where('year','=',$year)->where('month','=',$month)->sum('amount');
@endphp
@csrf
| {{ $worker->name }} |
{{ $sal+$allowance }} |
{{ $allowance }} |
{{ $deduction }} |
{{ $sal+$allowance-$deduction }}
|
@if($sal)
Print
@endif
|
@endforeach
@endsection