182 lines
5.9 KiB
HTML
182 lines
5.9 KiB
HTML
{% load tenhal_tag %}
|
|
{% load custom_filters %}
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="ar" dir="rtl">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>{{ po_model.po_number }}</title>
|
|
<style>
|
|
@font-face {
|
|
font-family: 'Noto Sans Arabic';
|
|
src: url('https://fonts.gstatic.com/s/notosansarabic/v35/or3qQxoQpw-Gv0yqj6V1p-B3.ttf') format('truetype');
|
|
}
|
|
|
|
/* General Body and Font Styles */
|
|
body {
|
|
font-family: 'Noto Sans Arabic', sans-serif;
|
|
font-size: 12px;
|
|
color: #333;
|
|
margin: 0;
|
|
padding: 0;
|
|
direction: rtl; /* This is the key for RTL support */
|
|
}
|
|
|
|
/* Page Layout and Margins for PDF */
|
|
@page {
|
|
size: A4;
|
|
margin: 20mm;
|
|
@top-left {
|
|
content: "صفحة " counter(page) " من " 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: left; /* Aligned to the left for RTL layout */
|
|
font-style: normal;
|
|
font-size: 10px;
|
|
}
|
|
|
|
/* Document Details Section */
|
|
.document-details {
|
|
display: flex;
|
|
flex-direction: row-reverse; /* Reverses the order of the sections */
|
|
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: right; /* Aligned to the right for RTL layout */
|
|
}
|
|
.table th {
|
|
background-color: #f2f2f2;
|
|
font-weight: bold;
|
|
}
|
|
.table tfoot td {
|
|
border-top: 2px solid #333;
|
|
font-weight: bold;
|
|
}
|
|
.text-right {
|
|
text-align: left; /* This is now for left alignment in an RTL context */
|
|
}
|
|
|
|
/* Footer Styles */
|
|
.document-footer {
|
|
text-align: center;
|
|
font-size: 10px;
|
|
color: #888;
|
|
border-top: 1px solid #ddd;
|
|
padding-top: 15px;
|
|
margin-top: 30px;
|
|
}
|
|
.footer-flex {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
width: 100%;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="document-header">
|
|
<div>
|
|
<h1>أمر شراء</h1>
|
|
<h2 style="font-size: 18px;">{{ po_model.po_number }}</h2>
|
|
</div>
|
|
<div>
|
|
<h1>{{ dealer.name }}</h1>
|
|
<address>
|
|
العنوان: {{ dealer.address }}<br>
|
|
البريد الإلكتروني: {{ dealer.user.email }}<br>
|
|
الهاتف: {{ dealer.phone_number }}<br>
|
|
رقم السجل التجاري: {{ dealer.crn }} | رقم ضريبة القيمة المضافة: {{ dealer.vrn }}
|
|
</address>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="document-details">
|
|
<div class="section">
|
|
<h2>التفاصيل:</h2>
|
|
<p><span class="label">رقم أمر الشراء:</span> {{ po_model.po_number }}</p>
|
|
<p><span class="label">تاريخ الإصدار:</span> {{ po_model.date_fulfilled|date:"Y/m/d" }}</p>
|
|
</div>
|
|
<div class="section">
|
|
<h2>يُرسل إلى:</h2>
|
|
<p><span class="label">المورد:</span> {{ vendor.vendor_name }}</p>
|
|
<p><span class="label">البريد الإلكتروني:</span> {{ vendor.email }}</p>
|
|
<p><span class="label">الهاتف:</span> {{ vendor.phone }}</p>
|
|
<p><span class="label">العنوان:</span> {{ vendor.address_1 }}</p>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-12">
|
|
<div class="table-responsive">
|
|
{% include 'purchase_orders/tags/po_item_table_print_ar.html' with po_items_list=po_items_list %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="document-details" style="margin-top: 30px;">
|
|
<div class="section" style="width: 100%;">
|
|
<h2>ملاحظات:</h2>
|
|
<p>{{ po_model.notes|default:"لا توجد ملاحظات إضافية." }}</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="document-details" style="margin-top: 10px; border-top: 1px solid #ddd; padding-top: 10px;">
|
|
<div class="section text-right" style="width: 100%;">
|
|
<p class="h4"><span class="label">المبلغ الإجمالي:</span> {{ po_total_amount|floatformat:'2g' }}<span class="icon-saudi_riyal"></span></p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="document-footer footer-flex">
|
|
<p>© <strong>هيكل</strong> {% now "Y" %} جميع الحقوق محفوظة.</p>
|
|
<p><strong>تنحل</strong>مدعوم من</p>
|
|
</div>
|
|
</body>
|
|
</html> |