Add invoice generator for fuel station transactions
- Read CSV files from input/ directory - Generate static HTML invoices grouped by customer and card - Filter transactions to only include fleet customers - Compact print-friendly layout with 2 decimal precision
This commit is contained in:
87
templates/index.html
Normal file
87
templates/index.html
Normal file
@@ -0,0 +1,87 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Invoice Overview</title>
|
||||
<style>
|
||||
@page {
|
||||
size: A4;
|
||||
margin: 15mm;
|
||||
}
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
background: white;
|
||||
}
|
||||
@media print {
|
||||
body { padding: 0; }
|
||||
}
|
||||
h1 {
|
||||
margin: 0 0 15px 0;
|
||||
font-size: 18px;
|
||||
border-bottom: 2px solid #333;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.batch-info {
|
||||
margin-bottom: 15px;
|
||||
font-size: 11px;
|
||||
color: #666;
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 11px;
|
||||
}
|
||||
th, td {
|
||||
padding: 8px 10px;
|
||||
text-align: left;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
th {
|
||||
background: #f0f0f0;
|
||||
font-weight: bold;
|
||||
}
|
||||
tr:nth-child(even) {
|
||||
background: #fafafa;
|
||||
}
|
||||
a {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Invoice Overview</h1>
|
||||
|
||||
<div class="batch-info">
|
||||
<strong>Processed Batches:</strong> {{ batches | join(", ") }}
|
||||
</div>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Customer Number</th>
|
||||
<th>Cards</th>
|
||||
<th>Invoice</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for (num, card_count) in customers %}
|
||||
<tr>
|
||||
<td>{{ num }}</td>
|
||||
<td>{{ card_count }}</td>
|
||||
<td><a href="customer_{{ num }}.html">View</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user