innvoice / templets /invoice_template.html
Subbu1304's picture
Rename templets/innvoice.html to templets/invoice_template.html
75e865e verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Invoice</title>
<style>
/* Style for invoice (same as your order page, just extended for invoice) */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
.invoice-container {
width: 80%;
margin: 20px auto;
padding: 30px;
border: 1px solid #ddd;
border-radius: 8px;
background-color: #f9f9f9;
}
.invoice-header {
text-align: center;
margin-bottom: 20px;
}
.invoice-header h2 {
font-size: 2rem;
color: #333;
}
.invoice-details, .invoice-items {
margin-bottom: 20px;
}
.invoice-items table {
width: 100%;
border-collapse: collapse;
}
.invoice-items th, .invoice-items td {
padding: 8px;
border: 1px solid #ddd;
text-align: left;
}
.invoice-total {
font-size: 1.5rem;
font-weight: bold;
text-align: right;
}
footer {
text-align: center;
margin-top: 30px;
}
</style>
</head>
<body>
<div class="invoice-container">
<div class="invoice-header">
<h2>Invoice</h2>
<p><strong>Invoice Number:</strong> {{ order['Invoice_No'] }} | <strong>Invoice Date:</strong> {{ order['Invoice_Date'] }}</p>
</div>
<div class="invoice-details">
<p><strong>Customer Name:</strong> {{ order['Customer_Name'] }}</p>
<p><strong>Delivery Address:</strong> {{ order['Delivery_Address'] }}</p>
<p><strong>GSTIN:</strong> {{ order['GSTIN'] }}</p>
</div>
<div class="invoice-items">
<h3>Order Details</h3>
<table>
<tr>
<th>Item</th>
<th>Quantity</th>
<th>Price</th>
</tr>
{% for item in order['Order_Details'] %}
<tr>
<td>{{ item['name'] }}</td>
<td>{{ item['quantity'] }}</td>
<td>{{ item['price'] }}</td>
</tr>
{% endfor %}
</table>
</div>
<div class="invoice-total">
<p><strong>Total Amount:</strong> ₹{{ order['Total_Amount'] }}</p>
<p><strong>Discount:</strong> ₹{{ order['Discount'] }}</p>
<p><strong>Total Bill:</strong> ₹{{ order['Total_Bill'] }}</p>
</div>
<footer>
<p>Thank you for your order! We hope to serve you again.</p>
</footer>
</div>
</body>
</html>