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

317 lines
6.3 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 0 25mm 0;
color: #000;
}
.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 Ack Details Table -->
<table class="details-table">
<tr>
<td class="label">COMPANY NAME:</td>
<td>{{.CompanyName}}</td>
<td class="label">ORDER ACK #:</td>
<td>{{.OrderAckNumber}}</td>
</tr>
<tr>
<td class="label">CONTACT:</td>
<td>{{.Attention}}</td>
<td class="label">DATE:</td>
<td>{{.IssueDateString}}</td>
</tr>
<tr>
<td class="label">EMAIL:</td>
<td>{{.EmailTo}}</td>
<td class="label">YOUR REFERENCE:</td>
<td>{{.YourReference}}</td>
</tr>
<tr>
<td class="label">JOB TITLE:</td>
<td colspan="3">{{.JobTitle}}</td>
</tr>
</table>
<!-- Address Boxes -->
<div class="address-boxes">
<div class="address-box">
<h3>BILL TO:</h3>
<p>{{.BillTo}}</p>
</div>
<div class="address-box">
<h3>SHIP TO:</h3>
<p>{{.ShipTo}}</p>
</div>
</div>
<!-- Shipping Details -->
<table class="details-table">
<tr>
<td class="label">SHIP VIA:</td>
<td>{{.ShipVia}}</td>
<td class="label">FOB:</td>
<td>{{.FOB}}</td>
</tr>
<tr>
<td class="label">PAYMENT TERMS:</td>
<td colspan="3">{{.PaymentTerms}}</td>
</tr>
</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}}</td>
<td class="discount">{{if .Discount}}{{formatPrice .Discount}}{{else}}$0.00{{end}}</td>
<td class="total">{{formatPrice .TotalPrice}}</td>
</tr>
{{end}}
</tbody>
</table>
<!-- Totals -->
<div class="totals-container">
<table class="totals-table">
<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>{{if .ShowGST}}TOTAL PAYABLE{{else}}TOTAL{{end}}</td>
<td>{{formatTotal .Total}}</td>
</tr>
</table>
</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>