chellow 1737990669.0.0__py3-none-any.whl → 1738660675.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of chellow might be problematic. Click here for more details.
- chellow/gas/views.py +32 -6
- chellow/reports/report_247.py +2 -1
- chellow/templates/g/supplier_contracts.html +24 -2
- {chellow-1737990669.0.0.dist-info → chellow-1738660675.0.0.dist-info}/METADATA +1 -1
- {chellow-1737990669.0.0.dist-info → chellow-1738660675.0.0.dist-info}/RECORD +6 -6
- {chellow-1737990669.0.0.dist-info → chellow-1738660675.0.0.dist-info}/WHEEL +0 -0
chellow/gas/views.py
CHANGED
|
@@ -18,8 +18,8 @@ from flask import (
|
|
|
18
18
|
request,
|
|
19
19
|
)
|
|
20
20
|
|
|
21
|
-
from sqlalchemy import false, func, select, text, true
|
|
22
|
-
from sqlalchemy.orm import joinedload
|
|
21
|
+
from sqlalchemy import false, func, null, select, text, true
|
|
22
|
+
from sqlalchemy.orm import aliased, joinedload
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
from werkzeug.exceptions import BadRequest
|
|
@@ -1547,12 +1547,38 @@ def batch_csv_get(g_batch_id):
|
|
|
1547
1547
|
|
|
1548
1548
|
@gas.route("/supplier_contracts")
|
|
1549
1549
|
def supplier_contracts_get():
|
|
1550
|
-
|
|
1550
|
+
GRateScriptAliasFinish = aliased(GRateScript)
|
|
1551
|
+
|
|
1552
|
+
current_contracts = g.sess.scalars(
|
|
1551
1553
|
select(GContract)
|
|
1552
|
-
.
|
|
1554
|
+
.join(
|
|
1555
|
+
GRateScriptAliasFinish,
|
|
1556
|
+
GContract.finish_g_rate_script_id == GRateScriptAliasFinish.id,
|
|
1557
|
+
)
|
|
1558
|
+
.where(
|
|
1559
|
+
GContract.is_industry == false(),
|
|
1560
|
+
GRateScriptAliasFinish.finish_date == null(),
|
|
1561
|
+
)
|
|
1553
1562
|
.order_by(GContract.name)
|
|
1554
|
-
)
|
|
1555
|
-
|
|
1563
|
+
)
|
|
1564
|
+
ended_contracts = g.sess.scalars(
|
|
1565
|
+
select(GContract)
|
|
1566
|
+
.join(
|
|
1567
|
+
GRateScriptAliasFinish,
|
|
1568
|
+
GContract.finish_g_rate_script_id == GRateScriptAliasFinish.id,
|
|
1569
|
+
)
|
|
1570
|
+
.where(
|
|
1571
|
+
GContract.is_industry == false(),
|
|
1572
|
+
GRateScriptAliasFinish.finish_date != null(),
|
|
1573
|
+
)
|
|
1574
|
+
.order_by(GContract.name)
|
|
1575
|
+
)
|
|
1576
|
+
|
|
1577
|
+
return render_template(
|
|
1578
|
+
"supplier_contracts.html",
|
|
1579
|
+
current_contracts=current_contracts,
|
|
1580
|
+
ended_contracts=ended_contracts,
|
|
1581
|
+
)
|
|
1556
1582
|
|
|
1557
1583
|
|
|
1558
1584
|
@gas.route("/supplier_contracts/<int:contract_id>")
|
chellow/reports/report_247.py
CHANGED
|
@@ -629,15 +629,16 @@ def _process_site(
|
|
|
629
629
|
"displaced",
|
|
630
630
|
"used",
|
|
631
631
|
"used-3rd-party",
|
|
632
|
-
"billed-export",
|
|
633
632
|
):
|
|
634
633
|
for sname in ("kwh", "net-gbp"):
|
|
635
634
|
month_data[f"{name}-{sname}"] = 0
|
|
636
635
|
month_data["billed-import-kwh"] = 0
|
|
636
|
+
month_data["billed-export-kwh"] = 0
|
|
637
637
|
month_data["import-grid-kwh"] = 0
|
|
638
638
|
month_data["export-grid-kwh"] = 0
|
|
639
639
|
for suf in ("net-gbp", "vat-gbp", "gross-gbp"):
|
|
640
640
|
month_data[f"billed-import-{suf}"] = 0
|
|
641
|
+
month_data[f"billed-export-{suf}"] = 0
|
|
641
642
|
month_data[f"import-grid-{suf}"] = 0
|
|
642
643
|
month_data[f"export-grid-{suf}"] = 0
|
|
643
644
|
month_data[f"billed-supplier-import-{suf}"] = 0
|
|
@@ -11,6 +11,29 @@
|
|
|
11
11
|
{% block content %}
|
|
12
12
|
|
|
13
13
|
<table>
|
|
14
|
+
<caption>Current Contracts</caption>
|
|
15
|
+
<thead>
|
|
16
|
+
<tr>
|
|
17
|
+
<th>Name</th>
|
|
18
|
+
<th>Start Date</th>
|
|
19
|
+
</tr>
|
|
20
|
+
</thead>
|
|
21
|
+
<tbody>
|
|
22
|
+
{% for g_contract in current_contracts %}
|
|
23
|
+
<tr>
|
|
24
|
+
<td>
|
|
25
|
+
<a href="/g/supplier_contracts/{{g_contract.id}}">{{g_contract.name}}</a>
|
|
26
|
+
</td>
|
|
27
|
+
<td>
|
|
28
|
+
{{g_contract.start_g_rate_script.start_date|hh_format}}
|
|
29
|
+
</td>
|
|
30
|
+
</tr>
|
|
31
|
+
{% endfor %}
|
|
32
|
+
</tbody>
|
|
33
|
+
</table>
|
|
34
|
+
|
|
35
|
+
<table>
|
|
36
|
+
<caption>Ended Contracts</caption>
|
|
14
37
|
<thead>
|
|
15
38
|
<tr>
|
|
16
39
|
<th>Name</th>
|
|
@@ -19,7 +42,7 @@
|
|
|
19
42
|
</tr>
|
|
20
43
|
</thead>
|
|
21
44
|
<tbody>
|
|
22
|
-
{% for g_contract in
|
|
45
|
+
{% for g_contract in ended_contracts %}
|
|
23
46
|
<tr>
|
|
24
47
|
<td>
|
|
25
48
|
<a href="/g/supplier_contracts/{{g_contract.id}}">{{g_contract.name}}</a>
|
|
@@ -34,5 +57,4 @@
|
|
|
34
57
|
{% endfor %}
|
|
35
58
|
</tbody>
|
|
36
59
|
</table>
|
|
37
|
-
|
|
38
60
|
{% endblock %}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: chellow
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1738660675.0.0
|
|
4
4
|
Summary: Web Application for checking UK energy bills.
|
|
5
5
|
Project-URL: Homepage, https://github.com/WessexWater/chellow
|
|
6
6
|
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
@@ -72,7 +72,7 @@ chellow/gas/cv.py,sha256=4cdYYQ8Qak6NeYdBCB4YaQ0jX8-UkaydIIdibCQuXxM,7344
|
|
|
72
72
|
chellow/gas/dn_rate_parser.py,sha256=Mq8rAcUEUxIQOks59bsCKl8GrefvoHbrTCHqon9N0z0,11340
|
|
73
73
|
chellow/gas/engine.py,sha256=d2rR1y8b3u2QhmfqyFwwLu_loeZxY_3WwwtDyGJfam0,25282
|
|
74
74
|
chellow/gas/transportation.py,sha256=Bkg8TWOs-v0ES-4qqwbleiOhqbE_t2KauUx9JYMZELM,5300
|
|
75
|
-
chellow/gas/views.py,sha256=
|
|
75
|
+
chellow/gas/views.py,sha256=7ObrqTR-z6cRGpBcilUroSKL9C0hGfOo4GcCnGhBuYU,59737
|
|
76
76
|
chellow/reports/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
77
77
|
chellow/reports/report_109.py,sha256=Exb-FQ5f70-ier_h15CgHGysQ7vJ7k3gFZ1001zM3iM,11171
|
|
78
78
|
chellow/reports/report_111.py,sha256=o_wWyrtmxpTnmT9DVlsG5h5wdm3JqojirRlx_7W5_kQ,28787
|
|
@@ -84,7 +84,7 @@ chellow/reports/report_219.py,sha256=3Zs16ka6dWWY_lCDoA-ZFrlPb4vHk1LQoa2yrlTMntA
|
|
|
84
84
|
chellow/reports/report_231.py,sha256=WARLztV2HzBFSi5_xvY_DTXVyuBBbBYiU0RazfjKw-Y,5270
|
|
85
85
|
chellow/reports/report_233.py,sha256=qJdPFuBgQAWD24BsljgGJ44L_RGdHOA1RqsxGjTWhFc,4975
|
|
86
86
|
chellow/reports/report_241.py,sha256=lfivElRkV_CZAhck0rxAuhqzgponj3aWwmwGMNQvUxg,5343
|
|
87
|
-
chellow/reports/report_247.py,sha256=
|
|
87
|
+
chellow/reports/report_247.py,sha256=ovsUZQn8vl_6vIw9SHJQ640QGUjSwRhn5Bt8ycRxgW0,45972
|
|
88
88
|
chellow/reports/report_29.py,sha256=ZXnq6Kg5on-IPquUsH4bn46mBVESY_WhwqDWZPXOJwo,2695
|
|
89
89
|
chellow/reports/report_291.py,sha256=BnWtxe0eWN2QKKWpwjs5-RI5LbReBKL119QbkrkNhV8,7478
|
|
90
90
|
chellow/reports/report_33.py,sha256=lt1EN_LNx6u-AgdaS3YRkPMZA33JgMcELolHF4oJUMw,16689
|
|
@@ -364,7 +364,7 @@ chellow/templates/g/reports.html,sha256=u3i8fKSdMYxRUAjBF31OhqHnK82WyOMyl_6X2at6
|
|
|
364
364
|
chellow/templates/g/supplier_contract.html,sha256=SutQmo9VhqpjWIA6IuloAEzq54u9ng-f4b3wOzY2Enc,2144
|
|
365
365
|
chellow/templates/g/supplier_contract_add.html,sha256=jLE-CwZ3Dt8hIkAGJ53hyjzIJPIeBkvNqQ5uMe9tSf0,656
|
|
366
366
|
chellow/templates/g/supplier_contract_edit.html,sha256=p_IL0cKT9s-lV2W1kTZp9U1b7QdXzIiTsaVuVh4rztA,1119
|
|
367
|
-
chellow/templates/g/supplier_contracts.html,sha256=
|
|
367
|
+
chellow/templates/g/supplier_contracts.html,sha256=Xzr0BRs92NT7haPXOgSS0zdw5trLdSrbv1pPqJMi6X8,1176
|
|
368
368
|
chellow/templates/g/supplier_rate_script.html,sha256=e4dwskWTQcLv6qyX150VUeuaUvE4NuMWd27Zus6fHZ8,1283
|
|
369
369
|
chellow/templates/g/supplier_rate_script_add.html,sha256=zMjTkjupOsHFu-peUXL4IKjjc2OaSL-2ah4T9OdKp_o,620
|
|
370
370
|
chellow/templates/g/supplier_rate_script_edit.html,sha256=GoUqXf52gWEH1iApmNdxOcKLItzpA-o7iQPQ1_in9BA,1950
|
|
@@ -376,6 +376,6 @@ chellow/templates/g/supply_note_edit.html,sha256=b8mB6_ucBwoljp03iy6AgVaZUhGw3-1
|
|
|
376
376
|
chellow/templates/g/supply_notes.html,sha256=6epNmZ3NKdXZz27fvmRUGeffg_oc1kmwuBeyRzQe3Rg,854
|
|
377
377
|
chellow/templates/g/unit.html,sha256=KouNVU0-i84afANkLQ_heJ0uDfJ9H5A05PuLqb8iCN8,438
|
|
378
378
|
chellow/templates/g/units.html,sha256=p5Nd-lAIboKPEOO6N451hx1bcKxMg4BDODnZ-43MmJc,441
|
|
379
|
-
chellow-
|
|
380
|
-
chellow-
|
|
381
|
-
chellow-
|
|
379
|
+
chellow-1738660675.0.0.dist-info/METADATA,sha256=TNqvkO-IF9jsv13gtwJbHk9TJby7FxmGwtCin01t3yg,12204
|
|
380
|
+
chellow-1738660675.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
381
|
+
chellow-1738660675.0.0.dist-info/RECORD,,
|
|
File without changes
|