Files
Additional/resources/views/invoices/order-invoice.blade.php
T
2025-12-30 22:10:30 +02:00

366 lines
10 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Invoice #{{ $order->order_number }}</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Montserrat', sans-serif;
color: #333;
line-height: 1.6;
background: white;
}
.invoice-container {
max-width: 800px;
margin: 0 auto;
padding: 40px;
background: white;
}
.invoice-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 20px;
border-bottom: 1px solid #1a1a1a;
padding-bottom: 20px;
}
.company-info h1 {
font-family: Abril Fatface;
font-size: 36px;
color: #1a1a1a;
margin-bottom: 10px;
font-weight: normal;
}
.company-details {
font-size: 10px;
color: #666;
line-height: 1.5;
}
.invoice-details {
text-align: right;
/* line-height: 1.5; */
}
.invoice-details h2 {
font-size: 28px;
color: #1a1a1a;
font-weight: normal;
/* margin-bottom: 20px; */
font-family: 'AbrilFatface', Georgia, serif;
}
.detail-row {
display: flex;
justify-content: flex-end;
/* margin-bottom: 8px; */
font-size: 10px;
}
.detail-row strong {
margin-right: 20px;
color: #666;
width: 120px;
}
.detail-row span {
color: #1a1a1a;
width: 150px;
}
.section-title {
font-size: 20px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 1px;
color: #666;
margin-top: 20px;
/* margin-bottom: 20px; */
/* border-bottom: 1px solid #e0e0e0; */
padding-bottom: 12px;
}
.customer-info {
display: flex;
/* gap: 80px; */
/* margin-bottom: 40px; */
font-size: 12px;
}
.customer-info div {
flex: 1;
}
.customer-info h3 {
font-size: 16px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5px;
color: #666;
/* margin-bottom: 8px; */
}
.customer-info p {
color: #1a1a1a;
/* margin-bottom: 4px; */
line-height: 1.5;
}
table {
width: 100%;
border-collapse: collapse;
margin-bottom: 40px;
}
thead {
background-color: #f5f5f5;
}
th {
font-size: 12px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5px;
color: #666;
padding: 12px 16px;
text-align: left;
/* border: 1px solid #e0e0e0; */
}
td {
padding: 10px 10px;
/* border: 1px solid #e0e0e0; */
font-size: 13px;
color: #1a1a1a;
}
tr:nth-child(even) {
background-color: #fafafa;
}
.item-name {
font-weight: 500;
}
.item-label {
font-size: 11px;
color: #999;
text-transform: uppercase;
letter-spacing: 0.5px;
/* margin-top: 2px; */
}
.qty {
text-align: center;
}
.price {
text-align: right;
}
.totals-section {
margin-bottom: 40px;
}
.totals-box {
margin-left: auto;
width: 350px;
}
.total-row {
display: flex;
padding: 12px 16px;
font-size: 13px;
}
.total-row strong {
color: #1a1a1a;
}
.total-row span {
color: #666;
text-align: right;
flex: 1;
}
.total-row.subtotal strong {
font-weight: 500;
}
.total-row.shipping strong {
font-weight: 500;
}
.total-row.grand-total {
/* background-color: #f5f5f5; */
/* border: 1px solid #e0e0e0; */
font-size: 15px;
font-weight: 700;
padding: 12px 16px;
}
.total-row.grand-total strong {
color: #1a1a1a;
font-family: 'AbrilFatface', Georgia, serif;
font-weight: normal;
}
.total-row.grand-total span {
color: #1a1a1a;
font-size: 16px;
}
.footer-section {
margin-top: 60px;
padding-top: 30px;
border-top: 1px solid #e0e0e0;
font-size: 12px;
color: #999;
text-align: center;
}
.thank-you {
color: #666;
margin-bottom: 20px;
}
.page-break {
page-break-after: always;
}
</style>
</head>
<body>
<div class="invoice-container">
<!-- Header -->
<div class="invoice-header">
<div class="company-info">
<h1>INVOICE</h1>
<div class="company-details">
<h2>ADDITIONAL DESIGN</h2>
<p>registered trading name of</p>
<p>TWO TALES & CO. (PTY) LTD</p>
<p>REG: 2014/260746/07</p>
<p>VAT: NA</p>
<p>info@additional.co.za</p>
<p>additional.co.za</p>
</div>
</div>
<div class="invoice-details">
<h3>#{{ $order->order_number }}</h3>
<div class="detail-row">
<strong>Date:</strong>
<span>{{ $order->created_at->format('d M Y') }}</span>
</div>
<div class="detail-row">
<strong>Invoice Date:</strong>
<span>{{ now()->format('d M Y') }}</span>
</div>
<div class="detail-row">
<strong>Order Status:</strong>
<span style="text-transform: capitalize;">{{ $order->status }}</span>
</div>
</div>
</div>
<!-- Customer Info -->
<div class="customer-info">
<div>
<h3>Bill To</h3>
<p>{{ $order->customer_name }}</p>
<p>{{ $order->customer_email }}</p>
<p>{{ $order->customer_phone }}</p>
</div>
<div>
<h3>Ship To</h3>
<p>{{ $order->shipping_address }}</p>
</div>
</div>
<!-- Items Table -->
<div class="section-title">Order Items</div>
<table>
<thead>
<tr>
<th>Description</th>
<th class="qty">Quantity</th>
<th class="price">Unit Price</th>
<th class="price">Total</th>
</tr>
</thead>
<tbody>
@foreach($order->items as $item)
<tr>
<td>
<div class="item-name">{{ $item->product->name }}</div>
@if($item->type === 'wallpaper' && $item->length)
<div class="item-label">{{ $item->length }}m length</div>
@elseif($item->type === 'mural' && $item->width && $item->height)
<div class="item-label">{{ $item->width }}m × {{ $item->height }}m ({{ $item->width * $item->height }})</div>
@endif
@if($item->is_sample)
<div class="item-label">Sample</div>
@endif
@if($item->specification)
<div class="item-label">Specification: {{ $item->specification }}</div>
@endif
</td>
<td class="qty">{{ $item->quantity }}</td>
<td class="price">R {{ number_format($item->price, 2) }}</td>
<td class="price">R {{ number_format($item->quantity * $item->price, 2) }}</td>
</tr>
@endforeach
</tbody>
</table>
<!-- Totals -->
<div class="totals-section" style="text-align: right;">
<div class="totals-box">
<div class="total-row subtotal">
<strong>Subtotal</strong>
<span>R {{ number_format($order->items->sum(fn($item) => $item->quantity * $item->price), 2) }}</span>
</div>
@if($order->shipping_fee)
<div class="total-row shipping">
<strong>Shipping</strong>
<span>R {{ number_format($order->shipping_fee, 2) }}</span>
</div>
@endif
<div class="total-row grand-total">
<strong>Total</strong>
<span>R {{ number_format($order->total, 2) }}</span>
</div>
</div>
</div>
<div style="text-align: center;">
<strong>PAID VIA YOCO</strong>
</div>
<!-- Footer -->
<div class="footer-section">
<div class="thank-you">
<p>ADDITIONAL DESIGN is a registered trading name of TWO TALES & CO. (PTY) LTD</p>
</div>
<!-- <p>This is an automatically generated invoice. No signature is required.</p> -->
<!-- <p style="margin-top: 10px; color: #ccc;">Generated on {{ now()->format('d M Y H:i') }}</p> -->
</div>
</div>
</body>
</html>