@extends('layouts.app') @section('content') {{--
Back
ID: {{$invoice->id}}
Type: {{ $invoice->type ?: "(blank)" }}
Project: {{ $invoice->project_id ?: "(blank)" }}
Invoice No: {{ $invoice->invoice_no ?: "(blank)" }}
Customer: {{$invoice?->customer?->name ?: "(blank)"}}
Issue Date: {{ $invoice->issue_date ?: "(blank)" }}
Subject: {{ $invoice->subject ?: "(blank)" }}
Reference: {{ $invoice->reference ?: "(blank)" }}
Due Date: {{ $invoice->due_date ?: "(blank)" }}
Send Date: {{ $invoice->send_date ?: "(blank)" }}
Ref Number: {{ Str::limit($invoice->ref_number, 50) ?: "(blank)"}}
Shipping Display: {{ $invoice->shipping_display ?: "(blank)" }}
Discount Apply: {{ $invoice->discount_apply ?: "(blank)" }}
Next Invoicing Date: {{ $invoice->next_invoicing_date ?: "(blank)" }}
Paid: {{ $invoice->paid ?: "(blank)" }}
Balance: {{ $invoice->balance ?: "(blank)" }}
Net Amount: {{ $invoice->net_amount ?: "(blank)" }}
Vat: {{ $invoice->vat ?: "(blank)" }}
Gross Amount: {{ $invoice->gross_amount ?: "(blank)" }}
Sales Person: {{ $invoice->sales_person ?: "(blank)" }}
Customer Notes: {{ Str::limit($invoice->customer_notes, 50) ?: "(blank)"}}
T C: {{ Str::limit($invoice->t_c, 50) ?: "(blank)"}}
Payment Method: {{ $invoice->payment_method_id ?: "(blank)" }}
Status: {{ $invoice->status ?: "(blank)" }}
Created By: {{ $invoice->created_by ?: "(blank)" }}
Created at {{Carbon\Carbon::parse($invoice->created_at)->format('d/m/Y H:i:s')}}
Updated at {{Carbon\Carbon::parse($invoice->updated_at)->format('d/m/Y H:i:s')}}
--}}
INVOICE
{{ $invoice->customer->name }}

{{ $invoice->customer->address }}

{{ $invoice->customer->phone_no }}

{{ env('BUSINESS_NAME') }}
Email: {{ env('BUSINESS_EMAIL') }}
Website: {{ env('BUSINESS_WEBSITE') }}

Invoice No

#INV{{ sprintf('%05d',$invoice->invoice_no) }}

Date

{{ date("d M, Y",strtotime($invoice->created_at)) }} {{ date("h:i A",strtotime($invoice->created_at)) }}

Payment Status

@if($invoice->balance == 0) Fully Paid @elseif(($invoice->balance > 0) && ($invoice->balance < $invoice->gross_amount)) Partially Paid @else Not paid @endif
{{--

Total Amount

$755.96
--}}
{{--
Billing Address

David Nichols

305 S San Gabriel Blvd

Phone: +(123) 456-7890

Tax: 12-3456789

Shipping Address

David Nichols

305 S San Gabriel Blvd

Phone: +(123) 456-7890

--}}
@foreach($invoice->invoice_items as $invoice_item) @endforeach
Product Details Rate Quantity Amount
{{ $invoice_item->item->name }}

{{ $invoice_item->description }}

{{ number_format($invoice_item->unit_price) }} {{ $invoice_item->quantity }} {{ number_format($invoice_item->total) }}
{{-- --}}
Sub Total {{ number_format($invoice->gross_amount) }}
Discount
Estimated Tax (12.5%) $44.99
Shipping Charge $65.00
Total Amount {{ number_format($invoice->gross_amount) }}
Balance {{ number_format($invoice->balance) }}
Sales Details:

Payment Method: {{ $invoice->payment_method->name }}

Sales Person: {{ $invoice->sales_person }}

Due Date: {{ $invoice->due_date }}

{{--

Total Amount: $ 755.96

--}}

NOTES: {!! $invoice->t_c !!}

@endsection