@extends('backend.layouts.admin') @section('main-content') @php // $total_income = $incomes->where('payment_status', 1)->sum('amount'); $total_payable_paid = $payables->where('amount_status', 'Paid')->sum('payable_amount'); $total_payable_unpaid = $payables->where('amount_status', 'Unpaid')->sum('payable_amount'); $total_expense = $expenses->sum('amount'); $total_receivable_received = $receivable->where('amount_status', 'Paid')->sum('payable_amount'); $total_receivable_pending = $receivable->where('amount_status', 'Unpaid')->sum('payable_amount'); @endphp
Transaction Details
@if(request()->query->count()>0)   Reset @endif
Income
{{number_format($total_income)}}  

{{-- --}}
Expense
{{number_format($total_expense)}} 

Profit/Loss
{{number_format($total_income-($total_expense+$total_payable_paid))}} 

@forelse($incomes->concat($expenses)->sortByDesc('created_at') as $row) @empty @endforelse
Sr No. Date Income From Booking ID/Exp ID Amount  Payment Method Expense (Dept,Type)
{{$loop->iteration}} {{date('d-m-Y',strtotime($row->created_at))}} @if(isset($row->user->role)) @if($row->user->role == 'agent') B2B @else B2C @endif @else Expense @endif @if( !$row instanceof App\Models\finance\Expense) {{ $row->uid}} @else EXP-{{ str_pad($row->id, 4 , '0', STR_PAD_LEFT) }} @endif {{$row->amount?number_format($row->amount):''}} {{ $row->payment_method ?? $row->bank->name ?? '' }} @if( $row instanceof App\Models\finance\Expense && $row->type) {{ $row->department->name ?? '' }} - {{ $row->type->name ?? '' }} @else Income @endif
No data found
@endsection @push('scripts') @endpush