hospital-management/templates/billing/payment_receipt_pdf.html
2025-08-12 13:33:25 +03:00

156 lines
5.6 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Payment Receipt - {{ payment_details.receipt_number }}</title>
</head>
<body>
<!-- Hospital Header -->
<div class="receipt-header">
<div class="hospital-name">{{ hospital_info.name }}</div>
{% if hospital_info.address %}
<div class="hospital-address">{{ hospital_info.address }}</div>
{% endif %}
<div class="hospital-contact">
{% if hospital_info.phone %}Phone: {{ hospital_info.phone }}{% endif %}
{% if hospital_info.email %} | Email: {{ hospital_info.email }}{% endif %}
{% if hospital_info.website %} | {{ hospital_info.website }}{% endif %}
</div>
<div class="receipt-title">PAYMENT RECEIPT</div>
</div>
<!-- Receipt Information -->
<div class="section-title">Receipt Information</div>
<table class="detail-table">
<tr>
<td class="detail-label">Receipt Number:</td>
<td><strong>{{ payment_details.receipt_number }}</strong></td>
</tr>
<tr>
<td class="detail-label">Payment Date:</td>
<td>{{ payment_details.payment_date|date:"M d, Y H:i" }}</td>
</tr>
<tr>
<td class="detail-label">Print Date:</td>
<td>{{ print_date|date:"M d, Y H:i" }}</td>
</tr>
<tr>
<td class="detail-label">Processed By:</td>
<td>{{ payment_details.processed_by.get_full_name|default:payment_details.processed_by.username }}</td>
</tr>
</table>
<!-- Patient Information -->
<div class="section-title">Patient Information</div>
<table class="detail-table">
<tr>
<td class="detail-label">Patient Name:</td>
<td><strong>{{ payment_details.patient.get_full_name }}</strong></td>
</tr>
<tr>
<td class="detail-label">Patient ID:</td>
<td>{{ payment_details.patient.patient_id|default:payment_details.patient.pk }}</td>
</tr>
{% if payment_details.patient.phone %}
<tr>
<td class="detail-label">Phone:</td>
<td>{{ payment_details.patient.phone }}</td>
</tr>
{% endif %}
{% if payment_details.patient.email %}
<tr>
<td class="detail-label">Email:</td>
<td>{{ payment_details.patient.email }}</td>
</tr>
{% endif %}
</table>
<!-- Bill Information -->
<div class="section-title">Bill Information</div>
<table class="detail-table">
<tr>
<td class="detail-label">Bill Number:</td>
<td><strong>{{ payment_details.bill.bill_number }}</strong></td>
</tr>
<tr>
<td class="detail-label">Bill Date:</td>
<td>{{ payment_details.bill.bill_date|date:"M d, Y" }}</td>
</tr>
<tr>
<td class="detail-label">Due Date:</td>
<td>{{ payment_details.bill.due_date|date:"M d, Y"|default:"N/A" }}</td>
</tr>
<tr>
<td class="detail-label">Total Bill Amount:</td>
<td>${{ payment_details.bill.total_amount|floatformat:2 }}</td>
</tr>
<tr>
<td class="detail-label">Previous Payments:</td>
<td>${{ payment_details.bill.paid_amount|floatformat:2|default:"0.00" }}</td>
</tr>
<tr>
<td class="detail-label">Remaining Balance:</td>
<td><strong>${{ payment_details.balance_after_payment|floatformat:2 }}</strong></td>
</tr>
</table>
<!-- Payment Details -->
<div class="section-title">Payment Details</div>
<table class="detail-table">
<tr>
<td class="detail-label">Payment Method:</td>
<td>{{ payment_details.payment_method }}</td>
</tr>
{% if payment_details.reference_number %}
<tr>
<td class="detail-label">Reference Number:</td>
<td><strong>{{ payment_details.reference_number }}</strong></td>
</tr>
{% endif %}
{% if payment_details.notes %}
<tr>
<td class="detail-label">Notes:</td>
<td>{{ payment_details.notes }}</td>
</tr>
{% endif %}
</table>
<!-- Amount Paid -->
<div class="amount-paid">
<div>Amount Paid</div>
<div class="amount-value">${{ payment_details.amount_paid|floatformat:2 }}</div>
</div>
<!-- Payment Status -->
<div style="text-align: center; margin: 30px 0;">
<div style="font-size: 18px; font-weight: bold;">✓ Payment Received Successfully</div>
<div style="margin-top: 10px;">Thank you for your payment. This receipt serves as proof of payment.</div>
</div>
<!-- Important Notes -->
<div class="section-title">Important Notes</div>
<ul style="margin: 0; padding-left: 20px;">
<li>Please keep this receipt for your records</li>
<li>This is a computer-generated receipt</li>
<li>For any queries, contact our billing department</li>
{% if payment_details.balance_after_payment > 0 %}
<li>Outstanding balance: ${{ payment_details.balance_after_payment|floatformat:2 }}</li>
{% endif %}
</ul>
<!-- Footer -->
<div class="footer">
<div style="text-align: center;">
<div class="signature-line"></div>
<div>Authorized Signature</div>
</div>
<div style="text-align: center; margin-top: 20px;">
Generated on {{ print_date|date:"M d, Y \a\t H:i" }} | Receipt ID: {{ payment_details.receipt_number }}
</div>
</div>
</body>
</html>