Files
ladill-pos/resources/views/emails/digital-receipt.blade.php
isaacclad 600aedb59d
Deploy Ladill POS / deploy (push) Successful in 31s
Email digital receipts, add promo settings, and apply tips at charge.
Send real receipt emails from the customer display and sale page, store
branch promo content for the idle screen, and fold selected tips into totals.
2026-07-15 16:10:20 +00:00

87 lines
5.4 KiB
PHP
Raw Permalink 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">
<title>Receipt {{ $sale->reference }}</title>
</head>
<body style="margin:0;padding:0;background:#f8fafc;font-family:Figtree,ui-sans-serif,system-ui,-apple-system,sans-serif;color:#0f172a;">
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="background:#f8fafc;padding:24px 12px;">
<tr>
<td align="center">
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="max-width:480px;background:#ffffff;border:1px solid #e2e8f0;border-radius:16px;overflow:hidden;">
<tr>
<td style="padding:24px 24px 8px;text-align:center;">
@if ($location?->receiptLogoUrl())
<img src="{{ $location->receiptLogoUrl() }}" alt="" width="72" height="72" style="display:block;margin:0 auto 12px;border-radius:12px;object-fit:contain;background:#f8fafc;">
@endif
<p style="margin:0;font-size:18px;font-weight:700;">
{{ $location?->receipt_header ?: $location?->name ?: 'Receipt' }}
</p>
<p style="margin:8px 0 0;font-size:13px;color:#64748b;">
{{ $sale->reference }} · {{ optional($sale->paid_at ?? $sale->created_at)->format('d M Y, H:i') }}
</p>
</td>
</tr>
<tr>
<td style="padding:8px 24px 0;">
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="font-size:14px;">
@foreach ($sale->lines as $line)
<tr>
<td style="padding:10px 0;border-bottom:1px solid #f1f5f9;color:#334155;">
{{ $line->quantity }}× {{ $line->name }}
</td>
<td style="padding:10px 0;border-bottom:1px solid #f1f5f9;text-align:right;font-weight:600;white-space:nowrap;">
{{ pos_money($line->line_total_minor, $sale->currency) }}
</td>
</tr>
@endforeach
</table>
</td>
</tr>
<tr>
<td style="padding:16px 24px 24px;">
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="font-size:14px;">
<tr>
<td style="padding:4px 0;color:#64748b;">Subtotal</td>
<td style="padding:4px 0;text-align:right;">{{ pos_money($sale->subtotal_minor, $sale->currency) }}</td>
</tr>
@if ($sale->loyalty_discount_minor)
<tr>
<td style="padding:4px 0;color:#059669;">Loyalty</td>
<td style="padding:4px 0;text-align:right;color:#059669;">{{ pos_money($sale->loyalty_discount_minor, $sale->currency) }}</td>
</tr>
@endif
@if ($sale->tip_minor)
<tr>
<td style="padding:4px 0;color:#64748b;">Tip</td>
<td style="padding:4px 0;text-align:right;">{{ pos_money($sale->tip_minor, $sale->currency) }}</td>
</tr>
@endif
<tr>
<td style="padding:12px 0 0;font-size:18px;font-weight:700;">Total</td>
<td style="padding:12px 0 0;text-align:right;font-size:18px;font-weight:700;color:#4f46e5;">
{{ pos_money($sale->total_minor, $sale->currency) }}
</td>
</tr>
@if ($sale->loyalty_points_earned)
<tr>
<td colspan="2" style="padding:12px 0 0;font-size:12px;color:#b45309;">
You earned {{ $sale->loyalty_points_earned }} loyalty points on this visit.
</td>
</tr>
@endif
</table>
@if ($location?->receipt_footer)
<p style="margin:20px 0 0;font-size:12px;color:#94a3b8;text-align:center;">{{ $location->receipt_footer }}</p>
@endif
<p style="margin:16px 0 0;font-size:11px;color:#cbd5e1;text-align:center;">Powered by Ladill POS</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>