haikal/templates/sales/quotation_pdf.html
Marwan Alwali d57702ea7a update
2024-12-23 11:55:41 +03:00

70 lines
2.2 KiB
HTML

{% extends 'base.html' %}
{% load static i18n %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{% trans "Quotation PDF" %}</title>
<style>
body {
font-family: Arial, sans-serif;
}
h1, h2 {
text-align: center;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
th, td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
th {
background-color: #f2f2f2;
}
</style>
</head>
<body>
<h1>{% trans "Quotation Details" %} - {{ quotation.id }}</h1>
<h2>{% trans "Customer Details" %}</h2>
<p><strong>{% trans "Name" %}:</strong> {{ quotation.customer.get_full_name }}</p>
<p><strong>{% trans "Address" %}:</strong> {{ quotation.customer.address }}</p>
<p><strong>{% trans "VAT No" %}:</strong> {{ quotation.customer.vat_number }}</p>
<h2>{% trans "Car Details" %}</h2>
<table>
<thead>
<tr>
<th>{% trans "VIN" %}</th>
<th>{% trans "Model" %}</th>
<th>{% trans "Year" %}</th>
<th>{% trans "Quantity" %}</th>
<th>{% trans "Price" %}</th>
<th>{% trans "VAT" %}</th>
<th>{% trans "Total" %}</th>
</tr>
</thead>
<tbody>
{% for item in quotation.quotation_cars.all %}
<tr>
<td>{{ item.car.vin }}</td>
<td>{{ item.car.id_car_model.get_local_name }}</td>
<td>{{ item.car.year }}</td>
<td>{{ item.quantity }}</td>
<td>{{ item.selling_price }}</td>
<td>{{ item.vat_amount }}</td>
<td>{{ item.total }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<h2>{% trans "Summary" %}</h2>
<p><strong>{% trans "Total Sales Before VAT" %}:</strong> {{ total_sales_before_vat }}</p>
<p><strong>{% trans "VAT Amount" %}:</strong> {{ vat_amount }}</p>
<p><strong>{% trans "Total Sales After VAT" %}:</strong> {{ total_sales_after_vat }}</p>
</body>
</html>