Hello! I want to generate a PDF file for my purchase orders using HTML code. Can you please check what is wrong with my code below. It is not working whenever I triggered the button to generate a pdf.
<!DOCTYPE html>
<html>
<head>
<title>Purchase Order Template</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 1cm;
line-height: 1.5;
}
.header, .footer {
text-align: center;
font-weight: bold;
}
.header {
margin-bottom: 1cm;
}
.footer {
margin-top: 1cm;
}
.section {
margin-bottom: 0.5cm;
}
.section h3 {
margin-bottom: 0.3cm;
}
.table {
width: 100%;
border-collapse: collapse;
margin-bottom: 0.5cm;
font-size: 12px;
}
.table th, .table td {
border: 1px solid #000;
padding: 6px;
text-align: left;
}
.notes {
margin-top: 0.5cm;
}
</style>
</head>
<body>
<div class="PO">
<div class="header">
<h1>Refrigeration House Contracting Company</h1>
<h2>PURCHASE ORDER</h2>
<h3>Order Details</h3>
</div>
<div class="section">
<h3>Supplier Information</h3>
<p>
<strong>Supplier:</strong> <<[Supplier Name]>><br>
<strong>Contact Person:</strong> <<[Contact Person]>><br>
<strong>Address:</strong> <<[Address]>><br>
<strong>Purchase Order No.:</strong> <<[PO No.]>><br>
<strong>PO Date:</strong> <<[PO Date]>><br>
<strong>Incoterm:</strong> Ex-Works <<[Origin]>><br>
<strong>Payment Term:</strong> <<[Payment Terms]>>
</p>
</div>
<div class="section">
<h3>Ship To</h3>
<p>
Mr. Mohammed Baiju<br>
<PII REMOVED BY STAFF>
</p>
</div>
<table class="table">
<thead>
<tr>
<th>SN</th>
<th>Code No.</th>
<th>Description</th>
<th>Quantity</th>
<th>Net Price</th>
<th>Total Price</th>
</tr>
</thead>
<tbody>
<!-- Dynamic rows start here -->
<td><<Start: [Related PO Items]>><<[No.]>></td>
<td><<[Item No.]>></td>
<td><<[Item Description]>></td>
<td><<[Requested Qty]>></td>
<td><<[Unit Price]>></td>
<td><<[Ext. Price (Open)]>><<[End]>></td>
</tr>
<!-- Dynamic rows end here -->
</tbody>
</table>
<p><strong>Subtotal:</strong> <<[Currency]>> <<[Open Amount]>></p>
<div class="notes">
<h3>Notes:</h3>
<p>
<<[Note1]>><br>
<<[Additional Note]>><br>
<<[Note2]>><br>
<<[Note3]>><br>
<<[Note4]>><br>
<<[Note5]>><br>
<<[Note6]>>
</p>
</div>
<div class="footer">
<table style="width: 100%;">
<tr>
<td style="text-align: center;">
Eng. Mohammed Baiju<br>
<span style="font-weight: normal;">Regional Sales Manager</span>
</td>
<td style="text-align: center;">
Mohammed Ziou Ziou<br>
<span style="font-weight: normal;">Branch Manager</span>
</td>
</tr>
</table>
</div>
</body>
</html>
User | Count |
---|---|
18 | |
11 | |
7 | |
4 | |
3 |