@extends('layouts.emptyPdf') @section('content')
{{$office->OfficeName}}
{{$office->Address}}
{{$office->City}}, {{$office->state->Name}} {{$office->Postal}}
(Office) {{$office->OfficePhone}} (Fax) {{$office->OfficeFax}}

INVOICE

@if ($type == 'draw')

{{$draw->id}}

@else

{{$addendum->id}}

@endif
{{\Carbon\Carbon::now()->format('m/d/Y')}}
{{$customer->_name()}}
{{$customer->Address?$customer->Address.',':''}} {{$customer->City}} {{optional($customer->state)->Name}} {{$customer->ZipCode}}
@if ($customer->CellPhone)
Mobile: {{$customer->CellPhone}}
@endif

Thank you for your business. Please make your check payable to: {{$office->OfficeName}} and use your Job Number ({{$job->id}}) as the Reference on your check.

@if($type == 'draw') @else @endif
Description Amount
{{$draw->phase->type->Name}} - Draw Amount {{$draw->formatPrice($draw->getDrawAmount())}}
{{$draw->phase->type->Name}} - Draw Payments {{$draw->formatPrice($draw->getPayment())}}
{{$draw->phase->type->Name}} - Draw Credits {{$draw->getDrawCredits(true)}}
{{$draw->phase->type->Name}} - Addendum(s) Amount {{$draw->formatPrice((($draw->addendum) && ($draw->addendum->Amount > 0))?$draw->addendum->Amount:0)}}
{{$draw->phase->type->Name}} - Addendum(s) Payments {{$draw->formatPrice(($draw->addendum)?$draw->addendum->getPaymentTotal():0)}}
{{$draw->phase->type->Name}} - Amount Due: {{$draw->getAmountDue()}}
{{$addendum->phase->type->Name}} - Addendum Amount {{$addendum->formatPrice($addendum->Amount)}}
{{$addendum->phase->type->Name}} - Addendum Payments {{$addendum->formatPrice($addendum->getPaymentTotal())}}
{{$addendum->phase->type->Name}} - Amount Due: {{$addendum->getAmountDue()}}
@if ($type == 'addendum' && $addendum->Comment)
Addendum Description

{{$addendum->Comment}}

@endif
@if ($type == 'draw')

We appreciate being able to serve you!

@else
Customer agrees to pay the above amount
Customer Signature/Date
@endif

Thank you,

{{$office->OfficeName}}

Account Statement

@php $totalAmount = 0; $totalPayment = 0; $i =1; @endphp @foreach ($draws as $jobDraw) @php $totalAmount+= $jobDraw->getDrawAmount(); $totalPayment+= $jobDraw->getPayment(); @endphp @if ($i == 1) @else @endif @endforeach @php $i =1; @endphp @foreach ($addendums as $jobAddendum) @php $totalAmount+= $jobAddendum->Amount; $totalPayment+= $jobAddendum->getPaymentTotal(); @endphp @if ($i == 1) @else @endif @endforeach
Type Phase Description Completed Amount Payments Amount Due
Draw {{$jobDraw->phase->type->Name}} {{$jobDraw->phase->CompletedDate}} {{$jobDraw->formatPrice($jobDraw->getDrawAmount())}} {{$jobDraw->formatPrice($jobDraw->getPayment())}} {{$jobDraw->formatPrice($jobDraw->getOutstanding())}}
Addendums {{$jobAddendum->phase->type->Name}} {{$jobAddendum->phase->CompletedDate}} {{$jobAddendum->formatPrice($jobAddendum->Amount)}} {{$jobAddendum->formatPrice($jobAddendum->getPaymentTotal())}} {{$jobAddendum->formatPrice($jobAddendum->Amount - $jobAddendum->getPaymentTotal())}}
x=Non-Constable TOTALS: {{$job->formatPrice($totalAmount)}} {{$job->formatPrice($totalPayment)}} {{$job->formatPrice($totalAmount - $totalPayment)}}
@endsection