updated quote print format
This commit is contained in:
@@ -1,95 +1,139 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Quotation</title>
|
||||
</head>
|
||||
<style>
|
||||
/* Reserve space in PRINT/PDF so table does not overlap window address */
|
||||
@media print {
|
||||
.window-address-space {
|
||||
padding-top: 1in;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<body style="font-family: Helvetica, Arial, sans-serif; font-size: 14px; color: #333;">
|
||||
<div style="font-family: Helvetica, Arial, sans-serif; font-size: 12px; color: #333;">
|
||||
|
||||
<!-- HEADER -->
|
||||
<table style="width:100%; border-bottom:1px solid #ccc; margin-bottom:12px;">
|
||||
<tr>
|
||||
<td>
|
||||
<h2 style="margin:0;">{{ doc.company }}</h2>
|
||||
{% if doc.company_address %}
|
||||
<p style="margin:0;">{{ doc.company_address }}</p>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<h1 style="margin:0;">QUOTATION</h1>
|
||||
<p style="margin:0;"><strong>Quote #:</strong> {{ doc.name }}</p>
|
||||
<p style="margin:0;"><strong>Date:</strong> {{ doc.transaction_date }}</p>
|
||||
{% if doc.valid_till %}
|
||||
<p style="margin:0;"><strong>Valid Till:</strong> {{ doc.valid_till }}</p>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{% set company_doc = frappe.get_doc("Company", company) %}
|
||||
|
||||
<!-- CUSTOMER -->
|
||||
<table style="width:100%; margin-bottom:16px;">
|
||||
<tr>
|
||||
<td>
|
||||
<strong>Quote To:</strong><br>
|
||||
{{ doc.customer_name }}<br>
|
||||
{% if doc.customer_address %}
|
||||
{{ doc.customer_address }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- ITEMS TABLE -->
|
||||
<table style="width:100%; border-collapse:collapse; font-size:14px;">
|
||||
<thead>
|
||||
<!-- Header -->
|
||||
<table style="width: 100%; border-bottom: 1px solid #ccc; margin-bottom: 10px;">
|
||||
<tr>
|
||||
<th style="border:1px solid #ccc; padding:6px;">Item</th>
|
||||
<th style="border:1px solid #ccc; padding:6px;">Description</th>
|
||||
<th style="border:1px solid #ccc; padding:6px; text-align:right;">Qty</th>
|
||||
<th style="border:1px solid #ccc; padding:6px; text-align:right;">Rate</th>
|
||||
<th style="border:1px solid #ccc; padding:6px; text-align:right;">Amount</th>
|
||||
<td>
|
||||
<h2 style="margin: 0;"><strong>{{ company_doc.company_name }}</strong></h2>
|
||||
<p style="margin: 0; font-size: 14px;">
|
||||
1063 Chestnut Level Road, Quarryville PA 17566<br>
|
||||
{% if company_doc.address %}{{ company_doc.address }}<br>{% endif %}
|
||||
{% if company_doc.phone_no %}Phone: {{ company_doc.phone_no }}{% endif %}
|
||||
{% if company_doc.email %} | Email: {{ company_doc.email }}{% endif %}
|
||||
</p>
|
||||
</td>
|
||||
<td style="text-align: right; font-size: 14px;">
|
||||
<strong>Quotation:</strong>
|
||||
<span>{{ doc.name }}</span><br>
|
||||
<strong>Date:</strong> {{ frappe.utils.formatdate(doc.transaction_date, "MM-dd-yyyy") }}<br>
|
||||
<strong>Valid Till:</strong>
|
||||
{{ frappe.utils.formatdate(doc.valid_till, "MM-dd-yyyy") if doc.valid_till else "" }}
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in doc.items %}
|
||||
</table>
|
||||
|
||||
<!-- Valid Till / Terms -->
|
||||
<table style="width:100%; margin-top:-4px; margin-bottom:10px;">
|
||||
<tr>
|
||||
<td style="border:1px solid #ccc; padding:6px;">{{ row.item_code }}</td>
|
||||
<td style="border:1px solid #ccc; padding:6px;">{{ row.item_name }}</td>
|
||||
<td style="border:1px solid #ccc; padding:6px; text-align:right;">{{ row.qty }}</td>
|
||||
<td style="border:1px solid #ccc; padding:6px; text-align:right;">{{ row.rate }}</td>
|
||||
<td style="border:1px solid #ccc; padding:6px; text-align:right;">{{ row.amount }}</td>
|
||||
<td style="width:60%;"></td>
|
||||
<td style="width:40%; text-align:right; font-size:15px; line-height:1.4;">
|
||||
<strong>Terms:</strong>
|
||||
{{ doc.payment_terms_template or "Net 30" }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
<!-- TOTALS -->
|
||||
<div style="font-size: 15px; margin-top: 8px; width: 40%; margin-left: auto;">
|
||||
<p style="display:flex; justify-content:space-between;">
|
||||
<strong>Subtotal:</strong>
|
||||
<span>{{ doc.total }}</span>
|
||||
</p>
|
||||
<!-- WINDOW ADDRESS -->
|
||||
<div style="
|
||||
position:absolute;
|
||||
top:1.5in;
|
||||
left:1.125in;
|
||||
width:4.5in;
|
||||
height:1.25in;
|
||||
font-size:15px;
|
||||
line-height:1.15em;
|
||||
overflow:hidden;
|
||||
">
|
||||
{{ doc.customer_name }}<br>
|
||||
{{ doc.address_display or doc.customer_address }}
|
||||
</div>
|
||||
|
||||
{% for tax in doc.taxes %}
|
||||
<p style="display:flex; justify-content:space-between;">
|
||||
<strong>{{ tax.account_head }} ({{ tax.rate }}%):</strong>
|
||||
<span>{{ tax.tax_amount }}</span>
|
||||
</p>
|
||||
{% endfor %}
|
||||
<!-- PRINT SPACE -->
|
||||
<div class="window-address-space">
|
||||
|
||||
{% if doc.terms or doc.note %}
|
||||
<table style="width:100%; margin:0 0 6px 0;">
|
||||
<tr>
|
||||
<td style="font-size:14px; line-height:1.3;">
|
||||
{% if doc.note %}
|
||||
<div style="font-weight:bold;">
|
||||
{{ doc.note }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if doc.terms %}
|
||||
<div style="white-space:pre-line;">
|
||||
{{ doc.terms }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
<!-- Items Table -->
|
||||
<table style="width:100%; border-collapse:collapse; margin-bottom:0;">
|
||||
<thead>
|
||||
<tr style="background-color:#f5f5f5;">
|
||||
<th style="border:1px solid #ccc; padding:6px;">Item</th>
|
||||
<th style="border:1px solid #ccc; padding:6px;">Description</th>
|
||||
<th style="border:1px solid #ccc; padding:6px; text-align:right;">Qty</th>
|
||||
<th style="border:1px solid #ccc; padding:6px; text-align:right;">Rate</th>
|
||||
<th style="border:1px solid #ccc; padding:6px; text-align:right;">Amount</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in doc.items %}
|
||||
<tr>
|
||||
<td style="border:1px solid #ccc; padding:6px; font-size:14px;">{{ row.item_code }}</td>
|
||||
<td style="border:1px solid #ccc; padding:6px; font-size:14px;">{{ row.item_name }}</td>
|
||||
<td style="border:1px solid #ccc; padding:6px; font-size:14px; text-align:right;">{{ row.qty }}</td>
|
||||
<td style="border:1px solid #ccc; padding:6px; font-size:14px; text-align:right;">{{ row.rate }}</td>
|
||||
<td style="border:1px solid #ccc; padding:6px; font-size:14px; text-align:right;">{{ row.amount }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- Totals -->
|
||||
<div style="font-size:15px; margin-top:10px; width:40%; margin-left:auto;">
|
||||
<p style="display:flex; justify-content:space-between;">
|
||||
<strong>Subtotal:</strong><span>{{ doc.total }}</span>
|
||||
</p>
|
||||
|
||||
{% for tax in doc.taxes %}
|
||||
<p style="display:flex; justify-content:space-between;">
|
||||
<strong>{{ tax.account_head }} ({{ tax.rate }}%):</strong>
|
||||
<span>{{ tax.tax_amount }}</span>
|
||||
</p>
|
||||
{% endfor %}
|
||||
|
||||
<p style="display:flex; justify-content:space-between;">
|
||||
<strong>Total:</strong><span>{{ doc.grand_total }}</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div> <!-- end print space -->
|
||||
|
||||
<!-- Footer -->
|
||||
<div style="margin-top:23px; font-size:10px; color:#777; text-align:center;">
|
||||
<p style="white-space:pre-line; margin:0;">
|
||||
This quotation is valid until the date listed above and subject to change thereafter.
|
||||
|
||||
Pricing does not include applicable taxes unless otherwise stated.
|
||||
|
||||
Thank you for considering NS Innovations.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p style="display:flex; justify-content:space-between;">
|
||||
<strong>Total:</strong>
|
||||
<span>{{ doc.grand_total }}</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- TERMS -->
|
||||
{% if doc.terms %}
|
||||
<hr>
|
||||
<p><strong>Terms & Conditions</strong></p>
|
||||
<p>{{ doc.terms }}</p>
|
||||
{% endif %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user