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

294 lines
5.9 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{{if .PONumber}}{{.PONumber}}{{else}}CMC Purchase Order{{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;
}
.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: 40%;
word-wrap: break-word;
overflow-wrap: break-word;
}
.line-items .qty {
width: 10%;
text-align: center;
}
.line-items .unit-price {
width: 15%;
text-align: right;
}
.line-items .discount {
width: 15%;
text-align: right;
}
.line-items .total {
width: 20%;
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;
}
.info-section {
margin: 5mm 0;
}
.info-section h3 {
font-size: 10pt;
font-weight: bold;
margin: 0 0 2mm 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" .}}
<!-- PO Details Table -->
<table class="details-table">
<tr>
<td class="label">SUPPLIER:</td>
<td>{{.PrincipleName}}</td>
<td class="label">PO NUMBER:</td>
<td>{{.PONumber}}</td>
</tr>
<tr>
<td class="label">YOUR REFERENCE:</td>
<td>{{.YourReference}}</td>
<td class="label">ISSUE DATE:</td>
<td>{{.IssueDateString}}</td>
</tr>
<tr>
<td class="label">ORDERED FROM:</td>
<td colspan="3">{{.OrderedFrom}}</td>
</tr>
<tr>
<td class="label">DELIVER TO:</td>
<td colspan="3">{{.DeliverTo}}</td>
</tr>
{{if .DispatchBy}}
<tr>
<td class="label">DISPATCH BY:</td>
<td colspan="3">{{.DispatchBy}}</td>
</tr>
{{end}}
</table>
{{if .ShippingInstructions}}
<div class="info-section">
<h3>SHIPPING INSTRUCTIONS</h3>
<p>{{.ShippingInstructions}}</p>
</div>
{{end}}
<!-- Currency Code Header - keep with table -->
<div style="margin-bottom: 1mm; text-align: right; font-weight: bold; font-size: 9pt; page-break-after: avoid; page-break-inside: avoid;">
Shown in {{.CurrencyCode}}
</div>
<!-- Line Items Table -->
<table class="line-items" style="page-break-before: avoid;">
<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">{{formatPrice .Discount}}</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>