@php $shared_total = 0;@endphp
@if(isset($salaryRevenue))
Receipt Expense
# |
Name |
F/Name |
Position |
Amount |
Notes |
Date |
@php $salary_total = 0; @endphp
@foreach($salaryRevenue as $row)
@php
$emp = App\Models\Employee::where('id', $row->employee_id)->first();
$teacher = App\Models\Teacher::where('id', $row->teacher_id)->first();
$account = App\Models\ChartofAccount::where('id', $row->account_id)->first();
$salary_total += $row->amount;
$name = $emp != null ? $emp->emp_fname : $teacher->name;
$fname = $emp != null ? $emp->emp_father_name : $teacher->name;
$job = $emp != null ? $emp->emp_job : 'Teacher';
@endphp
{{++$loop->index}} |
{{$name}} |
{{$fname}} |
{{$job}} |
{{$row->amount}} |
{{$row->title}} |
{{$row->timestamp}} |
@endforeach
Total: {{$salary_total}} |
@endif
@if(isset($shared))
Shared Dividends
# |
Name |
F/Name |
Percentage |
Amount |
Notes |
Date |
@foreach($shared as $row)
@php
$partner = App\Models\Partner::where('id', $row->partner_id)->first();
$shared_total += $row->shared_amount;
@endphp
{{++$loop->index}} |
{{$partner != null ? $partner->name : ''}} |
{{$partner != null ? $partner->father_name : ''}} |
{{$row->shared_percentage}} |
{{$row->shared_amount}} |
{{$row->description}} |
{{$row->date}} |
@endforeach
Total: {{$shared_total}} |
@endif
@if(isset($transactions))
Other Expenses
# |
Category |
Title |
Description |
Amount |
@php $other_total = 0; @endphp
@foreach($transactions as $row)
@php
$account = App\Models\ChartofAccount::where('id', $row->account_id)->first();
$other_total += $row->amount;
@endphp
{{++$loop->index}} |
{{$account->name}} |
{{$row->title}} |
{{$row->description}} |
{{$row->amount}} |
@endforeach
Total: {{$other_total}} |
@if(isset($voucherExpense))
Voucher Expenses
# |
Category |
Title |
Description |
Amount |
@php $voucher_total = 0; @endphp
@foreach($voucherExpense as $row)
@php
$account = App\Models\ChartofAccount::where('id', $row->account_id)->first();
$voucher_total += $row->amount;
@endphp
{{++$loop->index}} |
{{$account->name}} |
{{$row->title}} |
{{$row->description}} |
{{$row->amount}} |
@endforeach
Total: {{$voucher_total}} |
@endif
Total Expense |
{{$other_total + $salary_total + $voucher_total + $shared_total}} |