chellow 1702908341.0.0__py3-none-any.whl → 1702999177.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 +29 -4
- chellow/templates/e/era_edit_form.html +1 -1
- {chellow-1702908341.0.0.dist-info → chellow-1702999177.0.0.dist-info}/METADATA +1 -1
- {chellow-1702908341.0.0.dist-info → chellow-1702999177.0.0.dist-info}/RECORD +5 -5
- {chellow-1702908341.0.0.dist-info → chellow-1702999177.0.0.dist-info}/WHEEL +0 -0
chellow/e/views.py
CHANGED
|
@@ -1552,6 +1552,7 @@ def era_edit_get(era_id):
|
|
|
1552
1552
|
@e.route("/eras/<int:era_id>/edit/form")
|
|
1553
1553
|
def era_edit_form_get(era_id):
|
|
1554
1554
|
try:
|
|
1555
|
+
era = Era.get_by_id(g.sess, era_id)
|
|
1555
1556
|
ct_now = ct_datetime_now()
|
|
1556
1557
|
cops = g.sess.scalars(select(Cop).order_by(Cop.code))
|
|
1557
1558
|
comms = g.sess.scalars(select(Comm).order_by(Comm.code))
|
|
@@ -1565,7 +1566,17 @@ def era_edit_form_get(era_id):
|
|
|
1565
1566
|
else:
|
|
1566
1567
|
start_date = to_utc(ct_datetime(ct_now.year, ct_now.month, ct_now.day))
|
|
1567
1568
|
|
|
1568
|
-
|
|
1569
|
+
is_ended = req_bool("is_ended")
|
|
1570
|
+
if is_ended:
|
|
1571
|
+
if "finish_year" in request.values:
|
|
1572
|
+
finish_date = req_hh_date("finish")
|
|
1573
|
+
elif era.finish_date is None:
|
|
1574
|
+
finish_date = start_date
|
|
1575
|
+
else:
|
|
1576
|
+
finish_date = era.finish_date
|
|
1577
|
+
else:
|
|
1578
|
+
finish_date = None
|
|
1579
|
+
|
|
1569
1580
|
RateScriptAliasStart = aliased(RateScript)
|
|
1570
1581
|
RateScriptAliasFinish = aliased(RateScript)
|
|
1571
1582
|
mop_contracts = g.sess.scalars(
|
|
@@ -1703,20 +1714,26 @@ def era_edit_form_get(era_id):
|
|
|
1703
1714
|
mtc_participant = None
|
|
1704
1715
|
|
|
1705
1716
|
if pc.code == "00":
|
|
1706
|
-
|
|
1717
|
+
imp_llfcs_q = (
|
|
1707
1718
|
select(Llfc)
|
|
1708
1719
|
.join(MtcLlfc)
|
|
1709
1720
|
.where(
|
|
1710
1721
|
MtcLlfc.mtc_participant == mtc_participant,
|
|
1711
1722
|
start_date >= Llfc.valid_from,
|
|
1712
|
-
Llfc.valid_to == null(),
|
|
1713
1723
|
Llfc.is_import == true(),
|
|
1714
1724
|
)
|
|
1715
1725
|
.order_by(Llfc.code, Llfc.valid_from.desc())
|
|
1716
1726
|
.distinct()
|
|
1717
1727
|
)
|
|
1728
|
+
if finish_date is None:
|
|
1729
|
+
imp_llfcs_q = imp_llfcs_q.where(Llfc.valid_to == null())
|
|
1730
|
+
else:
|
|
1731
|
+
imp_llfcs_q = imp_llfcs_q.where(
|
|
1732
|
+
or_(Llfc.valid_to == null(), Llfc.valid_to >= finish_date)
|
|
1733
|
+
)
|
|
1734
|
+
imp_llfcs = g.sess.scalars(imp_llfcs_q)
|
|
1718
1735
|
|
|
1719
|
-
|
|
1736
|
+
exp_llfcs_q = (
|
|
1720
1737
|
select(Llfc)
|
|
1721
1738
|
.join(MtcLlfc)
|
|
1722
1739
|
.where(
|
|
@@ -1728,6 +1745,13 @@ def era_edit_form_get(era_id):
|
|
|
1728
1745
|
.order_by(Llfc.code, Llfc.valid_from.desc())
|
|
1729
1746
|
.distinct()
|
|
1730
1747
|
)
|
|
1748
|
+
if finish_date is None:
|
|
1749
|
+
exp_llfcs_q = exp_llfcs_q.where(Llfc.valid_to == null())
|
|
1750
|
+
else:
|
|
1751
|
+
exp_llfcs_q = exp_llfcs_q.where(
|
|
1752
|
+
or_(Llfc.valid_to == null(), Llfc.valid_to >= finish_date)
|
|
1753
|
+
)
|
|
1754
|
+
exp_llfcs = g.sess.scalars(exp_llfcs_q)
|
|
1731
1755
|
else:
|
|
1732
1756
|
mtc_ssc = MtcSsc.find_by_values(g.sess, mtc_participant, ssc, start_date)
|
|
1733
1757
|
imp_llfcs = g.sess.scalars(
|
|
@@ -1763,6 +1787,7 @@ def era_edit_form_get(era_id):
|
|
|
1763
1787
|
return render_template(
|
|
1764
1788
|
"era_edit_form.html",
|
|
1765
1789
|
era=era,
|
|
1790
|
+
finish_date=finish_date,
|
|
1766
1791
|
energisation_statuses=energisation_statuses,
|
|
1767
1792
|
default_energisation_status=default_energisation_status,
|
|
1768
1793
|
mop_contracts=mop_contracts,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: chellow
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1702999177.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)
|
|
@@ -34,7 +34,7 @@ chellow/e/scenario.py,sha256=1tUxnvwTzr6cKqiw2wphdv5XDzV6JO6UVYkyQa67vHs,23263
|
|
|
34
34
|
chellow/e/system_price.py,sha256=F2GF_TNapfpbhoYjuGYAUCtD4JnccOUfd3w2ClG55qc,8032
|
|
35
35
|
chellow/e/tlms.py,sha256=m6bUY1LNRlPoZ8va7Y3TlXAIktlTz36UVygFoDqwXIc,9586
|
|
36
36
|
chellow/e/tnuos.py,sha256=Ry5Re7h5lOwzDgFRg4KhhFX1HMJ2vVWEwPJKYeESecs,20806
|
|
37
|
-
chellow/e/views.py,sha256
|
|
37
|
+
chellow/e/views.py,sha256=pdqQtAjAsEK1Fk3Ongg8af5vlS25vEUauYCK2Dh99vA,209207
|
|
38
38
|
chellow/e/bill_parsers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
39
|
chellow/e/bill_parsers/activity_mop_stark_xlsx.py,sha256=UgWXDPzQkQghyj_lfgBqoSJpHB-t-qOdSaB8qY6GLog,4071
|
|
40
40
|
chellow/e/bill_parsers/annual_mop_stark_xlsx.py,sha256=-HMoIfa_utXYKA44RuC0Xqv3vd2HLeQU_4P0iBUd3WA,4219
|
|
@@ -205,7 +205,7 @@ chellow/templates/e/em_totals.html,sha256=D_H12qF6b8heVeSGzcl4u7xRvtPLUtM1zWYrwE
|
|
|
205
205
|
chellow/templates/e/energisation_status.html,sha256=hvD1qMpLYjmWWGIrv-5Ko3KbRL3a6MdQXcO3Fr4_cHA,478
|
|
206
206
|
chellow/templates/e/energisation_statuses.html,sha256=qwRIH7jqKA1MgajsWOeZAH89iRpOfsNW_fAqXymUQ3E,587
|
|
207
207
|
chellow/templates/e/era_edit.html,sha256=hW2_8Yt1n6VbT15a3PJ4Tn7wwVKyU-IkYDSLC1ZWCRQ,4022
|
|
208
|
-
chellow/templates/e/era_edit_form.html,sha256=
|
|
208
|
+
chellow/templates/e/era_edit_form.html,sha256=NhVp965vVnQw6fneGugkAc0nkojjUncbQdio6IeQwhE,4745
|
|
209
209
|
chellow/templates/e/era_supplier_bill_add.html,sha256=TgcIFuX-_sXXYFsn9yGT-QqMrZe6uLxWoJ-G0f-VELU,2050
|
|
210
210
|
chellow/templates/e/generator_type.html,sha256=En0lQSU_mc-QLMG5Hx-gDINVoqyfa4X9RYwopzpm33g,439
|
|
211
211
|
chellow/templates/e/generator_types.html,sha256=672cXDYewLAk32pzp6c8fi2P48FikxRrzTEtx_PlR7Y,535
|
|
@@ -357,6 +357,6 @@ chellow/templates/g/supply_note_edit.html,sha256=6UQf_qbhFDys3cVsTp-c7ABWZpggW9R
|
|
|
357
357
|
chellow/templates/g/supply_notes.html,sha256=WR3YwGh_qqTklSJ7JqWX6BKBc9rk_jMff4RiWZiF2CM,936
|
|
358
358
|
chellow/templates/g/unit.html,sha256=KouNVU0-i84afANkLQ_heJ0uDfJ9H5A05PuLqb8iCN8,438
|
|
359
359
|
chellow/templates/g/units.html,sha256=p5Nd-lAIboKPEOO6N451hx1bcKxMg4BDODnZ-43MmJc,441
|
|
360
|
-
chellow-
|
|
361
|
-
chellow-
|
|
362
|
-
chellow-
|
|
360
|
+
chellow-1702999177.0.0.dist-info/METADATA,sha256=n-t_5b5YhtN3u4JVBLMB28fU2zYztyaOExrN68FJTrA,12160
|
|
361
|
+
chellow-1702999177.0.0.dist-info/WHEEL,sha256=mRYSEL3Ih6g5a_CVMIcwiF__0Ae4_gLYh01YFNwiq1k,87
|
|
362
|
+
chellow-1702999177.0.0.dist-info/RECORD,,
|
|
File without changes
|