haikal/templates/purchase_orders/po_detail_en_pdf.html

170 lines
4.9 KiB
HTML

{% load i18n %}
{% load static %}
{% load django_ledger %}
{% load tenhal_tag %}
{% load custom_filters %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{{ po_model.po_number }}</title>
<style>
/* General Body and Font Styles */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
font-size: 12px;
color: #333;
margin: 0;
padding: 0;
}
/* Page Layout and Margins for PDF */
@page {
size: A4;
margin: 20mm;
@top-right {
content: "Page " counter(page) " of " counter(pages);
font-size: 10px;
color: #555;
}
}
/* Header Styles */
.document-header {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 2px solid #333;
padding-bottom: 15px;
margin-bottom: 20px;
}
.document-header .logo {
max-width: 150px;
height: auto;
}
.document-header h1 {
font-size: 24px;
margin: 0;
color: #0056b3; /* A professional blue */
}
.document-header address {
text-align: right;
font-style: normal;
font-size: 10px;
}
/* Document Details Section */
.document-details {
display: flex;
justify-content: space-between;
margin-bottom: 30px;
line-height: 1.6;
}
.document-details .section {
width: 48%;
}
.document-details h2 {
font-size: 14px;
border-bottom: 1px solid #ccc;
padding-bottom: 5px;
margin-bottom: 10px;
color: #555;
}
.document-details p {
margin: 0;
font-size: 12px;
}
.document-details .label {
font-weight: bold;
color: #555;
}
/* Table Styles */
.table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
.table th, .table td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
.table th {
background-color: #f2f2f2;
font-weight: bold;
}
.table tfoot td {
border-top: 2px solid #333;
font-weight: bold;
}
.text-right {
text-align: right;
}
/* Footer Styles */
.document-footer {
text-align: center;
font-size: 10px;
color: #888;
border-top: 1px solid #ddd;
padding-top: 15px;
margin-top: 30px;
}
</style>
</head>
<body>
<div class="document-header">
<div>
{% if request.dealer.logo %}
<img src="{{ dealer.logo.url }}" alt="Company Logo" class="logo">
{% else %}
<h1>{{ dealer.name }}</h1>
{% endif %}
<address>
Address: {{ dealer.address}}<br>
Email: {{ dealer.user.email }}<br>
Phone: {{dealer.phone_number }}<br>
CRN: {{dealer.crn}}&nbsp;&nbsp;|&nbsp;VRN: {{dealer.vrn}}
</address>
</div>
<div>
<h1>PURCHASE ORDER</h1>
<h2 style="font-size: 18px;">{{ po_model.po_number }}</h2>
</div>
</div>
<div class="document-details">
<div class="section">
<h2>BILL TO:</h2>
<p><span class="label">Vendor: {{vendor.vendor_name}}</span> </p>
<p><span class="label">Email: {{vendor.email}}</span> </p>
<p><span class="label">Phone: {{vendor.phone}}</span> </p>
<p><span class="label">Address: {{vendor.address_1}}</span> </p>
</div>
<div class="section">
<h2>DETAILS:</h2>
<p><span class="label">PO Number:</span> {{ po_model.po_number }}</p>
<p><span class="label">Issue Date:</span> {{ po_model.date_fulfilled|date:"F j, Y" }}</p>
</div>
</div>
<div class="col-lg-12">
<div class="table-responsive">
{% include 'purchase_orders/tags/po_item_table_print_en.html' with po_items_list=po_items_list %}
</div>
</div>
<div class="document-details" style="margin-top: 30px;">
<div class="section text-right">
<p class="h4"><span class="label">Total Amount:</span> {{ po_total_amount|floatformat:'2g' }}<span class="icon-saudi_riyal"></span></p>
</div>
</div>
<div class="document-footer">
<p>&copy;&nbsp;Haikal&nbsp;{% now "Y" %} {{ request.dealer.name }}. All rights reserved.</p>
</div>
</body>
</html>