File: /var/www/middleware-citas/resources/views/pdfs/payment-receipt.blade.php
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Comprobante de Pago - {{ $appointment->code ?? '' }}</title>
<style>
body {
font-family: DejaVu Sans, sans-serif;
font-size: 12px;
color: #333;
margin: 0;
padding: 20px;
}
.header {
text-align: center;
border-bottom: 2px solid #003A8F;
padding-bottom: 15px;
margin-bottom: 20px;
}
.header h1 {
color: #003A8F;
margin: 0 0 5px 0;
font-size: 20px;
}
.header p {
color: #666;
margin: 0;
font-size: 11px;
}
.success-badge {
background-color: #e8f5e9;
border: 1px solid #4caf50;
border-radius: 5px;
padding: 10px;
text-align: center;
margin: 15px 0;
}
.success-badge p {
color: #2e7d32;
margin: 0;
font-weight: bold;
}
.section {
margin-bottom: 20px;
}
.section-title {
background-color: #003A8F;
color: white;
padding: 8px 12px;
font-weight: bold;
font-size: 13px;
margin-bottom: 0;
}
.section-content {
border: 1px solid #ddd;
border-top: none;
padding: 12px;
}
.info-grid {
display: table;
width: 100%;
}
.info-row {
display: table-row;
}
.info-label {
display: table-cell;
padding: 5px 0;
font-weight: bold;
width: 40%;
}
.info-value {
display: table-cell;
padding: 5px 0;
}
.mono {
font-family: monospace;
font-size: 10px;
}
table {
width: 100%;
border-collapse: collapse;
}
th, td {
padding: 8px;
text-align: left;
border: 1px solid #ddd;
}
th {
background-color: #f5f5f5;
font-weight: bold;
}
.text-right {
text-align: right;
}
.total-row {
background-color: #003A8F;
color: white;
font-weight: bold;
}
.total-row td {
border-color: #003A8F;
}
.footer {
margin-top: 30px;
padding-top: 15px;
border-top: 1px solid #ddd;
text-align: center;
font-size: 10px;
color: #666;
}
</style>
</head>
<body>
<div class="header">
<h1>Bradford School</h1>
<p>Comprobante de Pago</p>
</div>
<div class="success-badge">
<p>PAGO CONFIRMADO</p>
</div>
<div class="section">
<div class="section-title">Datos de la Transaccion</div>
<div class="section-content">
<div class="info-grid">
<div class="info-row">
<span class="info-label">Codigo de Cita:</span>
<span class="info-value">{{ $appointment->code }}</span>
</div>
<div class="info-row">
<span class="info-label">Fecha de Pago:</span>
<span class="info-value">{{ $payment->transaction_date ? $payment->transaction_date->format('d/m/Y H:i:s') : $payment->created_at->format('d/m/Y H:i:s') }}</span>
</div>
@if($payment->toku_transaction_id)
<div class="info-row">
<span class="info-label">ID Transaccion:</span>
<span class="info-value mono">{{ $payment->toku_transaction_id }}</span>
</div>
@endif
@if($payment->card_brand || $payment->card_last_digits)
<div class="info-row">
<span class="info-label">Medio de Pago:</span>
<span class="info-value">
{{ $payment->card_brand ?? 'Tarjeta' }}
@if($payment->card_type) ({{ $payment->card_type }}) @endif
@if($payment->card_last_digits) **** {{ $payment->card_last_digits }} @endif
</span>
</div>
@endif
@if($payment->card_installments && $payment->card_installments > 1)
<div class="info-row">
<span class="info-label">Cuotas:</span>
<span class="info-value">{{ $payment->card_installments }}</span>
</div>
@endif
@if($payment->response_code)
<div class="info-row">
<span class="info-label">Codigo Autorizacion:</span>
<span class="info-value">{{ $payment->response_code }}</span>
</div>
@endif
</div>
</div>
</div>
<div class="section">
<div class="section-title">Detalle de la Cita</div>
<div class="section-content" style="padding: 0;">
<table>
<thead>
<tr>
<th>Nombre</th>
<th>Usuario</th>
<th class="text-right">Valor</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ $appointment->form_data['name'] ?? '-' }}</td>
<td>{{ $appointment->form_data['username'] ?? '-' }}</td>
<td class="text-right">${{ number_format($payment->amount, 0, ',', '.') }}</td>
</tr>
</tbody>
<tfoot>
<tr class="total-row">
<td colspan="2" class="text-right">TOTAL PAGADO:</td>
<td class="text-right">${{ number_format($payment->amount, 0, ',', '.') }} {{ $payment->currency }}</td>
</tr>
</tfoot>
</table>
</div>
</div>
@if($payment->card_holder)
<div class="section">
<div class="section-title">Titular de la Tarjeta</div>
<div class="section-content">
<div class="info-grid">
<div class="info-row">
<span class="info-label">Nombre:</span>
<span class="info-value">{{ $payment->card_holder }}</span>
</div>
</div>
</div>
</div>
@endif
<div class="footer">
<p>Este documento es un comprobante valido de pago.</p>
<p>Generado automaticamente el {{ now()->format('d/m/Y H:i') }}</p>
<p>Bradford School</p>
</div>
</body>
</html>