first commit
This commit is contained in:
@@ -0,0 +1,285 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
background: white;
|
||||
font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1000px;
|
||||
margin: 0 auto;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.header-section {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 30px;
|
||||
border-bottom: 2px solid #1a7a4d;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
.header-section img {
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.doc-title {
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
color: #1a7a4d;
|
||||
text-align: center;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.po-number {
|
||||
text-align: right;
|
||||
color: #666;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.info-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 20px;
|
||||
margin-bottom: 30px;
|
||||
background: #e8f5e9;
|
||||
padding: 15px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.info-left, .info-right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.info-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
font-weight: bold;
|
||||
color: #2e7d32;
|
||||
min-width: 150px;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.items-table thead {
|
||||
background-color: #2e7d32;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.items-table th {
|
||||
padding: 12px;
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.items-table td {
|
||||
padding: 12px;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.items-table tbody tr:nth-child(even) {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.summary-area {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.summary-table {
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
.summary-table td {
|
||||
padding: 10px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.summary-table td:first-child {
|
||||
font-weight: bold;
|
||||
background-color: #f5f5f5;
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.summary-table td:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.total-row {
|
||||
background-color: #2e7d32;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.terms-section {
|
||||
margin-top: 30px;
|
||||
border-top: 1px solid #ddd;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.terms-section h4 {
|
||||
color: #2e7d32;
|
||||
font-size: 12px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.terms-section p {
|
||||
font-size: 11px;
|
||||
color: #666;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.footer-note {
|
||||
text-align: center;
|
||||
margin-top: 40px;
|
||||
border-top: 2px solid #ddd;
|
||||
padding-top: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<!-- HEADER SECTION -->
|
||||
<div class="header-section">
|
||||
<div>
|
||||
<% if (logoBase64) { %>
|
||||
<img src="<%= logoBase64 %>" alt="Company Logo" />
|
||||
<% } %>
|
||||
</div>
|
||||
<div style="flex: 1; text-align: center;">
|
||||
<div class="doc-title">PURCHASE ORDER</div>
|
||||
</div>
|
||||
<div class="po-number">
|
||||
<strong>PO #:</strong> <%= poNumber || 'N/A' %><br/>
|
||||
<strong>Date:</strong> <%= date || 'N/A' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- INFO GRID -->
|
||||
<div class="info-grid">
|
||||
<div class="info-left">
|
||||
<div class="info-row">
|
||||
<span class="info-label">VENDOR:</span>
|
||||
</div>
|
||||
<div style="margin-left: 0;">
|
||||
<strong><%= vendorName || 'Vendor Name' %></strong><br/>
|
||||
<%= vendorAddress || 'Address' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-right">
|
||||
<div class="info-row">
|
||||
<span class="info-label">DELIVERY DATE:</span>
|
||||
<span class="info-value"><%= deliveryDate || 'N/A' %></span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<span class="info-label">PAYMENT TERMS:</span>
|
||||
<span class="info-value"><%= paymentTerms || 'Net 30' %></span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<span class="info-label">VESSEL:</span>
|
||||
<span class="info-value"><%= vesselName || 'N/A' %></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ITEMS TABLE -->
|
||||
<div style="overflow-x: auto;">
|
||||
<table class="items-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ITEM NO</th>
|
||||
<th>DESCRIPTION</th>
|
||||
<th>QTY</th>
|
||||
<th>UNIT</th>
|
||||
<th>UNIT PRICE</th>
|
||||
<th>TOTAL</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% if (items && items.length > 0) { %>
|
||||
<% items.forEach((item, index) => { %>
|
||||
<tr>
|
||||
<td><%= index + 1 %></td>
|
||||
<td><%= item.description || item.item_name || '' %></td>
|
||||
<td><%= item.quantity || 0 %></td>
|
||||
<td><%= item.unit || '' %></td>
|
||||
<td><%= item.unit_price || 0 %></td>
|
||||
<td><%= (item.quantity || 0) * (item.unit_price || 0) %></td>
|
||||
</tr>
|
||||
<% }); %>
|
||||
<% } %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- SUMMARY SECTION -->
|
||||
<div class="summary-area">
|
||||
<table class="summary-table">
|
||||
<tr>
|
||||
<td>SUB TOTAL</td>
|
||||
<td><%= subtotal || 0 %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>TAX (%)</td>
|
||||
<td><%= tax || 0 %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>SHIPPING</td>
|
||||
<td><%= shipping || 0 %></td>
|
||||
</tr>
|
||||
<tr class="total-row">
|
||||
<td>TOTAL</td>
|
||||
<td><%= total || 0 %></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- TERMS SECTION -->
|
||||
<% if (paymentTermsDetails || notes) { %>
|
||||
<div class="terms-section">
|
||||
<% if (paymentTermsDetails) { %>
|
||||
<h4>TERMS & CONDITIONS</h4>
|
||||
<p><%= paymentTermsDetails %></p>
|
||||
<% } %>
|
||||
<% if (notes) { %>
|
||||
<h4>SPECIAL INSTRUCTIONS</h4>
|
||||
<p><%= notes %></p>
|
||||
<% } %>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
<!-- FOOTER -->
|
||||
<div class="footer-note">
|
||||
<p style="font-size: 10px; color: #999;">Please confirm receipt and delivery dates</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user