cmc-sales/go/internal/cmc/pdf/templates/quote.html

536 lines
10 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{{if .QuoteNumber}}{{.QuoteNumber}}{{else}}CMC Quote{{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;
}
.company-info {
display: flex;
align-items: flex-start;
gap: 10mm;
margin-bottom: 0;
padding-bottom: 0;
}
.logo {
width: 40mm;
height: auto;
display: block;
padding-right: 5mm;
}
.company-header {
text-align: center;
flex-grow: 1;
padding-top: 2mm;
}
.company-header h1 {
font-size: 24pt;
margin: 0;
font-weight: bold;
color: #003399;
}
.company-header p {
margin: 2mm 0 0 0;
font-size: 9pt;
}
.header-separator {
border-bottom: 2px solid #000;
margin: 3mm 0 5mm 0;
}
.contact-section {
display: flex;
justify-content: space-between;
margin-bottom: 5mm;
font-size: 9pt;
}
.engineering-col {
flex: 0 0 30%;
color: #003399;
font-weight: bold;
}
.contact-col {
flex: 0 0 40%;
}
.contact-col div {
margin: 1mm 0;
}
.contact-col strong {
display: inline-block;
width: 60px;
font-weight: bold;
}
.details-box {
width: 100%;
border-collapse: collapse;
margin: 5mm 0;
}
.details-box td {
border: 1px solid #000;
padding: 2mm;
font-size: 9pt;
}
.details-box td.label {
font-weight: bold;
width: 21%;
background-color: #f0f0f0;
}
.details-box td.value {
width: 29%;
}
.page-content {
margin: 5mm 0;
font-size: 9pt;
line-height: 1.5;
}
.page-content p {
margin: 3mm 0;
}
.page-content strong {
font-weight: bold;
}
.page-content em {
font-style: italic;
}
.page-content ul, .page-content ol {
margin: 2mm 0;
padding-left: 5mm;
}
.page-content li {
margin: 1mm 0;
}
.pricing-header {
text-align: center;
margin: 8mm 0 5mm 0;
}
.pricing-header h2 {
font-size: 14pt;
font-weight: bold;
margin: 0;
}
.line-items {
width: 99.5%;
border-collapse: collapse;
margin-bottom: 5mm;
table-layout: fixed;
margin-right: 1mm;
margin-left: auto;
}
.line-items th {
background-color: #f0f0f0;
border: 1px solid #000;
padding: 2mm;
font-weight: bold;
text-align: left;
}
.line-items td {
border: 1px solid #000;
padding: 2mm;
vertical-align: top;
}
.line-items .item-no {
width: 7%;
text-align: center;
}
.line-items .qty {
width: 7%;
text-align: center;
}
.line-items .description {
width: 56%;
}
.line-items .unit-price {
width: 15%;
text-align: right;
}
.line-items .total {
width: 15%;
text-align: right;
}
.totals-container {
display: flex;
justify-content: flex-end;
margin-top: 5mm;
}
.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;
}
.commercial-comments {
margin: 8mm 0;
}
.commercial-comments h3 {
font-size: 10pt;
font-weight: bold;
margin: 0 0 2mm 0;
}
.commercial-comments p {
margin: 0;
white-space: pre-wrap;
}
.quote-details-table {
width: 100%;
border-collapse: collapse;
margin: 5mm 0;
}
.quote-details-table td {
border: 1px solid #000;
padding: 2mm;
font-size: 9pt;
}
.quote-details-table td.label {
font-weight: bold;
width: 25%;
background-color: #f0f0f0;
}
.quote-details-table td.value {
width: 75%;
}
.description strong {
font-weight: bold;
}
.description em {
font-style: italic;
}
.description ul {
margin: 2mm 0;
padding-left: 5mm;
}
.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; }
.page-number {
position: fixed;
bottom: 25mm;
right: 15mm;
font-size: 9pt;
}
</style>
</head>
<body>
<!-- Company Header -->
<div class="company-info">
{{if .LogoDataURI}}
<img src="{{.LogoDataURI}}" class="logo" alt="CMC Technologies Logo">
{{end}}
<div class="company-header">
<h1>CMC TECHNOLOGIES</h1>
<p>PTY LIMITED ACN: 085 991 224&nbsp;&nbsp;&nbsp;&nbsp;ABN: 47 085 991 224</p>
</div>
</div>
<div class="header-separator"></div>
<!-- Contact Details Section -->
<div class="contact-section">
<div class="engineering-col">
<div>Engineering &</div>
<div>Industrial</div>
<div>Instrumentation</div>
</div>
<div class="contact-col">
<div><strong>Phone:</strong> +61 2 9669 4000</div>
<div><strong>Fax:</strong> +61 2 9669 4111</div>
<div><strong>Email:</strong> sales@cmctechnologies.com.au</div>
<div><strong>Web Site:</strong> www.cmctechnologies.net.au</div>
<div style="margin-top: 3mm;">Unit 19, 77 Bourke Rd</div>
<div>Alexandria NSW 2015</div>
<div>AUSTRALIA</div>
</div>
</div>
<!-- Quote Details Box -->
<table class="details-box">
<tr>
<td class="label">COMPANY NAME:</td>
<td class="value">{{.CompanyName}}</td>
<td class="label">QUOTE NO.:</td>
<td class="value">{{.QuoteNumber}}</td>
</tr>
<tr>
<td class="label">EMAIL TO:</td>
<td class="value">{{.EmailTo}}</td>
<td class="label">YOUR REFERENCE:</td>
<td class="value">{{.YourReference}}</td>
</tr>
<tr>
<td class="label">ATTENTION:</td>
<td class="value">{{.Attention}}</td>
<td class="label">ISSUE DATE:</td>
<td class="value">{{.IssueDateString}}</td>
</tr>
<tr>
<td class="label">FROM:</td>
<td class="value">{{.FromName}}</td>
<td class="label">EMAIL:</td>
<td class="value">{{.FromEmail}}</td>
</tr>
</table>
<!-- Page Content (WYSIWYG content) -->
{{if .PageContent}}
<div class="page-content">
{{.PageContent}}
</div>
{{end}}
<!-- Pricing & Specifications Header -->
<div class="pricing-header">
<h2>PRICING & SPECIFICATIONS</h2>
</div>
<!-- Line Items Table -->
<table class="line-items">
<thead>
<tr>
<th class="item-no">ITEM</th>
<th class="qty">QTY</th>
<th class="description">DESCRIPTION</th>
<th class="unit-price">UNIT PRICE</th>
<th class="total">TOTAL</th>
</tr>
</thead>
<tbody>
{{range .LineItems}}
<tr>
<td class="item-no">{{.ItemNumber}}</td>
<td class="qty">{{.Quantity}}</td>
<td class="description">
<strong>{{.Title}}</strong>
{{if .Description}}
<div>{{.Description}}</div>
{{end}}
</td>
<td class="unit-price">{{formatPrice .GrossUnitPrice}}</td>
<td class="total">{{formatPrice .GrossPrice}}</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>
<!-- Commercial Comments -->
{{if .CommercialComments}}
<div class="commercial-comments">
<h3>COMMERCIAL COMMENTS</h3>
<p>{{.CommercialComments}}</p>
</div>
{{end}}
<!-- Quote Details Table -->
{{if or .DeliveryTime .PaymentTerms .DaysValid .DeliveryPoint .ExchangeRate .CustomsDuty .GSTPhrase .SalesEngineer}}
<table class="quote-details-table">
{{if .DeliveryTime}}
<tr>
<td class="label">DELIVERY TIME:</td>
<td class="value">{{.DeliveryTime}}</td>
</tr>
{{end}}
{{if .PaymentTerms}}
<tr>
<td class="label">PAYMENT TERMS:</td>
<td class="value">{{.PaymentTerms}}</td>
</tr>
{{end}}
{{if .DaysValid}}
<tr>
<td class="label">QUOTATION VALID FOR:</td>
<td class="value">{{.DaysValid}} days from date of issue</td>
</tr>
{{end}}
{{if .DeliveryPoint}}
<tr>
<td class="label">DELIVERY POINT:</td>
<td class="value">{{.DeliveryPoint}}</td>
</tr>
{{end}}
{{if .ExchangeRate}}
<tr>
<td class="label">EXCHANGE RATE:</td>
<td class="value">{{.ExchangeRate}}</td>
</tr>
{{end}}
{{if .CustomsDuty}}
<tr>
<td class="label">CUSTOMS DUTY:</td>
<td class="value">{{.CustomsDuty}}</td>
</tr>
{{end}}
{{if .GSTPhrase}}
<tr>
<td class="label">GST:</td>
<td class="value">{{.GSTPhrase}}</td>
</tr>
{{end}}
{{if .SalesEngineer}}
<tr>
<td class="label">SALES ENGINEER:</td>
<td class="value">{{.SalesEngineer}}</td>
</tr>
{{end}}
</table>
{{end}}
<!-- Page Number -->
{{if .PageCount}}
<div class="page-number">
Page {{.CurrentPage}} of {{.PageCount}}
</div>
{{end}}
<!-- 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>