@extends('layouts.default')
@section('header-links')
@include('accounts.reports.management.selector')
@endsection
@section('title', isset($title)?$title:'')
@section('content')
{!! Form::open(['method' => 'POST', 'url' => '/reports/management/vendor-payments', 'class' =>
'form-horizontal', 'id'=>'form1']) !!}
{!! Form::close() !!}
Customer |
Consultant |
Due date |
Amount |
Remarks |
@php
$total = 0;
@endphp
@foreach($list as $li)
@if (count($li->invoices) > 0)
@foreach ($li->invoices as $invoice)
@php
if(isset($invoice->payments_total[0])) {
$payment = $invoice->payments_total[0]->paid_amount;
$res = $invoice->amount - $payment;
} else {
$res = $invoice->amount;
}
$total = $total + $res;
@endphp
{!! $li->parent->name or '' !!} |
{!! $li->name !!} |
@if($res != 0)
{!! Carbon::parse($invoice->due_at)->format($date_format) !!}
@else
No due as of day
@endif
|
@if($res != 0)
@money($invoice->amount, 'USD', 'true')
@endif
|
{!! str_limit($invoice->description, 15) !!} |
@endforeach
@endif
@endforeach
@if($total != 0)
|
@money($total, 'USD', true) |
|
@else
No Data |
@endif
@if (count($list) == 0)
No Data |
@endif
@endsection