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

ASAS {{ trans('reports.standard.openinvoices') }}


DATE TRANSACTION TYPE NUM TERMS DUE DATE OPEN BALANCE
@foreach ($list as $customer) @php $invoices = $customer->invoices; @endphp @if(count($invoices)>0)

@php $total = 0; @endphp @foreach ($invoices as $invoice) @php $ptm = $invoice->payments_total; $ptl = isset($ptm->paid_amount)?$ptm->paid_amount:0; $bal = $invoice->amount - $ptl; $total = $total + $bal; @endphp @endforeach
{{ Carbon\Carbon::parse($invoice->invoiced_at)->format($date_format) }} Invoice {{ $invoice->invoice_number }} {{ Carbon\Carbon::parse($invoice->due_at)->format($date_format) }} @money($bal, 'USD', true)
{{-- INCOME TOTAL --}}
Income Total @money($total, 'USD', true)
@endif @php $total = 0; @endphp @endforeach
@include('accounts.reports.standard.filter') @include('includes.datepicker') @endsection