Report Expense

@php $salary_total = 0; $shared_total = 0; @endphp @if(isset($salaryRevenue))

Receipt Expense Report

{{-- --}} @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 @endforeach
#Slip#Name F/Name Position Amount Notes Date
{{++$loop->index}} {{$name}} {{$fname}} {{$job}} {{$row->amount}} {{$row->title}} {{$row->timestamp}}
Total: {{$salary_total}}
@endif @if(isset($shared))

Shared Dividends Report

@foreach($shared as $row) @php $partner = App\Models\Partner::where('id', $row->partner_id)->first(); $shared_total += $row->shared_amount; @endphp @endforeach
# Name F/Name Percentage Amount Notes Date
{{++$loop->index}} {{$partner != null ? $partner->name : ''}} {{$partner != null ? $partner->father_name : ''}} {{$row->shared_percentage}} {{$row->shared_amount}} {{$row->description}} {{$row->date}}
Total: {{$shared_total}}
@endif @if(isset($transactions))

Other Expenses Report

@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 @endforeach
# Category Title Description Date Amount
{{++$loop->index}} {{$account->name}} {{$row->title}} {{$row->description}} {{$row->timestamp}} {{$row->amount}}
Total: {{$other_total}}
@endif @if(isset($voucherExpense))

Voucher Expenses

@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 @endforeach
# Category Title Description Date Amount
{{++$loop->index}} {{$account->name}} {{$row->title}} {{$row->description}} {{$row->timestamp}} {{$row->amount}}
Total: {{$voucher_total}}
@endif
Total Expense {{$other_total + $salary_total + $voucher_total + $shared_total}}