Spaces:
Sleeping
Sleeping
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Invoice</title> | |
<style> | |
body { | |
font-family: Arial, sans-serif; | |
color: #333; | |
} | |
.invoice-container { | |
width: 80%; | |
margin: 0 auto; | |
} | |
.invoice-header { | |
text-align: center; | |
margin-bottom: 30px; | |
} | |
.invoice-header h1 { | |
font-size: 2rem; | |
margin: 0; | |
} | |
.invoice-details { | |
margin-bottom: 20px; | |
} | |
.invoice-details table { | |
width: 100%; | |
border-collapse: collapse; | |
} | |
.invoice-details th, .invoice-details td { | |
border: 1px solid #ddd; | |
padding: 8px; | |
text-align: left; | |
} | |
.invoice-summary { | |
margin-top: 30px; | |
text-align: right; | |
} | |
.invoice-summary p { | |
font-size: 1.2rem; | |
font-weight: bold; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="invoice-container"> | |
<div class="invoice-header"> | |
<h1>Invoice #{{ order.Id }}</h1> | |
<p>Date: {{ order.CreatedDate }}</p> | |
<p>Customer: {{ order.Customer_Name__c }}</p> | |
</div> | |
<div class="invoice-details"> | |
<h3>Order Details</h3> | |
<table> | |
<thead> | |
<tr> | |
<th>Item Name</th> | |
<th>Quantity</th> | |
<th>Price</th> | |
<th>Total</th> | |
</tr> | |
</thead> | |
<tbody> | |
{% for item in formatted_items %} | |
<tr> | |
<td>{{ item.split(' * ')[0] }}</td> | |
<td>{{ item.split(' * ')[1] }}</td> | |
<td>{{ item.split(' * ')[2] }}</td> | |
<td>{{ item.split(' * ')[3] }}</td> | |
</tr> | |
{% endfor %} | |
</tbody> | |
</table> | |
</div> | |
<div class="invoice-summary"> | |
<p>Total Amount: ₹{{ order.Total_Amount__c }}</p> | |
<p>Discount: ₹{{ "%.2f"|format(order.Discount__c) }}</p> | |
<p>Total Bill: ₹{{ "%.2f"|format(order.Total_Bill__c) }}</p> | |
</div> | |
</div> | |
</body> | |
</html> | |