cmc-sales/go/internal/cmc/documents/templates/order-acknowledgement.html

382 lines
9 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{{if .OrderAckNumber}}{{.OrderAckNumber}}{{else}}CMC Order Acknowledgement{{end}}</title>
<style>
@page {
size: A4;
margin: 15mm;
}
body {
font-family: Helvetica, Arial, sans-serif;
font-size: 9pt;
line-height: 1.4;
margin: 0;
padding: 0;
color: #000;
}
a {
color: #0000FF;
text-decoration: underline;
}
.header {
text-align: center;
margin-bottom: 10mm;
}
.header h1 {
font-size: 20pt;
margin: 0 0 5mm 0;
font-weight: bold;
}
.details-table {
width: 100%;
border-collapse: collapse;
margin-bottom: 5mm;
}
.details-table td {
border: 1px solid #000;
padding: 2mm;
font-size: 9pt;
}
.details-table td.label {
font-weight: bold;
width: 25%;
background-color: #f0f0f0;
}
.address-boxes {
display: flex;
justify-content: space-between;
margin-bottom: 5mm;
}
.address-box {
width: 48%;
border: 1px solid #000;
padding: 3mm;
}
.address-box h3 {
font-size: 10pt;
margin: 0 0 2mm 0;
font-weight: bold;
}
.line-items {
width: 99.5%;
border-collapse: collapse;
margin-bottom: 5mm;
table-layout: fixed;
margin-right: 1mm;
margin-left: auto;
page-break-after: avoid;
}
.line-items th {
background-color: #f0f0f0;
border: 1px solid #000;
padding: 2mm;
font-weight: bold;
text-align: left;
}
.line-items tbody tr {
page-break-inside: avoid;
}
.line-items td {
border: 1px solid #000;
padding: 2mm;
vertical-align: top;
}
.line-items .description {
width: 50%;
word-wrap: break-word;
overflow-wrap: break-word;
}
.line-items .qty {
width: 10%;
text-align: center;
}
.line-items .unit-price {
width: 13%;
text-align: right;
}
.line-items .discount {
width: 13%;
text-align: right;
}
.line-items .total {
width: 14%;
text-align: right;
}
.totals-container {
display: flex;
justify-content: flex-end;
margin-top: 5mm;
page-break-inside: avoid;
page-break-before: avoid;
}
.totals-table {
width: auto;
border-collapse: collapse;
border: 1px solid #000;
margin-right: 0.2mm;
}
.totals-table td {
padding: 1mm 3mm;
border: 1px solid #000;
}
.totals-table td:first-child {
text-align: left;
font-weight: bold;
width: 50%;
background-color: #f0f0f0;
}
.totals-table td:last-child {
text-align: right;
width: 50%;
}
.totals-table .total-row td {
font-weight: bold;
font-size: 11pt;
padding-top: 2mm;
border-top: 1px solid #000;
}
.description strong {
font-weight: bold;
}
.description em {
font-style: italic;
}
.description ul, .description ol {
margin: 2mm 0;
padding-left: 5mm;
}
.description li {
margin: 1mm 0;
}
.footer {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 20mm;
border-top: 1px solid #000;
padding-top: 2mm;
font-size: 9pt;
text-align: center;
}
.footer .services-title {
font-weight: normal;
margin-bottom: 2mm;
}
.footer .services-line1, .footer .services-line2 {
margin: 1mm 0;
}
.footer .service-explosion { color: #990006; }
.footer .service-fire { color: #FF9900; }
.footer .service-pressure { color: #FF0019; }
.footer .service-vision { color: #00801E; }
.footer .service-flow { color: #2F4BE0; }
.footer .service-process { color: #AB31F8; }
</style>
</head>
<body>
{{template "CompanyHeader" .}}
<!-- ORDER ACKNOWLEDGEMENT heading and info, mirroring invoice layout -->
<div style="display: flex; justify-content: space-between; align-items: center; margin: 2mm 0 3mm 0;">
<div style="flex: 1;"></div>
<div style="flex: 1; text-align: center;">
<h2 style="font-size: 16pt; margin: 0; font-weight: bold;">ORDER ACKNOWLEDGEMENT</h2>
</div>
<div style="flex: 1; text-align: right; font-size: 10pt;">
{{if .OrderAckNumber}}
<div style="font-weight: bold; margin-bottom: 1mm;">ORDER ACK# {{.OrderAckNumber}}</div>
{{end}}
{{if .IssueDateString}}
<div><strong>Date:</strong> {{.IssueDateString}}</div>
{{end}}
{{if .PageCount}}
<div><strong>Page:</strong> {{.CurrentPage}} of {{.PageCount}}</div>
{{end}}
</div>
</div>
<!-- Optional Order Ack details (kept for field completeness) -->
<table class="details-table">
<tr>
<td class="label">COMPANY NAME:</td>
<td>{{.CompanyName}}</td>
<td class="label">YOUR REFERENCE:</td>
<td>{{.YourReference}}</td>
</tr>
<tr>
<td class="label">CONTACT:</td>
<td>{{.Attention}}</td>
<td class="label">EMAIL:</td>
<td>{{.EmailTo}}</td>
</tr>
<tr>
<td class="label">JOB TITLE:</td>
<td colspan="3">{{.JobTitle}}</td>
</tr>
</table>
<!-- Address Boxes -->
<div class="address-boxes" style="display: flex; gap: 5mm; margin-bottom: 3mm;">
<div class="address-box" style="flex: 1;">
<h3>Sold To / Invoice Address:</h3>
<div>{{.BillTo}}</div>
</div>
<div class="address-box" style="flex: 1; margin-right: 1mm; margin-left: auto;">
<h3>Delivery Address:</h3>
<div>{{.ShipTo}}</div>
</div>
</div>
<!-- Details Table - match invoice 5-column layout -->
<table class="line-items" style="margin-bottom: 3mm;">
<thead>
<tr>
<th style="width: 20%;">CUSTOMER ORDER NO</th>
<th style="width: 20%;">CMC JOB #</th>
<th style="width: 20%;">INCOTERMS 2010</th>
<th style="width: 20%;">PAYMENT TERMS</th>
<th style="width: 20%;">CUSTOMER ABN</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{.YourReference}}</td>
<td>{{.JobTitle}}</td>
<td>{{.FOB}}</td>
<td>{{.PaymentTerms}}</td>
<td>{{.CustomerABN}}</td>
</tr>
</tbody>
</table>
<!-- Currency Code Header -->
<div style="margin-bottom: 1mm; text-align: right; font-weight: bold; font-size: 9pt;">
Shown in {{.CurrencyCode}}
</div>
<!-- Line Items Table -->
<table class="line-items">
<thead>
<tr>
<th class="description">DESCRIPTION</th>
<th class="qty">QTY</th>
<th class="unit-price">UNIT PRICE</th>
<th class="discount">DISCOUNT</th>
<th class="total">TOTAL</th>
</tr>
</thead>
<tbody>
{{range .LineItems}}
<tr>
<td class="description"><strong>{{.Title}}</strong>{{if .Description}}<br/>{{.Description}}{{end}}</td>
<td class="qty">{{.Quantity}}</td>
<td class="unit-price">{{formatPrice .UnitPrice .UnitPriceText}}</td>
<td class="discount">{{formatDiscount .Discount .HasTextPrices}}</td>
<td class="total">{{formatPrice .TotalPrice .TotalPriceText}}</td>
</tr>
{{end}}
</tbody>
</table>
<!-- Payment and Totals Side by Side -->
<div style="display: flex; gap: 10mm; align-items: flex-start; margin-top: 5mm;">
<div style="width: 50%; padding: 3mm; font-size: 9pt; border: 1px solid #000;">
<h4 style="margin: 0 0 2mm 0; font-weight: bold; font-size: 10pt;">MAKE PAYMENT TO:</h4>
<table style="width: 100%; border-collapse: collapse;">
<tr>
<td style="font-weight: bold; width: 50%; padding: 1mm 0;">Account Name:</td>
<td style="width: 50%; padding: 1mm 0;">CMC Technologies Pty Ltd</td>
</tr>
<tr>
<td style="font-weight: bold; padding: 1mm 0;">BSB:</td>
<td style="padding: 1mm 0;">062-458</td>
</tr>
<tr>
<td style="font-weight: bold; padding: 1mm 0;">Account Number:</td>
<td style="padding: 1mm 0;">10067982</td>
</tr>
<tr>
<td style="font-weight: bold; padding: 1mm 0;">SWIFT:</td>
<td style="padding: 1mm 0;">CTBAAU2S</td>
</tr>
<tr>
<td style="font-weight: bold; padding: 1mm 0;">IBAN:</td>
<td style="padding: 1mm 0;">0624581006782</td>
</tr>
</table>
</div>
<div style="width: 50%; margin-left: auto; margin-right: 1mm;">
<table class="totals-table" style="width: 100%;">
<tr><td>Subtotal:</td><td>{{formatTotal .Subtotal}}</td></tr>
{{if .ShowGST}}
<tr><td>GST (10%):</td><td>{{formatTotal .GSTAmount}}</td></tr>
{{end}}
<tr class="total-row"><td>TOTAL:</td><td>{{formatTotal .Total}}</td></tr>
</table>
</div>
</div>
<!-- Freight Details -->
<div style="margin-top: 5mm; margin-right: 1mm; padding: 3mm; border: 1px solid #000; font-size: 9pt;">
<h4 style="margin: 0 0 1mm 0; font-weight: bold; font-size: 10pt;">FREIGHT DETAILS:</h4>
<div style="font-size: 9pt; line-height: 1.3;">
{{if .FreightDetails}}
{{.FreightDetails}}
{{end}}
</div>
</div>
<!-- Footer -->
<div class="footer">
<div class="services-title">CMC TECHNOLOGIES Provides Solutions in the Following Fields</div>
<div class="services-line1">
<span class="service-explosion">EXPLOSION PREVENTION AND PROTECTION</span>
<span class="service-fire">FIRE PROTECTION</span>
<span class="service-pressure">PRESSURE RELIEF</span>
<span class="service-vision">VISION IN THE PROCESS</span>
</div>
<div class="services-line2">
<span class="service-flow">FLOW MEASUREMENT</span>
<span class="service-process">PROCESS INSTRUMENTATION</span>
</div>
</div>
</body>
</html>