feat: Add transaction code generation for orders and update receipt templates
This commit is contained in:
@@ -7,6 +7,9 @@
|
||||
<div class="alert alert-success p-5">
|
||||
<h2 class="mb-3">¡Pago completado!</h2>
|
||||
<p class="mb-4">Tu pedido ha sido procesado correctamente.</p>
|
||||
{% if order and order.transaction_code %}
|
||||
<p class="mb-4"><strong>ID de transacción:</strong> {{ order.transaction_code }}</p>
|
||||
{% endif %}
|
||||
<a href="{% url 'index' %}" class="btn btn-primary">Volver a la tienda</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Recibo #</th>
|
||||
<th>ID Transacción</th>
|
||||
<th>Fecha</th>
|
||||
<th>Total</th>
|
||||
<th>Método</th>
|
||||
@@ -44,6 +45,7 @@
|
||||
{% for receipt in receipts %}
|
||||
<tr>
|
||||
<td>{{ receipt.id }}</td>
|
||||
<td>{{ receipt.transaction_code|default:"-" }}</td>
|
||||
<td>{{ receipt.created_at|date:"d/m/Y H:i" }}</td>
|
||||
<td>{{ receipt.total }}€</td>
|
||||
<td>{{ receipt.get_payment_method_display }}</td>
|
||||
|
||||
Reference in New Issue
Block a user