@extends('adminlte::page') @section('title', 'Dashboard') @section('content')
Paid invoices Add
@foreach($brokers as $broker) @if($broker->name!='Fulger') {{$broker->name}} @foreach($broker->paidInvoices as $invoice) @endforeach
Date USD Invoice CAD Invoice Status Edit Delete
Commision {{$broker->profit()['profit_usd']}} {{$broker->profit()['profit_cad']}}
Amount due {{$broker->profit()['profit_usd']-\App\PaidInvoice::where('broker_id',$broker->id)->sum('usd')}} {{$broker->profit()['profit_cad']-\App\PaidInvoice::where('broker_id',$broker->id)->sum('cad')}}
Total invoices {{\App\PaidInvoice::where('broker_id',$broker->id)->sum('usd')}} {{\App\PaidInvoice::where('broker_id',$broker->id)->sum('cad')}}
{{$invoice->date->format('m/d/Y')}} {{$invoice->usd}} @if($invoice->invoice_usd!='') @else Not uploaded @endif {{$invoice->cad}} @if($invoice->invoice_cad!='') @else Not uploaded @endif @if($invoice->paid=='Y') Paid@else Not paid@endif Edit
@csrf @method('DELETE')
@else @if($broker->name!='Fulger')

{{$broker->name}} has no paid invoices yet!

@endif @endif @endforeach
@stop @section('css') @section('js') @stop