haikal/templates/purchase_orders/po_detail_en_pdf.html

225 lines
6.5 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 {
position: relative;
bottom: 0;
left: 0;
width: 100%;
text-align: center;
font-size: 10px;
color: #888;
padding-top: 15px;
margin: 0 20mm;
}
.footer-flex {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
}
.footer-logo {
text-align: center;
}
.footer-logo img {
height: 20px;
width: 20px;
}
.footer-logo p {
font-size: 9px;
font-weight: bold;
}
.footer-powered p {
font-size: 11px;
}
.footer-powered span {
font-weight: lighter;
}
.footer-powered a {
color: #112e40;
text-decoration: none;
font-size: 9px;
}
</style>
</head>
<body>
<div class="document-header">
<div>
<h1>{{ dealer.name }}</h1>
<address>
Address&nbsp;:&nbsp;{{ dealer.address}}<br>
Email&nbsp;:&nbsp;{{ dealer.user.email }}<br>
Phone&nbsp;:&nbsp;{{dealer.phone_number }}<br>
CRN&nbsp;:&nbsp;{{dealer.crn}}&nbsp;&nbsp;|&nbsp;VRN&nbsp;:&nbsp;{{dealer.vrn}}
</address>
</div>
<div>
<div class="dealer-logo ">
{% if dealer.logo %}
<img class="rounded-soft"
style="max-width:100px;
max-height:100px"
src="{{dealer.logo.url|default:'' }}"
alt="Dealer Logo" />
{% endif %}
</div>
</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&nbsp;:&nbsp;{{vendor.vendor_name}}</span> </p>
<p><span class="label">Email&nbsp;:&nbsp;{{vendor.email}}</span> </p>
<p><span class="label">Phone&nbsp;:&nbsp;{{vendor.phone}}</span> </p>
<p><span class="label">Address&nbsp;:&nbsp;{{vendor.address_1}}</span> </p>
</div>
<div class="section">
<h2>DETAILS:</h2>
<p><span class="label">PO Number&nbsp;:&nbsp;</span> {{ po_model.po_number }}</p>
<p><span class="label">Issue Date&nbsp;:&nbsp;</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&nbsp;:&nbsp;</span> {{ po_total_amount|currency_format }}<span class="icon-saudi_riyal"></span></p>
</div>
</div>
<hr style="border-bottom:1px solid #ccc; ">
<div class="document-footer">
<div class="footer-logo">
<img src="{% static 'images/logos/logo-d-pdf.png' %}" alt="Logo" />
<p>
<span>Haikal</span>&nbsp;|&nbsp;<span>هيكل</span>
</p>
</div>
<div class="footer-powered">
<p>
<span>Powered&nbsp;by&nbsp;</span>
<a href="https://tenhal.sa"><span>TENHAL</span>&nbsp;|&nbsp;<span>تنحل</span></a>
</p>
</div>
</div>
</body>
</html>