chellow 1723630623.0.0__py3-none-any.whl → 1723807645.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/reports/report_59.py +52 -56
- chellow/templates/report_run_bill_check.html +1 -1
- chellow/views.py +3 -2
- {chellow-1723630623.0.0.dist-info → chellow-1723807645.0.0.dist-info}/METADATA +1 -1
- {chellow-1723630623.0.0.dist-info → chellow-1723807645.0.0.dist-info}/RECORD +6 -6
- {chellow-1723630623.0.0.dist-info → chellow-1723807645.0.0.dist-info}/WHEEL +0 -0
chellow/reports/report_59.py
CHANGED
|
@@ -152,7 +152,7 @@ def _process_site(
|
|
|
152
152
|
for xname in ("kwh", "net-gbp"):
|
|
153
153
|
vals[f"{sname}-{xname}"] = 0
|
|
154
154
|
for suf in ("kwh", "net-gbp", "vat-gbp", "gross-gbp"):
|
|
155
|
-
vals[f"billed-import-
|
|
155
|
+
vals[f"billed-import-{suf}"] = 0
|
|
156
156
|
|
|
157
157
|
if imp_mpan_core == "displaced":
|
|
158
158
|
try:
|
|
@@ -173,15 +173,15 @@ def _process_site(
|
|
|
173
173
|
},
|
|
174
174
|
)
|
|
175
175
|
|
|
176
|
-
vals["billed-
|
|
177
|
-
vals["billed-
|
|
178
|
-
vals["billed-
|
|
179
|
-
vals["billed-
|
|
180
|
-
vals["billed-
|
|
181
|
-
vals["billed-
|
|
182
|
-
vals["billed-
|
|
183
|
-
vals["billed-
|
|
184
|
-
vals["billed-
|
|
176
|
+
vals["billed-import-supplier-net-gbp"] = None
|
|
177
|
+
vals["billed-import-supplier-vat-gbp"] = None
|
|
178
|
+
vals["billed-import-supplier-gross-gbp"] = None
|
|
179
|
+
vals["billed-import-dc-net-gbp"] = None
|
|
180
|
+
vals["billed-import-dc-vat-gbp"] = None
|
|
181
|
+
vals["billed-import-dc-gross-gbp"] = None
|
|
182
|
+
vals["billed-import-mop-net-gbp"] = None
|
|
183
|
+
vals["billed-import-mop-vat-gbp"] = None
|
|
184
|
+
vals["billed-import-mop-gross-gbp"] = None
|
|
185
185
|
|
|
186
186
|
vals["used-kwh"] = vals["displaced-kwh"] = sum(
|
|
187
187
|
hh["msp-kwh"] for hh in imp_ss.hh_data
|
|
@@ -225,9 +225,9 @@ def _process_site(
|
|
|
225
225
|
site_sources.add(source_code)
|
|
226
226
|
|
|
227
227
|
for suf in ("net-gbp", "vat-gbp", "gross-gbp"):
|
|
228
|
-
vals["billed-
|
|
229
|
-
vals["billed-
|
|
230
|
-
vals["billed-
|
|
228
|
+
vals[f"billed-import-supplier-{suf}"] = 0
|
|
229
|
+
vals[f"billed-import-dc-{suf}"] = 0
|
|
230
|
+
vals[f"billed-import-mop-{suf}"] = 0
|
|
231
231
|
|
|
232
232
|
if imp_ss is None:
|
|
233
233
|
imp_bad_hhs = imp_bad_kwh = imp_supplier_contract_name = None
|
|
@@ -399,13 +399,13 @@ def _process_site(
|
|
|
399
399
|
min(bill_finish, sss.finish_date) - max(bill_start, sss.start_date)
|
|
400
400
|
).total_seconds() + (30 * 60)
|
|
401
401
|
proportion = overlap_duration / bill_duration
|
|
402
|
-
vals["billed-import-
|
|
402
|
+
vals["billed-import-kwh"] += proportion * float(bill.kwh)
|
|
403
403
|
bill_prop_net_gbp = proportion * float(bill.net)
|
|
404
404
|
bill_prop_vat_gbp = proportion * float(bill.vat)
|
|
405
405
|
bill_prop_gross_gbp = proportion * float(bill.gross)
|
|
406
|
-
vals["billed-import-
|
|
407
|
-
vals["billed-import-
|
|
408
|
-
vals["billed-import-
|
|
406
|
+
vals["billed-import-net-gbp"] += bill_prop_net_gbp
|
|
407
|
+
vals["billed-import-vat-gbp"] += bill_prop_vat_gbp
|
|
408
|
+
vals["billed-import-gross-gbp"] += bill_prop_gross_gbp
|
|
409
409
|
if bill_role_code == "X":
|
|
410
410
|
role_name = "supplier"
|
|
411
411
|
elif bill_role_code == "C":
|
|
@@ -415,9 +415,9 @@ def _process_site(
|
|
|
415
415
|
else:
|
|
416
416
|
raise BadRequest("Role code not recognized.")
|
|
417
417
|
|
|
418
|
-
vals[f"billed-{role_name}-
|
|
419
|
-
vals[f"billed-{role_name}-
|
|
420
|
-
vals[f"billed-{role_name}-
|
|
418
|
+
vals[f"billed-import-{role_name}-net-gbp"] += bill_prop_net_gbp
|
|
419
|
+
vals[f"billed-import-{role_name}-vat-gbp"] += bill_prop_vat_gbp
|
|
420
|
+
vals[f"billed-import-{role_name}-gross-gbp"] += bill_prop_gross_gbp
|
|
421
421
|
|
|
422
422
|
vals["imp-mpan-core"] = imp_mpan_core
|
|
423
423
|
vals["exp-mpan-core"] = exp_mpan_core
|
|
@@ -555,10 +555,10 @@ def _process_site(
|
|
|
555
555
|
for sname in ("kwh", "net-gbp"):
|
|
556
556
|
vals[f"{name}-{sname}"] = 0
|
|
557
557
|
for suf in ("kwh", "net-gbp", "vat-gbp", "gross-gbp"):
|
|
558
|
-
vals[f"billed-import-
|
|
559
|
-
vals[f"billed-
|
|
560
|
-
vals[f"billed-
|
|
561
|
-
vals[f"billed-
|
|
558
|
+
vals[f"billed-import-{suf}"] = 0
|
|
559
|
+
vals[f"billed-import-supplier-{suf}"] = 0
|
|
560
|
+
vals[f"billed-import-dc-{suf}"] = 0
|
|
561
|
+
vals[f"billed-import-mop-{suf}"] = 0
|
|
562
562
|
|
|
563
563
|
for bill in bills:
|
|
564
564
|
bill_role_code = bill.batch.contract.market_role.code
|
|
@@ -586,16 +586,12 @@ def _process_site(
|
|
|
586
586
|
raise BadRequest("Role code not recognized.")
|
|
587
587
|
|
|
588
588
|
for data in vals, site_data:
|
|
589
|
-
data["billed-import-
|
|
590
|
-
data["billed-import-
|
|
589
|
+
data["billed-import-kwh"] += bill_prop_kwh
|
|
590
|
+
data["billed-import-net-gbp"] += bill_prop_net_gbp
|
|
591
|
+
data[f"billed-import-{key}-net-gbp"] += bill_prop_net_gbp
|
|
592
|
+
data[f"billed-import-{key}-vat-gbp"] += bill_prop_vat_gbp
|
|
591
593
|
data[
|
|
592
|
-
f"billed-{key}-
|
|
593
|
-
] += bill_prop_net_gbp
|
|
594
|
-
data[
|
|
595
|
-
f"billed-{key}-import-grid-vat-gbp"
|
|
596
|
-
] += bill_prop_vat_gbp
|
|
597
|
-
data[
|
|
598
|
-
f"billed-{key}-import-grid-gross-gbp"
|
|
594
|
+
f"billed-import-{key}-gross-gbp"
|
|
599
595
|
] += bill_prop_gross_gbp
|
|
600
596
|
|
|
601
597
|
era_rows.append([make_val(vals.get(t)) for t in era_titles])
|
|
@@ -644,10 +640,10 @@ def _process_site(
|
|
|
644
640
|
for sname in ("kwh", "net-gbp"):
|
|
645
641
|
month_data[f"{name}-{sname}"] = 0
|
|
646
642
|
for suf in ("kwh", "net-gbp", "vat-gbp", "gross-gbp"):
|
|
647
|
-
month_data["billed-import-
|
|
648
|
-
month_data["billed-
|
|
649
|
-
month_data["billed-
|
|
650
|
-
month_data["billed-
|
|
643
|
+
month_data["billed-import-{suf}"],
|
|
644
|
+
month_data["billed-import-supplier-{suf}"] = 0
|
|
645
|
+
month_data["billed-import-dc-{suf}"] = 0
|
|
646
|
+
month_data["billed-import-mop-{suf}"] = 0
|
|
651
647
|
|
|
652
648
|
for bill in bills:
|
|
653
649
|
bill_role_code = bill.batch.contract.market_role.code
|
|
@@ -675,17 +671,17 @@ def _process_site(
|
|
|
675
671
|
raise BadRequest("Role code not recognized.")
|
|
676
672
|
|
|
677
673
|
for data in month_data, site_data:
|
|
678
|
-
data["billed-import-
|
|
679
|
-
data["billed-import-
|
|
680
|
-
data[f"billed-{role_name}-
|
|
674
|
+
data["billed-import-kwh"] += bill_prop_kwh
|
|
675
|
+
data["billed-import-net-gbp"] += bill_prop_net_gbp
|
|
676
|
+
data[f"billed-import-{role_name}-kwh"] += bill_prop_kwh
|
|
681
677
|
data[
|
|
682
|
-
f"billed-{role_name}-
|
|
678
|
+
f"billed-import-{role_name}-net-gbp"
|
|
683
679
|
] += bill_prop_net_gbp
|
|
684
680
|
data[
|
|
685
|
-
f"billed-{role_name}-
|
|
681
|
+
f"billed-import-{role_name}-vat-gbp"
|
|
686
682
|
] += bill_prop_vat_gbp
|
|
687
683
|
data[
|
|
688
|
-
f"billed-{role_name}-
|
|
684
|
+
f"billed-import-{role_name}-gross-gbp"
|
|
689
685
|
] += bill_prop_gross_gbp
|
|
690
686
|
|
|
691
687
|
imp_supplier_contract = first_era.imp_supplier_contract
|
|
@@ -957,19 +953,19 @@ def content(
|
|
|
957
953
|
"displaced-net-gbp",
|
|
958
954
|
"used-net-gbp",
|
|
959
955
|
"used-3rd-party-net-gbp",
|
|
960
|
-
"billed-import-
|
|
961
|
-
"billed-import-
|
|
962
|
-
"billed-import-
|
|
963
|
-
"billed-import-
|
|
964
|
-
"billed-
|
|
965
|
-
"billed-
|
|
966
|
-
"billed-
|
|
967
|
-
"billed-
|
|
968
|
-
"billed-
|
|
969
|
-
"billed-
|
|
970
|
-
"billed-
|
|
971
|
-
"billed-
|
|
972
|
-
"billed-
|
|
956
|
+
"billed-import-kwh",
|
|
957
|
+
"billed-import-net-gbp",
|
|
958
|
+
"billed-import-vat-gbp",
|
|
959
|
+
"billed-import-gross-gbp",
|
|
960
|
+
"billed-import-supplier-net-gbp",
|
|
961
|
+
"billed-import-supplier-vat-gbp",
|
|
962
|
+
"billed-import-supplier-gross-gbp",
|
|
963
|
+
"billed-import-dc-net-gbp",
|
|
964
|
+
"billed-import-dc-vat-gbp",
|
|
965
|
+
"billed-import-dc-gross-gbp",
|
|
966
|
+
"billed-import-mop-net-gbp",
|
|
967
|
+
"billed-import-mop-vat-gbp",
|
|
968
|
+
"billed-import-mop-gross-gbp",
|
|
973
969
|
]
|
|
974
970
|
|
|
975
971
|
title_dict = {}
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
<td>{{run.creator}}</td>
|
|
39
39
|
<td>{{run.title}}</td>
|
|
40
40
|
<td>{{run.state}}</td>
|
|
41
|
-
<td>{{rows|length}}</td>
|
|
41
|
+
<td>{{rows|length}} (truncated at {{ROW_LIMIT}})</td>
|
|
42
42
|
<td>
|
|
43
43
|
{% if 'sum_difference' in summary %}
|
|
44
44
|
{{"%.2f"|format(summary.sum_difference)}}</td>
|
chellow/views.py
CHANGED
|
@@ -1341,12 +1341,12 @@ def report_run_get(run_id):
|
|
|
1341
1341
|
q = q.filter(
|
|
1342
1342
|
ReportRunRow.data["properties"]["is_checked"].as_boolean() == false()
|
|
1343
1343
|
)
|
|
1344
|
-
|
|
1344
|
+
ROW_LIMIT = 200
|
|
1345
1345
|
rows = (
|
|
1346
1346
|
q.order_by(
|
|
1347
1347
|
func.abs(ReportRunRow.data["values"][order_by].as_float()).desc()
|
|
1348
1348
|
)
|
|
1349
|
-
.limit(
|
|
1349
|
+
.limit(ROW_LIMIT)
|
|
1350
1350
|
.all()
|
|
1351
1351
|
)
|
|
1352
1352
|
return render_template(
|
|
@@ -1357,6 +1357,7 @@ def report_run_get(run_id):
|
|
|
1357
1357
|
elements=elements,
|
|
1358
1358
|
element=element,
|
|
1359
1359
|
hide_checked=hide_checked,
|
|
1360
|
+
ROW_LIMIT=ROW_LIMIT,
|
|
1360
1361
|
)
|
|
1361
1362
|
|
|
1362
1363
|
elif run.name == "asset_comparison":
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: chellow
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1723807645.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)
|
|
@@ -11,7 +11,7 @@ chellow/proxy.py,sha256=cVXIktPlX3tQ1BYcwxq0nJXKE6r3DtFTtfFHPq55HaM,1351
|
|
|
11
11
|
chellow/rate_server.py,sha256=fg-Pf_9Hk3bXmC9riPQNGQxBvLvBa_WtNYdwDCjnCSg,5678
|
|
12
12
|
chellow/testing.py,sha256=Od4HHH6pZrhJ_De118_F55RJEKmAvhUH2S24QE9qFQk,3635
|
|
13
13
|
chellow/utils.py,sha256=32qPWEGzCPKPhSM7ztpzcR6ZG74sVZanScDIdK50Rq4,19308
|
|
14
|
-
chellow/views.py,sha256=
|
|
14
|
+
chellow/views.py,sha256=njFHK_sT9k5OQyAJoLUWGSzMiM5rLuusYjdmK0ijS3c,79674
|
|
15
15
|
chellow/e/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
chellow/e/aahedc.py,sha256=d2usudp7KYWpU6Pk3fal5EQ47EbvkvKeaFGylnb3NWw,606
|
|
17
17
|
chellow/e/bill_importer.py,sha256=7UcnqNlKbJc2GhW9gy8sDp9GuqambJVpZLvbafOZztA,7411
|
|
@@ -85,7 +85,7 @@ chellow/reports/report_33.py,sha256=laVz-itDbJTdvC6LxLEeuY0eKpYx43Un4adiExPTEEE,
|
|
|
85
85
|
chellow/reports/report_387.py,sha256=kmBZopb0AOivcowO2nPjRj6LnV0_QjCDXLwqPL7IGVE,5672
|
|
86
86
|
chellow/reports/report_41.py,sha256=QQeTshA1Og7N3wPaoZ8ynJzwsvZ1mgSFc7DDkVqIZoM,7447
|
|
87
87
|
chellow/reports/report_429.py,sha256=8WlLqyfMyvIF5Kc6CE0MKwcT5xwmR_Ao99Ef72yAOVc,12668
|
|
88
|
-
chellow/reports/report_59.py,sha256=
|
|
88
|
+
chellow/reports/report_59.py,sha256=FGXgKhJwKGBfa0lknaDfvZshV3KRoz5NRbFkbB1f73w,48010
|
|
89
89
|
chellow/reports/report_81.py,sha256=NkT6dZeMo7Z0AkJemD_Xv8Ut5PIZ9vn8Ia1Q_DS9v54,5611
|
|
90
90
|
chellow/reports/report_87.py,sha256=j2gdBOapaVY1ZnlNlw14RPx58_k8eUkc3oRSnKuCsNA,7057
|
|
91
91
|
chellow/reports/report_asset_comparison.py,sha256=UN298MHuzyUDUiiZr7F_Ua6SrdVOlFLjgKjnIbrA-14,6118
|
|
@@ -134,7 +134,7 @@ chellow/templates/object_summary.html,sha256=VGCAAYcWTzgNfL0mxEef2Fa8dP3FcBhzj0f
|
|
|
134
134
|
chellow/templates/rate_server.html,sha256=SezuwdKhHRZ00-R_S6ttKiZ-nvRpwozV9QcIMf9StG8,5360
|
|
135
135
|
chellow/templates/report_run.html,sha256=O_wjIu43S-mKVyZyku3dJJdvyck3rAgEdhw59TsCcK0,4040
|
|
136
136
|
chellow/templates/report_run_asset_comparison.html,sha256=VYCCUmIC7Mfe7uuaAHb6ihiK6zsqeTlQbzgtzLqR3zg,2305
|
|
137
|
-
chellow/templates/report_run_bill_check.html,sha256=
|
|
137
|
+
chellow/templates/report_run_bill_check.html,sha256=H2ayoBL7EgKMq2Nwq5VjE_TNvcIKcqeCm0alQWLIw78,5084
|
|
138
138
|
chellow/templates/report_run_ecoes_comparison.html,sha256=VmkT5ypWLP8qZS6NbDTC4yDaG7mnUlxZz7EV8xkHGZw,4086
|
|
139
139
|
chellow/templates/report_run_row.html,sha256=bmtcdqJaS1CXpL0i8PuqvmeF98jKNYX5-mnQu-OuDKQ,3791
|
|
140
140
|
chellow/templates/report_run_row_bill_check.html,sha256=aC2LMu_6NvmTN3ZdxHJPPPczyxPN6hg0F-PPcqIWUws,4683
|
|
@@ -365,6 +365,6 @@ chellow/templates/g/supply_note_edit.html,sha256=b8mB6_ucBwoljp03iy6AgVaZUhGw3-1
|
|
|
365
365
|
chellow/templates/g/supply_notes.html,sha256=6epNmZ3NKdXZz27fvmRUGeffg_oc1kmwuBeyRzQe3Rg,854
|
|
366
366
|
chellow/templates/g/unit.html,sha256=KouNVU0-i84afANkLQ_heJ0uDfJ9H5A05PuLqb8iCN8,438
|
|
367
367
|
chellow/templates/g/units.html,sha256=p5Nd-lAIboKPEOO6N451hx1bcKxMg4BDODnZ-43MmJc,441
|
|
368
|
-
chellow-
|
|
369
|
-
chellow-
|
|
370
|
-
chellow-
|
|
368
|
+
chellow-1723807645.0.0.dist-info/METADATA,sha256=Fc1pbuUcWllYt2MIy0LQ8X7aLkrmCvJ8rcy9mGraYYI,12241
|
|
369
|
+
chellow-1723807645.0.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
370
|
+
chellow-1723807645.0.0.dist-info/RECORD,,
|
|
File without changes
|