Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Sales Report</title>
- <style type="text/css">
- @page {
- size: A4;
- margin: 1cm;
- }
- .table {
- width: 100%;
- max-width: 100%;
- margin-bottom: 5px;
- background-color: #fff;
- }
- .table th,
- .table td {
- padding: 5px;
- vertical-align: top;
- border-top: 1px solid #000;
- text-align: center;
- }
- .table thead th {
- vertical-align: bottom;
- border-bottom: 2px solid #000;
- }
- .table tbody + tbody {
- border-top: 2px solid #000;
- }
- .table .table {
- background-color: #fff;
- }
- .list-group {
- display: block;
- width: 100%;
- list-style: none;
- margin-top: 15px;
- margin-bottom: 15px;
- }
- .list-group p {
- width: 100%;
- height: 20px;
- line-height: 20px;
- list-style: none;
- font-size: 1.1em;
- }
- </style>
- </head>
- <body>
- <div class="container">
- <div class="card">
- <div class="card-header">
- <h3>Sales Report - {{ today | date:"d/m/Y" }}</h3>
- </div>
- <div class="list-group">
- <p>Name: {{ request.user.first_name }} {{ request.user.last_name }}</p>
- </div>
- <table class="table">
- <thead>
- <tr>
- <th>Raised</th>
- <th>Product</th>
- <th>Quantity</th>
- <th>Price</th>
- <th>Customer</th>
- </tr>
- </thead>
- <tbody>
- {% for sale in sales %}
- <tr>
- <td>{{ sale.created_at | date:"d/m/Y" }}</td>
- <td>{{ sale.product.title }}</td>
- <td>{{ sale.quantity }}</td>
- <td>£{{ sale.price }}</td>
- <td>{{ sale.customer.first_name }} {{ sale.customer.last_name }}</td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </div>
- </div>
- </body>
- </html>
Add Comment
Please, Sign In to add comment