topnotch_website/resources/views/pdf/invoice.blade.php

161 lines
4.3 KiB
PHP
Raw Normal View History

@php use App\Enums\InvoiceStatus; @endphp
2024-11-09 15:13:04 -05:00
@extends('layouts.pdf')
2025-02-01 09:57:57 -08:00
<title>Top Notch Invoice {{$invoice->internal_id}}</title>
2024-11-17 15:41:32 -05:00
<style>
* {
font-size: 0.9rem;
}
.paid {
position: absolute;
top: 1rem;
right: 0.5rem;
font-size: 3rem;
font-weight: bold;
}
2024-11-17 15:41:32 -05:00
</style>
@if($invoice->status === InvoiceStatus::PAID)
<div class="paid">
PAID
</div>
@endif
2024-11-17 15:41:32 -05:00
<div class="container-fluid pt-4 font-serif" style="">
2024-11-09 15:13:04 -05:00
<div class="fw-bold">
TOP NOTCH EMBROIDERY & DIGITIZING LTD.
2024-11-09 15:13:04 -05:00
</div>
2024-11-09 15:13:04 -05:00
<div>
108-618 EAST KENT AVE. SOUTH <br>
VANCOUVER BC <br>
(604) 871-9991 <br>
info@sewtopnotch.com <br>
GST# 846025062RT0001 <br>
</div>
<div class="fs-3 fw-bold text-primary mt-2">
2024-11-09 15:13:04 -05:00
INVOICE
</div>
<div class="d-flex flex-row">
<div class="me-auto">
<div class="fw-bold">
BILL TO
</div>
<div>
{{$invoice->customer->company_name ?? ''}} <br>
{{$invoice->customer->billing_address_line_1 ?? ''}} <br>
{{$invoice->customer->billing_address_line_2 ?? ''}} <br>
</div>
</div>
<div class="text-end pe-2">
<div class="fw-bold">
INVOICE#
</div>
<div class="fw-bold">
DATE
</div>
<div class="fw-bold">
DUE DATE
</div>
</div>
<div>
<div class="text-start">
@if(isset($invoice->internal_id))
{{$invoice->internal_id}}
@endif
</div>
<div class="text-start">
@if(isset($invoice->date))
{{$invoice->date->format('Y-m-d')}}
@endif
</div>
<div class="text-start">
@if(isset($invoice->due_date))
{{$invoice->due_date->format('Y-m-d')}}
@endif
</div>
</div>
2024-11-09 15:13:04 -05:00
</div>
<hr>
<table class="table table-sm table-striped">
2024-11-09 15:13:04 -05:00
<tr>
<th>WO#</th>
<th>PO#</th>
<th>PRODUCT SERVICES</th>
<th>QTY</th>
<th>RATE</th>
<th>AMOUNT</th>
</tr>
2024-12-10 15:28:14 -08:00
2024-11-09 15:13:04 -05:00
@foreach($invoice->productServices as $service)
<tr>
2024-12-10 15:28:14 -08:00
<td class="text-nowrap">
<span style="font-size: 0.8rem">
2024-11-09 15:13:04 -05:00
{{$service->order->internal_po}}
</span>
2024-11-09 15:13:04 -05:00
</td>
<td>
{{$service->order->customer_po}}
</td>
<td>
<span class="fw-bold">
2024-11-09 15:13:04 -05:00
{{$service->order->order_type->name}} <br>
</span>
2024-11-09 15:13:04 -05:00
{{$service->service_details}}
</td>
<td class="text-end">
2024-11-09 15:13:04 -05:00
{{$service->amount}}
</td>
<td class="text-end">
{{number_format($service->amount_price, 2)}}
2024-11-09 15:13:04 -05:00
</td>
<td class="text-end">
${{number_Format($service->price, 2)}}
2024-11-09 15:13:04 -05:00
</td>
</tr>
@endforeach
</table>
<div class="d-flex flex-row-reverse">
<div class="text-end ps-5">
<div>${{number_format($invoice->subtotal, 2)}}</div>
@if($invoice->has_hst)
<div>${{number_format($invoice->hst_amount, 2)}}</div>
@else
<div>${{number_format($invoice->gst_amount, 2)}}</div>
<div>{{$invoice->has_pst ? '$'.number_format($invoice->pst_amount, 2) : '-'}}</div>
@endif
<div>${{number_format($invoice->total, 2)}}</div>
<br>
<div class="fw-bold">${{number_format($invoice->remainingBalance(), 2)}}</div>
</div>
<div class="fw-bold text-end">
<div>Subtotal</div>
@if($invoice->has_hst)
<div>HST @ {{$invoice->hst_rate}}%</div>
@else
<div>GST @ {{$invoice->gst_rate}}%</div>
<div>PST (BC) @ {{$invoice->pst_rate}}%</div>
@endif
<div>TOTAL</div>
<br>
<div>BALANCE DUE</div>
</div>
</div>
2024-11-09 15:13:04 -05:00
</div>