Currency: {{ $currency->symbol }}
Filters {{ __('Filters') }}
Start Date:
End Date:
Categories:
@foreach ($IncomeCategories as $category) @endforeach
Close
Excel
PDF
@forelse ($IncomeCategories->whereIn('id', $selectedCategories) as $category) @foreach ($category->categoryItems as $index => $categoryItem) @if ($index === 0) @endif @endforeach @empty @endforelse
Category Items Item Code Amount
{{ $category->name }} {{ $categoryItem->name }} {{ $categoryItem->sr_code }} @php $total = 0; @endphp @forelse ($categoryItem->financialExpense->where('created_at', '>=', $startDate)->where('created_at', '<=', $endDate) as $incomeItem) @php if ($currency->symbol == 'UGX') { $total += $incomeItem->amount; } else { $rate = App\Models\FinancialRate::withTrashed()->find($incomeItem->rate_id); if ($currency->id == $rate->base_currency_id) { $total += $incomeItem->amount / $rate->rate; } else { $total += $incomeItem->amount * $rate->rate; } } @endphp @empty

No income items

@endforelse {{-- {{ round($total, 2) }} --}} {{ number_format(round($total, 2), 2) }}
Total: @php $gtotal = 0; @endphp @foreach ($category->categoryItems as $categoryItem) @php $total = 0; @endphp @forelse ($categoryItem->financialExpense->where('created_at', '>=', $startDate)->where('created_at', '<=', $endDate) as $incomeItem) @php if ($currency->symbol == 'UGX') { $total += $incomeItem->amount; } else { $rate = App\Models\FinancialRate::withTrashed()->find($incomeItem->rate_id); if ($currency->id == $rate->base_currency_id) { $total += $incomeItem->amount / $rate->rate; } else { $total += $incomeItem->amount * $rate->rate; } } @endphp @empty @endforelse @php $gtotal += $total; @endphp @endforeach {{-- {{ round($gtotal, 2) }} --}} {{ number_format(round($gtotal, 2), 2) }}
No categories found