@extends('layouts.default') @section('title', trans('reports.standard.title.standardreports', ['type' => trans('reports.standard.collectionsreport')])) @section('new_button') {{-- // --}} @endsection @section('content')
{!! Form::open(['url'=>'/reports/standard/collections-reports']) !!} @include('accounts.reports.standard.date-filter-view') {!! Form::close() !!}

{{ trans('reports.standard.collectionsreport') }}

DATE TRANSACTION TYPE NUMBER DUE DATE DAYS ALMOST/OVER DUE AMOUNT
@php $gtotal = 0; @endphp @foreach($customers as $customer) @if(count($customer->invoices) > 0)

@php $total = 0; $invoices = $customer->invoices; @endphp @foreach ($invoices as $item) @php $total = $total + $item->amount; $start = Carbon\Carbon::now(); $end = Carbon\Carbon::parse($item->due_at); $diff = $start->diffInDays($end); @endphp @endforeach
{{ Carbon\Carbon::parse($item->invoiced_at)->format($date_format) }} Invoice {{ $item->invoice_number }} {{ Carbon\Carbon::parse($item->due_at)->format($date_format) }} {{ $diff }} @money($item->amount, 'USD', true)
{{ $customer->name }} @money($total, 'USD', true)
@php $gtotal = $gtotal + $total; $total = 0; @endphp @endif @endforeach
@include('accounts.reports.standard.filter') @include('includes.datepicker') @endsection