source: templates/invoices_per_customer_after_date.html

Last change on this file was 59b2e9c, checked in by ManuelTrajcev <manueltrajcev7@…>, 2 weeks ago

querry mostr popular artist per customer for each genre

  • Property mode set to 100644
File size: 3.6 KB
RevLine 
[611686e]1<!DOCTYPE html>
2<html>
3<head>
4 <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.5/dist/css/bootstrap.min.css" rel="stylesheet"
5 integrity="sha384-SgOJa3DmI69IUzQ2PVdRZhwQ+dy64/BUtbMJw1MZ8t5HZApcHrRKUc4W0kG879m7" crossorigin="anonymous">
6 <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.5/dist/js/bootstrap.bundle.min.js"
7 integrity="sha384-k6d4wzSIapyDyv1kpU366/PK5hCdSbCRGRCMv+eplOQJWyd1fbcAu9OCUj5zNLiq"
8 crossorigin="anonymous"></script>
9 <title>Number of Tracks per Customer</title>
10</head>
[4abe330]11<body class="d-flex bg-light">
12{% include 'sidebar.html' %}
[611686e]13<div class="container mt-5">
14 <h1 class="mb-4 text-center">Invoice Created by Customer</h1>
15
16 <form method="GET" action="" class="row g-3 mb-4">
17 <div class="col-md-4">
18 <label for="customer_id" class="form-label">Select Customer:</label>
19 <select name="customer_id" id="customer_id" class="form-select">
20 <option value="">All Customers</option>
21 {% for customer in customers %}
22 <option value="{{ customer.customer_id }}"
23 {% if request.GET.customer_id == customer.0|stringformat:'s' %}selected{% endif %}>
24 {{ customer.first_name }} {{ customer.last_name }}
25 </option>
26 {% endfor %}
27 </select>
28 </div>
29 <div class="col-md-4">
30 <label for="invoice_date" class="form-label">Select Date:</label>
31 <input type="date" id="invoice_date" name="invoice_date" value="{{ request.GET.invoice_date }}"
32 class="form-control">
33 </div>
34
35 <div class="col-md-4 d-flex align-items-end">
36 <button type="submit" class="btn btn-primary w-100">Filter</button>
37 </div>
38 </form>
39
[59b2e9c]40 {% if customer %}
41 <div class="row display-5">
42 <div class="col-3 bg-light-subtle m-1 pb-3 border border-secondary-subtle rounded-3">
43 {{ customer }}
44 </div>
45 </div>
46 {% endif %}
47
[611686e]48 {% if not selected_customer_id %}
49 <div class="alert alert-warning" role="alert">
50 Please select a customer to see the results.
51 </div>
52 {% elif not data %}
53 <div class="alert alert-danger" role="alert">
54 No invoice found.
55 </div>
56 {% else %}
57 <div class="container">
58 <div class="row col-3 justify-content-between mb-3">
59 <div class="col-6 font-weight-bold">
60 Date of Invoice
61 </div>
62 <div class="col-6 text-end font-weight-bold px-4">
63 Price
64 </div>
65 </div>
66 <ul class="row list-group col-3">
67 {% for row in data %}
68 <li class="list-group-item d-flex justify-content-between align-items-center">
69 <div class="col-6">
70 {{ row.invoice_date }}
71 </div>
72 <div class="col-6 text-end ">
73 <span class="badge bg-success rounded-pill">${{ row.total }}</span>
74 </div>
75 </li>
76 {% empty %}
77 <li class="list-group-item">No invoices found for this customer and date.</li>
78 {% endfor %}
79 </ul>
80 </div>
81 <div class="col-3 my-3">
82 <div class="alert alert-success" role="alert">
83 Total money spend: ${{ total_sum }}
84 </div>
85 </div>
86 {% endif %}
87</div>
88
89</body>
90</html>
Note: See TracBrowser for help on using the repository browser.