New double window print formats.

This commit is contained in:
Ty Reynolds
2026-06-10 08:20:17 -04:00
parent 5c5ff483a4
commit 4ed575c18f
3 changed files with 476 additions and 0 deletions

View File

@@ -0,0 +1,160 @@
<style>
@media print {
.window-address-space {
padding-top: 1in;
}
}
</style>
<div style="font-family: Helvetica, Arial, sans-serif; font-size: 10px; color: #333;">
{% set company_doc = frappe.get_doc("Company", company) %}
<!-- Header -->
<table style="width: 100%; border-bottom: 1px solid #ccc; margin-bottom: 15px;">
<tr>
<td style="text-align: center; position: relative; left: -100px;">
<h3 style="margin: 8px 0 0 0; font-size: 15px; font-weight: bold;">
{{ company_doc.company_name }}
</h3>
<p style="
margin: 10px 0 0 0;
font-family: Helvetica, Arial, sans-serif;
font-size: 10px;
line-height: 1.4;
text-align: center;
">
1063 Chestnut Level Road<br>
Quarryville PA 17566<br>
{% 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-family: Helvetica, Arial, sans-serif;
font-size: 14px;
width: 240px;
vertical-align: top;
">
<strong>Payment Reminder</strong><br>
<span>{{ doc.name }}</span><br>
<strong>Date:</strong> {{ frappe.utils.formatdate(doc.posting_date, "MM-dd-yyyy") }}
</td>
</tr>
</table>
<!-- Due info row -->
<table style="width:100%; margin-top:-4px; margin-bottom:10px;">
<tr>
<td style="width:60%;"></td>
<td style="width:40%; text-align:right; font-size:15px; line-height:1.4;">
<strong>Customer:</strong> {{ doc.customer }}<br>
<strong>Amount Due:</strong>
<span style="color:#c62828; font-size:17px;">${{ doc.grand_total }}</span>
</td>
</tr>
</table>
<!-- WINDOW ADDRESS -->
<div style="
position:absolute;
top:1.9in;
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>
<!-- PRINT SPACE -->
<div class="window-address-space">
<!-- Prominent notice banner -->
<div style="
border: 2px solid #c62828;
border-radius: 4px;
padding: 10px 16px;
margin-bottom: 14px;
background-color: #fff8f8;
text-align: center;
">
<div style="font-size: 16px; font-weight: bold; color: #c62828; letter-spacing: 0.5px;">
PAYMENT REMINDER
</div>
<div style="font-size: 12px; color: #555; margin-top: 4px;">
Our records show the following invoice(s) are past due. Please remit payment at your earliest convenience.
</div>
</div>
<!-- Invoices 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; text-align:left;">Invoice</th>
<th style="border:1px solid #ccc; padding:6px; text-align:center;">Due Date</th>
<th style="border:1px solid #ccc; padding:6px; text-align:center;">Days Overdue</th>
<th style="border:1px solid #ccc; padding:6px; text-align:right;">Outstanding</th>
<th style="border:1px solid #ccc; padding:6px; text-align:right;">Interest</th>
</tr>
</thead>
<tbody>
{% for row in doc.invoices %}
<tr>
<td style="border:1px solid #ccc; padding:6px; font-size:14px;">{{ row.sales_invoice }}</td>
<td style="border:1px solid #ccc; padding:6px; font-size:14px; text-align:center;">
{{ frappe.utils.formatdate(row.due_date, "MM-dd-yyyy") }}
</td>
<td style="border:1px solid #ccc; padding:6px; font-size:14px; text-align:center;">
{{ row.overdue_days }}
</td>
<td style="border:1px solid #ccc; padding:6px; font-size:14px; text-align:right;">
${{ row.outstanding_amount }}
</td>
<td style="border:1px solid #ccc; padding:6px; font-size:14px; text-align:right;">
${{ row.interest }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<!-- Totals -->
<div style="font-family: Helvetica, Arial, sans-serif; font-size:15px; color:#333; margin-top:10px; width:40%; margin-left:auto;">
<p style="display:flex; justify-content:space-between;">
<strong>Total Outstanding:</strong><span>${{ doc.total_outstanding }}</span>
</p>
{% if doc.dunning_fee and doc.dunning_fee > 0 %}
<p style="display:flex; justify-content:space-between;">
<strong>Dunning Fee:</strong><span>${{ doc.dunning_fee }}</span>
</p>
{% endif %}
{% if doc.total_interest and doc.total_interest > 0 %}
<p style="display:flex; justify-content:space-between;">
<strong>Total Interest:</strong><span>${{ doc.total_interest }}</span>
</p>
{% endif %}
<p style="display:flex; justify-content:space-between; border-top:2px solid #c62828; padding-top:6px; margin-top:4px;">
<strong style="color:#c62828;">Amount Due:</strong>
<span style="color:#c62828; font-weight:bold;">${{ 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;">
We value your business and would like to resolve this promptly. Please contact us if you have any questions or if payment has already been sent.
We accept payments by check or over the phone using a debit or credit card.
Thank you for your prompt attention — NS Innovations
</p>
</div>
</div>

View File

@@ -0,0 +1,153 @@
<style>
/* Reserve space in PRINT/PDF so table does not overlap window address */
@media print {
.window-address-space {
padding-top: 1in;
}
}
</style>
<div style="font-family: Helvetica, Arial, sans-serif; font-size: 12px; color: #333;">
{% set company_doc = frappe.get_doc("Company", company) %}
<!-- Header -->
<table style="width: 100%; border-bottom: 1px solid #ccc; margin-bottom: 10px;">
<tr>
<td style="text-align: center; position: relative; left: -100px;">
<h3 style="margin: 8px 0 0 0; font-size: 15px; font-weight: bold;">
{{ company_doc.company_name }}
</h3>
<p style="
margin: 10px 0 0 0;
font-family: Helvetica, Arial, sans-serif;
font-size: 10px;
line-height: 1.4;
text-align: center;
">
1063 Chestnut Level Road<br>
Quarryville PA 17566<br>
{% 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-family: Helvetica, Arial, sans-serif;
font-size: 14px;
width: 240px;
vertical-align: top;
">
<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>
</table>
<!-- Valid Till / Terms -->
<table style="width:100%; margin-top:-4px; margin-bottom:10px;">
<tr>
<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>
</table>
<!-- 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>
<!-- 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>
</div>

View File

@@ -0,0 +1,163 @@
<style>
@media print {
.window-address-space {
padding-top: 1in;
}
}
</style>
<div style="font-family: Helvetica, Arial, sans-serif; font-size: 12px; color: #333;">
{% set company_doc = frappe.get_doc("Company", company) %}
<!-- Header -->
<table style="width: 100%; border-bottom: 1px solid #ccc; margin-bottom: 10px;">
<tr>
<td style="text-align: center; position: relative; left: -100px;">
<h3 style="margin: 8px 0 0 0; font-size: 15px; font-weight: bold;">
{{ company_doc.company_name }}
</h3>
<p style="
margin: 10px 0 0 0;
font-family: Helvetica, Arial, sans-serif;
font-size: 10px;
line-height: 1.4;
text-align: center;
">
1063 Chestnut Level Road<br>
Quarryville PA 17566<br>
{% 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-family: Helvetica, Arial, sans-serif;
font-size: 14px;
width: 240px;
vertical-align: top;
">
<strong>Sales Order</strong><br>
<span>{{ doc.name }}</span><br>
Date: {{ frappe.utils.formatdate(doc.transaction_date, "MM-dd-yyyy") }}
</td>
</tr>
</table>
<!-- Delivery Date / Terms -->
<table style="width:100%; margin-top:-4px; margin-bottom:10px;">
<tr>
<td style="width:60%;"></td>
<td style="width:40%; text-align:right; font-size:15px; line-height:1.4;">
{% if doc.delivery_date %}
<strong>Delivery Date:</strong>
{{ frappe.utils.formatdate(doc.delivery_date, "MM-dd-yyyy") }}<br>
{% endif %}
<strong>Terms:</strong> {{ doc.payment_terms_template or "Net 30" }}
</td>
</tr>
</table>
<!-- 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>
<div class="window-address-space">
{% if doc.custom_subscription_data or doc.custom_invoice_notes %}
<table style="width:100%; margin-bottom:6px;">
<tr>
<td style="font-size:14px; line-height:1.3;">
{% if doc.custom_subscription_data %}
<div style="font-weight:bold;">
{{ doc.custom_subscription_data }}
</div>
{% endif %}
{% if doc.custom_invoice_notes %}
<div style="white-space:pre-line;">
{{ doc.custom_invoice_notes }}
</div>
{% endif %}
</td>
</tr>
</table>
{% endif %}
<!-- Items -->
<table style="width:100%; border-collapse:collapse; margin-bottom:0;">
<thead>
<tr style="background:#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-family: Helvetica, Arial, sans-serif; font-size: 15px; color: #333; 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>
<!-- Footer -->
<div style="margin-top:23px; font-size:10px; color:#777; text-align:center;">
<p style="white-space:pre-line; margin:0;">
This Sales Order is not an invoice.
Pricing and availability subject to confirmation.
Thank you for your business.
</p>
</div>
</div>