@extends('layouts.app') @section('title', 'Work in Progress Report') @section('content')
@if(session('success'))
{{ session('success') }}
@endif @if ($errors->any())
{!! implode('
', $errors->all(':message')) !!}
@endif

Sales invoices to be billed

{{ $invoices->count() }}

Sales invoices amount to be billed

0

has('from')) onfocus="this.type='date'" onblur="if(this.value===''){this.type='text'}" @else type="date" @endif class="form-control bg-white" placeholder="From" name="from" value="@if(request()->has('from')){{request()->from}}@endif" />
has('to')) onfocus="this.type='date'" onblur="if(this.value===''){this.type='text'}" @else type="date" @endif class="form-control bg-white" placeholder="To" name="to" value="@if(request()->has('to')){{request()->to}}@endif" />
@if(!request()->has('from'))

Showing results from past 90 days.

@endif
@php $net_amount = 0; @endphp @foreach($invoices as $invoice) @php $net_amount += $invoice->final_amount; @endphp @endforeach
Date Invoice Project Customer Status Net Amount View
{{ date('jS M Y', strtotime($invoice->created_at)) }} @if($invoice->credit_note==0) WGI-{{str_pad($invoice->id, 4, '0', STR_PAD_LEFT);}} @else WGC-{{str_pad($invoice->id, 4, '0', STR_PAD_LEFT);}} @endif WG-{{str_pad($invoice->project_id, 4, '0', STR_PAD_LEFT);}} {{ $invoice->company_name }} @if($invoice->sent_to_client==0) {{ ucfirst($invoice->status) }} @else {{ ucfirst($invoice->status) }} @endif £{{ number_format($invoice->final_amount, 2) }}
@endsection @section('js') @endsection