@extends('layouts.report') @section('content') @if(isset($reportData))
@if($reportData['data'] && ($reportData['data'])->count() > 0) @if(isset($reportData['business']))

@capitalize($reportData['business'])

@endif

Customer incomes

@if(isset($reportData['from_date']) && isset($reportData['to_date']))

From: @date($reportData['from_date']) - To: @date($reportData['to_date'])

@endif @foreach ($reportData['data'] as $customer) @foreach ($customer['transactions'] as $tran) @endforeach @endforeach
Date Record type Amount Reference Note
Customer: {{$customer->company_name}}
@date($tran['date']) {{ $tran->recordType->description }} @currency($tran['signed_amount']) {{ $tran['reference'] }} {{ $tran['description'] }}
Total of {{$customer->company_name}} @currency($customer->transactions->sum('signed_amount'))
Total @currency($reportData['total'])
@else

@capitalize($reportData['business'])

Transactions list

From: @date($reportData['from_date']) - To: @date($reportData['to_date'])
Date Record type Amount Reference Note
No transactions
@endif
@endif @stop