chellow 1720526317.0.0__py3-none-any.whl → 1720600044.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/e/views.py +4 -14
- chellow/models.py +26 -22
- chellow/templates/general_imports.html +1 -0
- {chellow-1720526317.0.0.dist-info → chellow-1720600044.0.0.dist-info}/METADATA +1 -1
- {chellow-1720526317.0.0.dist-info → chellow-1720600044.0.0.dist-info}/RECORD +6 -6
- {chellow-1720526317.0.0.dist-info → chellow-1720600044.0.0.dist-info}/WHEEL +0 -0
chellow/e/views.py
CHANGED
|
@@ -79,7 +79,6 @@ from chellow.models import (
|
|
|
79
79
|
)
|
|
80
80
|
from chellow.utils import (
|
|
81
81
|
HH,
|
|
82
|
-
PropDict,
|
|
83
82
|
c_months_u,
|
|
84
83
|
csv_make_val,
|
|
85
84
|
ct_datetime,
|
|
@@ -3732,24 +3731,15 @@ def pc_get(pc_id):
|
|
|
3732
3731
|
|
|
3733
3732
|
@e.route("/supplier_bills/<int:bill_id>/add_read")
|
|
3734
3733
|
def read_add_get(bill_id):
|
|
3735
|
-
read_types = g.sess.
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
)
|
|
3739
|
-
tprs = g.sess.query(Tpr).order_by(Tpr.code)
|
|
3734
|
+
read_types = g.sess.scalars(select(ReadType).order_by(ReadType.code))
|
|
3735
|
+
estimated_read_type = ReadType.get_by_code(g.sess, "E")
|
|
3736
|
+
tprs = g.sess.scalars(select(Tpr).order_by(Tpr.code))
|
|
3740
3737
|
bill = Bill.get_by_id(g.sess, bill_id)
|
|
3741
3738
|
coefficient = 1
|
|
3742
3739
|
mpan_str = msn = previous_date = previous_value = previous_type_id = None
|
|
3743
3740
|
|
|
3744
3741
|
era = bill.supply.find_era_at(g.sess, bill.start_date)
|
|
3745
3742
|
if era is not None:
|
|
3746
|
-
era_properties = PropDict(
|
|
3747
|
-
f"{chellow.utils.url_root}eras/{era.id}", loads(era.properties)
|
|
3748
|
-
)
|
|
3749
|
-
try:
|
|
3750
|
-
coefficient = float(era_properties["coefficient"])
|
|
3751
|
-
except KeyError:
|
|
3752
|
-
pass
|
|
3753
3743
|
mpan_str = era.imp_mpan_core
|
|
3754
3744
|
msn = era.msn
|
|
3755
3745
|
|
|
@@ -3778,7 +3768,7 @@ def read_add_get(bill_id):
|
|
|
3778
3768
|
previous_date=previous_date,
|
|
3779
3769
|
previous_value=previous_value,
|
|
3780
3770
|
previous_type_id=previous_type_id,
|
|
3781
|
-
estimated_read_type_id=
|
|
3771
|
+
estimated_read_type_id=estimated_read_type.id,
|
|
3782
3772
|
)
|
|
3783
3773
|
|
|
3784
3774
|
|
chellow/models.py
CHANGED
|
@@ -6687,28 +6687,7 @@ def insert_dtc_meter_types(sess):
|
|
|
6687
6687
|
DtcMeterType.insert(sess, code, desc)
|
|
6688
6688
|
|
|
6689
6689
|
|
|
6690
|
-
def
|
|
6691
|
-
db_name = config["PGDATABASE"]
|
|
6692
|
-
log_message("Initializing database.")
|
|
6693
|
-
|
|
6694
|
-
ct_now = ct_datetime_now()
|
|
6695
|
-
last_month_start, _ = list(
|
|
6696
|
-
c_months_u(finish_year=ct_now.year, finish_month=ct_now.month, months=2)
|
|
6697
|
-
)[0]
|
|
6698
|
-
|
|
6699
|
-
insert_voltage_levels(sess)
|
|
6700
|
-
sess.commit()
|
|
6701
|
-
|
|
6702
|
-
for code in ("editor", "viewer", "party-viewer"):
|
|
6703
|
-
UserRole.insert(sess, code)
|
|
6704
|
-
sess.commit()
|
|
6705
|
-
|
|
6706
|
-
insert_sources(sess)
|
|
6707
|
-
sess.commit()
|
|
6708
|
-
|
|
6709
|
-
insert_generator_types(sess)
|
|
6710
|
-
sess.commit()
|
|
6711
|
-
|
|
6690
|
+
def insert_read_types(sess):
|
|
6712
6691
|
for code, desc in (
|
|
6713
6692
|
("A", "Actual Change of Supplier Read"),
|
|
6714
6693
|
("D", "Deemed (Settlement Registers) or Estimated (Non-Settlement Registers)"),
|
|
@@ -6731,6 +6710,31 @@ def db_init(sess, root_path):
|
|
|
6731
6710
|
("Z", "Actual Change of Tenancy Read"),
|
|
6732
6711
|
):
|
|
6733
6712
|
sess.add(ReadType(code, desc))
|
|
6713
|
+
|
|
6714
|
+
|
|
6715
|
+
def db_init(sess, root_path):
|
|
6716
|
+
db_name = config["PGDATABASE"]
|
|
6717
|
+
log_message("Initializing database.")
|
|
6718
|
+
|
|
6719
|
+
ct_now = ct_datetime_now()
|
|
6720
|
+
last_month_start, _ = list(
|
|
6721
|
+
c_months_u(finish_year=ct_now.year, finish_month=ct_now.month, months=2)
|
|
6722
|
+
)[0]
|
|
6723
|
+
|
|
6724
|
+
insert_voltage_levels(sess)
|
|
6725
|
+
sess.commit()
|
|
6726
|
+
|
|
6727
|
+
for code in ("editor", "viewer", "party-viewer"):
|
|
6728
|
+
UserRole.insert(sess, code)
|
|
6729
|
+
sess.commit()
|
|
6730
|
+
|
|
6731
|
+
insert_sources(sess)
|
|
6732
|
+
sess.commit()
|
|
6733
|
+
|
|
6734
|
+
insert_generator_types(sess)
|
|
6735
|
+
sess.commit()
|
|
6736
|
+
|
|
6737
|
+
insert_read_types(sess)
|
|
6734
6738
|
sess.commit()
|
|
6735
6739
|
|
|
6736
6740
|
insert_cops(sess)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: chellow
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1720600044.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)
|
|
@@ -5,7 +5,7 @@ chellow/commands.py,sha256=ESBe9ZWj1c3vdZgqMZ9gFvYAB3hRag2R1PzOwuw9yFo,1302
|
|
|
5
5
|
chellow/dloads.py,sha256=5SmP-0QPK6xCkd_wjIWh_8FAzN5OxNHCzyEQ1Xb-Y-M,5256
|
|
6
6
|
chellow/edi_lib.py,sha256=alu20x9ZX06iPfnNI9dEJzuP6RIf4We3Y_M_bl7RrcY,51789
|
|
7
7
|
chellow/general_import.py,sha256=l3EHq9zG9Vfl5Ee6XTVrC1nusXo4YGGB4VBmZ_JaJR8,65798
|
|
8
|
-
chellow/models.py,sha256=
|
|
8
|
+
chellow/models.py,sha256=7fCVyf9aCDb9natETLHzC2XIQkYxJhyLQhOQsTMWjFI,243147
|
|
9
9
|
chellow/national_grid.py,sha256=uxcv0qisHPyzw9AVIYPzsRqwt2XPAcZL-SBR12qcrS0,4364
|
|
10
10
|
chellow/proxy.py,sha256=cVXIktPlX3tQ1BYcwxq0nJXKE6r3DtFTtfFHPq55HaM,1351
|
|
11
11
|
chellow/rate_server.py,sha256=fg-Pf_9Hk3bXmC9riPQNGQxBvLvBa_WtNYdwDCjnCSg,5678
|
|
@@ -38,7 +38,7 @@ chellow/e/system_price.py,sha256=6w5J7bzwFAZubE2zdOFRiS8IIrVP8hkoIOaG2yCt-Ic,623
|
|
|
38
38
|
chellow/e/tlms.py,sha256=M33D6YpMixu2KkwSCzDRM3kThLgShg8exp63Obo75l8,8905
|
|
39
39
|
chellow/e/tnuos.py,sha256=XseYztPUsQXNKuBmystO2kzzwAG9ehCZgpGBTdgSk-A,4313
|
|
40
40
|
chellow/e/triad.py,sha256=lIQj7EdUrcFwEqleuHZXYU_bfzIwNOqUVVxB3NPQt4A,13710
|
|
41
|
-
chellow/e/views.py,sha256=
|
|
41
|
+
chellow/e/views.py,sha256=l2G7IZiCi3krcTokE18DAJGQvAXiZQHKwAdpdCiNxso,215060
|
|
42
42
|
chellow/e/bill_parsers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
43
43
|
chellow/e/bill_parsers/activity_mop_stark_xlsx.py,sha256=UgWXDPzQkQghyj_lfgBqoSJpHB-t-qOdSaB8qY6GLog,4071
|
|
44
44
|
chellow/e/bill_parsers/annual_mop_stark_xlsx.py,sha256=-HMoIfa_utXYKA44RuC0Xqv3vd2HLeQU_4P0iBUd3WA,4219
|
|
@@ -115,7 +115,7 @@ chellow/templates/csv_sites_monthly_duration.html,sha256=59gErG6KwA57z-qh2EJsVGv
|
|
|
115
115
|
chellow/templates/downloads.html,sha256=R9QPcFz-PLJOX7rDlmquIk-Hp9Iq-thzWCTfOexSpXg,937
|
|
116
116
|
chellow/templates/edi_viewer.html,sha256=szUthgHOdph6Of-7f_1LeC_zYlNJaMeS5ctn6xTAeiM,1437
|
|
117
117
|
chellow/templates/general_import.html,sha256=SMemHGu466Be3_cAWSS6Hn-Kv-1psbEMDD6NQG6bfbI,1013
|
|
118
|
-
chellow/templates/general_imports.html,sha256=
|
|
118
|
+
chellow/templates/general_imports.html,sha256=VRmBqYsXsirm880WiFrJ3CknAXAoLR9Mnpz9cKjIeM8,13069
|
|
119
119
|
chellow/templates/home.html,sha256=_ANKmcnlk_PDyZl6SCmejU8d90f3t8EH_rDDPDyYUwE,5657
|
|
120
120
|
chellow/templates/input_date.html,sha256=rpgB5n0LfN8Y5djN_ZiuSxqdskxzCoKrEqI7hyJkVQo,1248
|
|
121
121
|
chellow/templates/local_report.html,sha256=pV7_0QwyQ-D3OS9LXrly5pq3qprZnwTCoq6vCnMTkS4,1332
|
|
@@ -364,6 +364,6 @@ chellow/templates/g/supply_note_edit.html,sha256=b8mB6_ucBwoljp03iy6AgVaZUhGw3-1
|
|
|
364
364
|
chellow/templates/g/supply_notes.html,sha256=6epNmZ3NKdXZz27fvmRUGeffg_oc1kmwuBeyRzQe3Rg,854
|
|
365
365
|
chellow/templates/g/unit.html,sha256=KouNVU0-i84afANkLQ_heJ0uDfJ9H5A05PuLqb8iCN8,438
|
|
366
366
|
chellow/templates/g/units.html,sha256=p5Nd-lAIboKPEOO6N451hx1bcKxMg4BDODnZ-43MmJc,441
|
|
367
|
-
chellow-
|
|
368
|
-
chellow-
|
|
369
|
-
chellow-
|
|
367
|
+
chellow-1720600044.0.0.dist-info/METADATA,sha256=a62z_0cUvruY5SbuPBQeyCb1_GLDsaUZNCewzbwjAYo,12205
|
|
368
|
+
chellow-1720600044.0.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
369
|
+
chellow-1720600044.0.0.dist-info/RECORD,,
|
|
File without changes
|