chellow 1724334398.0.0__py3-none-any.whl → 1724747184.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.

@@ -278,6 +278,10 @@ def _handle_1500(headers, pre_record, record):
278
278
  }
279
279
 
280
280
 
281
+ def _handle_1700(headers, pre_record, record):
282
+ pass
283
+
284
+
281
285
  def _handle_2000(headers, pre_record, record):
282
286
  pass
283
287
 
@@ -299,6 +303,7 @@ LINE_HANDLERS = {
299
303
  "1455": _handle_1455,
300
304
  "1460": _handle_1460,
301
305
  "1500": _handle_1500,
306
+ "1700": _handle_1700,
302
307
  "2000": _handle_2000,
303
308
  "9999": _handle_9999,
304
309
  }
chellow/e/views.py CHANGED
@@ -4012,7 +4012,8 @@ def site_energy_management_get(site_id):
4012
4012
  now = utc_datetime_now()
4013
4013
  last_month = now - relativedelta(months=1)
4014
4014
 
4015
- eras = g.sess.execute(
4015
+ supply_dicts = []
4016
+ for era in g.sess.scalars(
4016
4017
  select(Era)
4017
4018
  .join(SiteEra)
4018
4019
  .join(Supply)
@@ -4022,12 +4023,16 @@ def site_energy_management_get(site_id):
4022
4023
  Era.finish_date == null(),
4023
4024
  Party.dno_code != "88",
4024
4025
  )
4025
- ).scalars()
4026
+ ):
4027
+ first_era = g.sess.scalars(
4028
+ select(Era).where(Era.supply == era.supply).order_by(Era.start_date)
4029
+ ).first()
4030
+ supply_dicts.append({"last_era": era, "first_era": first_era})
4026
4031
 
4027
4032
  return render_template(
4028
4033
  "em_site.html",
4029
4034
  site=site,
4030
- eras=eras,
4035
+ supply_dicts=supply_dicts,
4031
4036
  now=now,
4032
4037
  last_month=last_month,
4033
4038
  )
@@ -22,6 +22,7 @@
22
22
  <tr>
23
23
  <th>View</th>
24
24
  <th>Name</th>
25
+ <th>From</th>
25
26
  <th>Source</th>
26
27
  <th>Generator Type</th>
27
28
  <th>DNO</th>
@@ -34,24 +35,26 @@
34
35
  </tr>
35
36
  </thead>
36
37
  <tbody>
37
- {% for era in eras %}
38
- {% set supply = era.supply %}
38
+ {% for supply_dict in supply_dicts %}
39
+ {% set last_era = supply_dict.last_era %}
40
+ {% set supply = last_era.supply %}
39
41
  <tr>
40
42
  <td>
41
43
  <a href="/e/supplies/{{supply.id}}">view</a>
42
44
  </td>
43
45
  <td>{{supply.name}}</td>
46
+ <td>{{supply_dict.first_era.start_date|hh_format}}</td>
44
47
  <td>{{supply.source.code}}</td>
45
48
  <td>{{supply.generator_type.code}}</td>
46
49
  <td><a href="/dnos/{{supply.dno.id}}">{{supply.dno.dno_code}}</a></td>
47
50
  <td>
48
- {% if era.imp_mpan_core %}
49
- {{era.imp_mpan_core}}
51
+ {% if last_era.imp_mpan_core %}
52
+ {{last_era.imp_mpan_core}}
50
53
  {% endif %}
51
54
  </td>
52
55
  <td>
53
- {% if era.exp_mpan_core %}
54
- {{era.exp_mpan_core}}
56
+ {% if last_era.exp_mpan_core %}
57
+ {{last_era.exp_mpan_core}}
55
58
  {% endif %}
56
59
  </td>
57
60
  <td>
@@ -70,8 +73,8 @@
70
73
  <a href="/reports/5/output/?site_id={{osite.id}}">{{osite.code}}</a>
71
74
  {% endfor %}
72
75
  </td>
73
- <td>{{era.meter_category}}</td>
74
- <td>{{era.msn}}</td>
76
+ <td>{{last_era.meter_category}}</td>
77
+ <td>{{last_era.msn}}</td>
75
78
  </tr>
76
79
  {% endfor %}
77
80
  </tbody>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: chellow
3
- Version: 1724334398.0.0
3
+ Version: 1724747184.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)
@@ -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=gxBqMpDaQ41MHEFhx6oZ1OgeDNYu700PBeRJCNvrVAQ,215951
41
+ chellow/e/views.py,sha256=-0Ys7XVdBgFYaWWnKfRRwcVeQ7YyrHNS1HVXuFNk8wY,216190
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
@@ -52,7 +52,7 @@ chellow/e/bill_parsers/gdf_csv.py,sha256=ZfK3Oc6oP28p_P9DIevLNB_zW2WLcEJ3Lvb1gL3
52
52
  chellow/e/bill_parsers/haven_csv.py,sha256=0uENq8IgVNqdxfBQMBxLTSZWCOuDHXZC0xzk52SbfyE,13652
53
53
  chellow/e/bill_parsers/haven_edi.py,sha256=YGPHRxPOhje9s32jqPHHELni2tooOYj3cMC_qaZVPq4,16107
54
54
  chellow/e/bill_parsers/haven_edi_tprs.py,sha256=ZVX9CCqUybsot_Z0BEOJPvl9x5kSr7fEWyuJXvZDcz4,11841
55
- chellow/e/bill_parsers/mm.py,sha256=KhAwF8o3cdabTBmc2pbZgm9MlkAachwNsy4bsivTSrM,9459
55
+ chellow/e/bill_parsers/mm.py,sha256=W_n7xlXrSH6QewkCnNQpMAxWUocXctIHo7XR-t95Aas,9543
56
56
  chellow/e/bill_parsers/nonsettlement_dc_stark_xlsx.py,sha256=yogXTuQHGRL7IiqvRWr2C9V24ez1j9Yx0128UygPE_k,4723
57
57
  chellow/e/bill_parsers/settlement_dc_stark_xlsx.py,sha256=PlEqCZuJ9DfQXeeYQ64jtf3ML7sUt_tt61QOOTnkE5c,6380
58
58
  chellow/e/bill_parsers/sse_edi.py,sha256=L85DOfNkqexeEIEr8pCBn_2sHJI-zEaw6cogpE3YyYM,15204
@@ -207,7 +207,7 @@ chellow/templates/e/duration_report.html,sha256=MrDgLDzbXdGLfpUbZ9U3xSP2H1VF0eK2
207
207
  chellow/templates/e/elexon.html,sha256=QW2EKdTMBTIzUkiXpYIHVZidZHNca3GmyiwWKaWkvIY,997
208
208
  chellow/templates/e/em_hh_data.html,sha256=2Ndvpo2ngO2dOpEZa05-6xRCy3IKNkWHJwW6sVjhhWY,2032
209
209
  chellow/templates/e/em_months.html,sha256=_WdOxiQ8dMEke1_nmD2yglY2zYzMx0AsaQgOw_6kDk8,6657
210
- chellow/templates/e/em_site.html,sha256=LQJ1RJe7IJCZ-dsmd-Ku3hhNEeKUq3BimEBKJPNZ-do,2890
210
+ chellow/templates/e/em_site.html,sha256=vbax2Je_DNCSWNDM0XLuvegRXNlDs71Vf4l07LCABSE,3066
211
211
  chellow/templates/e/em_totals.html,sha256=D_H12qF6b8heVeSGzcl4u7xRvtPLUtM1zWYrwEFRFTM,678
212
212
  chellow/templates/e/energisation_status.html,sha256=hvD1qMpLYjmWWGIrv-5Ko3KbRL3a6MdQXcO3Fr4_cHA,478
213
213
  chellow/templates/e/energisation_statuses.html,sha256=qwRIH7jqKA1MgajsWOeZAH89iRpOfsNW_fAqXymUQ3E,587
@@ -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-1724334398.0.0.dist-info/METADATA,sha256=pqYIzP5QRUm6h-OprcFHq3lYO4fl_hYTTKksG19zR1k,12241
369
- chellow-1724334398.0.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
370
- chellow-1724334398.0.0.dist-info/RECORD,,
368
+ chellow-1724747184.0.0.dist-info/METADATA,sha256=YdSQk2lYQhHcTgC7lQG-L6Uea5nRXAKwcxda9YzeSk8,12241
369
+ chellow-1724747184.0.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
370
+ chellow-1724747184.0.0.dist-info/RECORD,,