chellow 1727166948.0.0__py3-none-any.whl → 1727274025.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 CHANGED
@@ -3749,7 +3749,7 @@ def pc_get(pc_id):
3749
3749
 
3750
3750
  @e.route("/supplier_bills/<int:bill_id>/add_read")
3751
3751
  def read_add_get(bill_id):
3752
- read_types = g.sess.scalars(select(ReadType).order_by(ReadType.code))
3752
+ read_types = g.sess.scalars(select(ReadType).order_by(ReadType.code)).all()
3753
3753
  estimated_read_type = ReadType.get_by_code(g.sess, "E")
3754
3754
  tprs = g.sess.scalars(select(Tpr).order_by(Tpr.code))
3755
3755
  bill = Bill.get_by_id(g.sess, bill_id)
@@ -3761,15 +3761,14 @@ def read_add_get(bill_id):
3761
3761
  mpan_str = era.imp_mpan_core
3762
3762
  msn = era.msn
3763
3763
 
3764
- prev_read = (
3765
- g.sess.query(RegisterRead)
3764
+ prev_read = g.sess.scalars(
3765
+ select(RegisterRead)
3766
3766
  .join(Bill)
3767
- .filter(
3767
+ .where(
3768
3768
  Bill.supply == bill.supply, RegisterRead.present_date <= bill.finish_date
3769
3769
  )
3770
3770
  .order_by(RegisterRead.present_date.desc())
3771
- .first()
3772
- )
3771
+ ).first()
3773
3772
  if prev_read is not None:
3774
3773
  previous_date = prev_read.present_date
3775
3774
  previous_value = prev_read.present_value
chellow/gas/views.py CHANGED
@@ -129,12 +129,11 @@ def supply_get(g_supply_id):
129
129
  try:
130
130
  g_era_bundles = []
131
131
  g_supply = GSupply.get_by_id(g.sess, g_supply_id)
132
- g_eras = (
133
- g.sess.query(GEra)
134
- .filter(GEra.g_supply == g_supply)
132
+ g_eras = g.sess.scalars(
133
+ select(GEra)
134
+ .where(GEra.g_supply == g_supply)
135
135
  .order_by(GEra.start_date.desc())
136
- .all()
137
- )
136
+ ).all()
138
137
  for g_era in g_eras:
139
138
  physical_site = (
140
139
  g.sess.query(Site)
@@ -33,9 +33,7 @@
33
33
  </select>
34
34
  <fieldset>
35
35
  <legend>Previous Read</legend>
36
- <fieldset>
37
- <label>Date</label> {{input_date('previous', previous_date)}}
38
- </fieldset>
36
+ <label>Date</label> {{input_date('previous', previous_date)}}
39
37
  <label>Value</label> {{input_text('previous_value', previous_value)}}
40
38
  <label>Type</label>
41
39
  <select name="previous_type_id">
@@ -46,10 +44,7 @@
46
44
  </fieldset>
47
45
  <fieldset>
48
46
  <legend>Present Read</legend>
49
- <fieldset>
50
- <label>Date</label>
51
- {{input_date('present', None)}}
52
- </fieldset>
47
+ <label>Date</label> {{input_date('present', None)}}
53
48
  <label>Value</label> {{input_text('present_value', 0)}}
54
49
  <label>Type</label>
55
50
  <select name="present_type_id">
@@ -242,22 +242,22 @@
242
242
  {% endif %}
243
243
  >
244
244
  <td rowspan="{{rows_high}}">
245
- <a href="/g/bills/{{g_bill.id}}">{{g_bill.id}}</a>
245
+ <a href="/g/bills/{{g_bill.id}}">view</a>
246
246
  </td>
247
247
  <td rowspan="{{rows_high}}">
248
- <a
248
+ <span
249
249
  title="{{g_bill.start_date|hh_format}}"
250
- >{{g_bill.start_date|hh_format('date')}}</a>
250
+ >{{g_bill.start_date|hh_format('date')}}</span>
251
251
  </td>
252
252
  <td rowspan="{{rows_high}}">
253
- <a
253
+ <span
254
254
  title="{{g_bill.finish_date|hh_format}}"
255
- >{{g_bill.finish_date|hh_format('date')}}</a>
255
+ >{{g_bill.finish_date|hh_format('date')}}</span>
256
256
  </td>
257
257
  <td rowspan="{{rows_high}}">
258
- <a
258
+ <span
259
259
  title="{{g_bill.issue_date|hh_format}}"
260
- >{{g_bill.issue_date|hh_format('date')}}</a>
260
+ >{{g_bill.issue_date|hh_format('date')}}</span>
261
261
  </td>
262
262
  <td rowspan="{{rows_high}}">
263
263
  <a
@@ -287,26 +287,34 @@
287
287
  {% endif %}
288
288
  <td style="border-right: none;">
289
289
  {% if read %}
290
- <a
290
+ <span
291
291
  title="{{read.prev_date|hh_format}} {{read.msn }}"
292
- >{{read.prev_value}}</a>
292
+ >{{read.prev_value}}</span>
293
293
  {% endif %}
294
294
  </td>
295
295
  <td style="border-left: none; text-align: right;">
296
296
  {% if read %}
297
- {{ read.prev_type.code }}
297
+ <a
298
+ href="/g/read_types/{{read.prev_type.id}}"
299
+ title="{{read.prev_type.description}}"
300
+ >
301
+ {{ read.prev_type.code }}
302
+ </a>
298
303
  {% endif %}
299
304
  </td>
300
305
  <td style="border-right: none;">
301
306
  {% if read %}
302
- <a
307
+ <span
303
308
  title="{{read.pres_date|hh_format}} {{read.msn}}"
304
- >{{read.pres_value}}</a>
309
+ >{{read.pres_value}}</span>
305
310
  {% endif %}
306
311
  </td>
307
312
  <td style="border-left: none; text-align: right;">
308
313
  {% if read %}
309
- {{read.pres_type.code}}
314
+ <a
315
+ href="/g/read_types/{{read.pres_type.id}}"
316
+ title="{{read.pres_type.description}}"
317
+ >{{read.pres_type.code}}</a>
310
318
  {% endif %}
311
319
  </td>
312
320
  {% if not loop.first %}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: chellow
3
- Version: 1727166948.0.0
3
+ Version: 1727274025.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)
@@ -39,7 +39,7 @@ chellow/e/system_price.py,sha256=6w5J7bzwFAZubE2zdOFRiS8IIrVP8hkoIOaG2yCt-Ic,623
39
39
  chellow/e/tlms.py,sha256=M33D6YpMixu2KkwSCzDRM3kThLgShg8exp63Obo75l8,8905
40
40
  chellow/e/tnuos.py,sha256=XseYztPUsQXNKuBmystO2kzzwAG9ehCZgpGBTdgSk-A,4313
41
41
  chellow/e/triad.py,sha256=lIQj7EdUrcFwEqleuHZXYU_bfzIwNOqUVVxB3NPQt4A,13710
42
- chellow/e/views.py,sha256=AL7h9vqFUoCKjHmm769CScuaW2APy61poK2SIS0yN-c,220804
42
+ chellow/e/views.py,sha256=sXOg_V5PpZbY7Ufq2dv3NpjI8odYODQpSKdRbVz3XI4,220808
43
43
  chellow/e/bill_parsers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
44
  chellow/e/bill_parsers/activity_mop_stark_xlsx.py,sha256=UgWXDPzQkQghyj_lfgBqoSJpHB-t-qOdSaB8qY6GLog,4071
45
45
  chellow/e/bill_parsers/annual_mop_stark_xlsx.py,sha256=-HMoIfa_utXYKA44RuC0Xqv3vd2HLeQU_4P0iBUd3WA,4219
@@ -67,7 +67,7 @@ chellow/gas/cv.py,sha256=4cdYYQ8Qak6NeYdBCB4YaQ0jX8-UkaydIIdibCQuXxM,7344
67
67
  chellow/gas/dn_rate_parser.py,sha256=Mq8rAcUEUxIQOks59bsCKl8GrefvoHbrTCHqon9N0z0,11340
68
68
  chellow/gas/engine.py,sha256=jT7m6vddi5GnWd51wCYEVhBS-LZEn1T9ggZX7Y9HGK0,25263
69
69
  chellow/gas/transportation.py,sha256=Bkg8TWOs-v0ES-4qqwbleiOhqbE_t2KauUx9JYMZELM,5300
70
- chellow/gas/views.py,sha256=vwGz4Go2qcebH9Pm2_H0UtJbrtpUIMvxgn5JYc2Zn3g,59027
70
+ chellow/gas/views.py,sha256=R4Ky8syioWSQJLTuSKVLsc266eDv8a6WEo_e60u_4ug,59021
71
71
  chellow/reports/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
72
72
  chellow/reports/report_109.py,sha256=FmRWG8wQC97cj0nqQH7mrfbYesRIKWXQLh6ERHvtHrU,11212
73
73
  chellow/reports/report_111.py,sha256=rgwoOPfvbfwIC_IjBqs2e8umF_YTtpyejLrX_uCgyHE,28145
@@ -269,7 +269,7 @@ chellow/templates/e/parties.html,sha256=gx0fhzcbiUBstkty8M11dYosRZZ4RgF6X3kdVOFS
269
269
  chellow/templates/e/party.html,sha256=1Vmo6bu0NAV1wtLTn23xuLMsifL2ai3Ri1VaE-V772s,1915
270
270
  chellow/templates/e/pc.html,sha256=p6JjmzvO_P4zumxH--E8BkZG0vYc9NNbRGOpOgkppLY,521
271
271
  chellow/templates/e/pcs.html,sha256=k_eBu7f-dc1b5eXg7K0YpDxQpOrhIA1PV4FBJc0Zck0,560
272
- chellow/templates/e/read_add.html,sha256=PGNPKTQiXkTEANMKOXCzBLGwJJJfQIkIgpGRAb-Thho,2289
272
+ chellow/templates/e/read_add.html,sha256=qMyvk3x8Otj1UjXB_TGeYs0lZ4ibG_nvbJI1m25hq8I,2220
273
273
  chellow/templates/e/read_edit.html,sha256=JWnHn8Dcq3t_LUGLUV9IAMnhuacw38On7552kGn4QiU,3147
274
274
  chellow/templates/e/read_type.html,sha256=volKteZB79famXrzN_Bgqy9JT9C4a50vXLkuZ0ObBq0,403
275
275
  chellow/templates/e/read_types.html,sha256=CknHXNEkBnsAprqI66ftvnnMFBdR_kqI7o26rxjlrJA,473
@@ -359,13 +359,13 @@ chellow/templates/g/supplier_rate_script.html,sha256=e4dwskWTQcLv6qyX150VUeuaUvE
359
359
  chellow/templates/g/supplier_rate_script_add.html,sha256=zMjTkjupOsHFu-peUXL4IKjjc2OaSL-2ah4T9OdKp_o,620
360
360
  chellow/templates/g/supplier_rate_script_edit.html,sha256=GoUqXf52gWEH1iApmNdxOcKLItzpA-o7iQPQ1_in9BA,1950
361
361
  chellow/templates/g/supplies.html,sha256=oEAEfZaAuKv7EA6fd3blWjPwv_XKoNHLPlkRJ_afZHs,1267
362
- chellow/templates/g/supply.html,sha256=gr4Ivz5JkwmP09GPuWgwl6hhie1dJcAyyaAU0TKo5JE,10713
362
+ chellow/templates/g/supply.html,sha256=HMR2haS4-k24rGqWApA74Ufi_IODN0oNIa9d7L9Xe1o,11001
363
363
  chellow/templates/g/supply_edit.html,sha256=F2Ip4xCXLl4eFiRjMLZyUMIiznWw97GF7mN_50QAEWA,1653
364
364
  chellow/templates/g/supply_note_add.html,sha256=zWwppQTxBfN7Dw6Cgr330mw7SgDRoTcaIdAucNisZRE,658
365
365
  chellow/templates/g/supply_note_edit.html,sha256=b8mB6_ucBwoljp03iy6AgVaZUhGw3-1nAPevz-AgkhQ,1036
366
366
  chellow/templates/g/supply_notes.html,sha256=6epNmZ3NKdXZz27fvmRUGeffg_oc1kmwuBeyRzQe3Rg,854
367
367
  chellow/templates/g/unit.html,sha256=KouNVU0-i84afANkLQ_heJ0uDfJ9H5A05PuLqb8iCN8,438
368
368
  chellow/templates/g/units.html,sha256=p5Nd-lAIboKPEOO6N451hx1bcKxMg4BDODnZ-43MmJc,441
369
- chellow-1727166948.0.0.dist-info/METADATA,sha256=OFqmReMcR3x1oI4pDpOfuE-psdPEqI8sF4QQV5SPCsE,12204
370
- chellow-1727166948.0.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
371
- chellow-1727166948.0.0.dist-info/RECORD,,
369
+ chellow-1727274025.0.0.dist-info/METADATA,sha256=feQ4vMzLIgL6radY06s1TZ7qu60qhFpC_KvbVABRUcs,12204
370
+ chellow-1727274025.0.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
371
+ chellow-1727274025.0.0.dist-info/RECORD,,