Deploy Ladill POS / deploy (push) Successful in 1m42s
Register supports USB keyboard-wedge scanners with SKU lookup (local catalog and CRM in retail mode). Sales get a thermal receipt print template (58/80mm) with configurable header/footer, plus optional auto-print after cash sales. Co-authored-by: Cursor <cursoragent@cursor.com>
127 lines
4.1 KiB
PHP
127 lines
4.1 KiB
PHP
<!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>
|
||
@include('partials.favicon')
|
||
@php
|
||
$paper = in_array((int) ($location?->printer_paper_mm ?? 80), [58, 80], true)
|
||
? (int) $location->printer_paper_mm
|
||
: 80;
|
||
@endphp
|
||
<style>
|
||
* { box-sizing: border-box; }
|
||
body {
|
||
margin: 0;
|
||
padding: 16px;
|
||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
||
font-size: 12px;
|
||
line-height: 1.4;
|
||
color: #111;
|
||
background: #fff;
|
||
}
|
||
.receipt {
|
||
width: {{ $paper }}mm;
|
||
max-width: 100%;
|
||
margin: 0 auto;
|
||
}
|
||
.center { text-align: center; }
|
||
.muted { color: #555; }
|
||
.divider {
|
||
border: 0;
|
||
border-top: 1px dashed #999;
|
||
margin: 10px 0;
|
||
}
|
||
table { width: 100%; border-collapse: collapse; }
|
||
td { padding: 2px 0; vertical-align: top; }
|
||
.qty { width: 2.5rem; }
|
||
.amt { text-align: right; white-space: nowrap; }
|
||
.total-row td { font-weight: 700; padding-top: 6px; }
|
||
.actions {
|
||
margin: 20px auto 0;
|
||
max-width: {{ $paper }}mm;
|
||
display: flex;
|
||
gap: 8px;
|
||
justify-content: center;
|
||
}
|
||
button, a.btn {
|
||
font: inherit;
|
||
padding: 8px 14px;
|
||
border-radius: 8px;
|
||
border: 1px solid #cbd5e1;
|
||
background: #fff;
|
||
color: #0f172a;
|
||
text-decoration: none;
|
||
cursor: pointer;
|
||
}
|
||
button.primary, a.btn.primary {
|
||
background: #4f46e5;
|
||
border-color: #4f46e5;
|
||
color: #fff;
|
||
}
|
||
@media print {
|
||
body { padding: 0; }
|
||
.actions { display: none !important; }
|
||
@page { margin: 4mm; size: {{ $paper }}mm auto; }
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="receipt">
|
||
@if ($location?->receipt_header)
|
||
<p class="center">{{ $location->receipt_header }}</p>
|
||
@endif
|
||
<p class="center" style="font-size:14px;font-weight:700;">{{ $location?->name ?? 'Ladill POS' }}</p>
|
||
<p class="center muted">{{ $sale->reference }}</p>
|
||
<p class="center muted">{{ $sale->created_at->format('M j, Y g:i A') }}</p>
|
||
|
||
<hr class="divider">
|
||
|
||
<table>
|
||
@foreach ($sale->lines as $line)
|
||
<tr>
|
||
<td class="qty">{{ $line->quantity }}×</td>
|
||
<td>{{ $line->name }}</td>
|
||
<td class="amt">{{ pos_money($line->line_total_minor, $sale->currency) }}</td>
|
||
</tr>
|
||
@endforeach
|
||
</table>
|
||
|
||
<hr class="divider">
|
||
|
||
<table>
|
||
<tr class="total-row">
|
||
<td colspan="2">Total</td>
|
||
<td class="amt">{{ pos_money($sale->total_minor, $sale->currency) }}</td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="2" class="muted">Payment</td>
|
||
<td class="amt muted">{{ ucfirst($sale->payment_method) }}</td>
|
||
</tr>
|
||
</table>
|
||
|
||
@if ($sale->customer_name)
|
||
<p class="center muted" style="margin-top:10px;">Customer: {{ $sale->customer_name }}</p>
|
||
@endif
|
||
|
||
@if ($location?->receipt_footer)
|
||
<hr class="divider">
|
||
<p class="center muted">{{ $location->receipt_footer }}</p>
|
||
@endif
|
||
|
||
<p class="center muted" style="margin-top:12px;">Thank you</p>
|
||
</div>
|
||
|
||
<div class="actions">
|
||
<button type="button" class="primary" onclick="window.print()">Print receipt</button>
|
||
<a class="btn" href="{{ route('pos.sales.show', $sale) }}">Back to sale</a>
|
||
<a class="btn" href="{{ route('pos.register') }}">Register</a>
|
||
</div>
|
||
|
||
@if ($autoprint)
|
||
<script>window.addEventListener('load', () => window.print());</script>
|
||
@endif
|
||
</body>
|
||
</html>
|