chellow 1726485186.0.0__py3-none-any.whl → 1726510224.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
@@ -3943,20 +3943,58 @@ def scenario_add_get():
3943
3943
 
3944
3944
  @e.route("/scenarios/<int:scenario_id>")
3945
3945
  def scenario_get(scenario_id):
3946
+ start_date = None
3947
+ finish_date = None
3948
+ duration = 1
3949
+
3946
3950
  scenario = Scenario.get_by_id(g.sess, scenario_id)
3947
3951
  props = scenario.props
3948
- _, finish_date_ct = list(
3949
- c_months_c(
3950
- start_year=props["scenario_start_year"],
3951
- start_month=props["scenario_start_month"],
3952
- months=props["scenario_duration"],
3952
+ site_codes = "\n".join(props.get("site_codes", []))
3953
+ try:
3954
+ duration = props["scenario_duration"]
3955
+ _, finish_date_ct = list(
3956
+ c_months_c(
3957
+ start_year=props["scenario_start_year"],
3958
+ start_month=props["scenario_start_month"],
3959
+ months=duration,
3960
+ )
3961
+ )[-1]
3962
+ finish_date = to_utc(finish_date_ct)
3963
+ except KeyError:
3964
+ pass
3965
+
3966
+ try:
3967
+ start_date = to_utc(
3968
+ ct_datetime(
3969
+ props["scenario_start_year"],
3970
+ props["scenario_start_month"],
3971
+ props["scenario_start_day"],
3972
+ props["scenario_start_hour"],
3973
+ props["scenario_start_minute"],
3974
+ )
3953
3975
  )
3954
- )[-1]
3976
+ except KeyError:
3977
+ pass
3978
+
3979
+ try:
3980
+ finish_date = to_utc(
3981
+ ct_datetime(
3982
+ props["scenario_finish_year"],
3983
+ props["scenario_finish_month"],
3984
+ props["scenario_finish_day"],
3985
+ props["scenario_finish_hour"],
3986
+ props["scenario_finish_minute"],
3987
+ )
3988
+ )
3989
+ except KeyError:
3990
+ pass
3955
3991
  return render_template(
3956
3992
  "scenario.html",
3957
3993
  scenario=scenario,
3958
- scenario_finish_date=to_utc(finish_date_ct),
3959
- scenario_duration=props["scenario_duration"],
3994
+ scenario_start_date=start_date,
3995
+ scenario_finish_date=finish_date,
3996
+ scenario_duration=duration,
3997
+ site_codes=site_codes,
3960
3998
  )
3961
3999
 
3962
4000
 
@@ -13,6 +13,7 @@
13
13
  <caption>Current DC Contracts</caption>
14
14
  <thead>
15
15
  <tr>
16
+ <th>View</th>
16
17
  <th>Name</th>
17
18
  <th>Start Date</th>
18
19
  <th>DC</th>
@@ -21,14 +22,10 @@
21
22
  <tbody>
22
23
  {% for contract in current_dc_contracts %}
23
24
  <tr>
24
- <td>
25
- <a href="/e/dc_contracts/{{contract.id}}">{{contract.name}}</a>
26
- </td>
25
+ <td><a href="/e/dc_contracts/{{contract.id}}">View</a></td>
26
+ <td>{{contract.name}}</td>
27
27
  <td>{{ contract.start_rate_script.start_date|hh_format }}</td>
28
- <td>
29
- <a href="/e/parties/{{contract.party.id}}"
30
- >{{contract.party.name}}</a>
31
- </td>
28
+ <td><a href="/e/parties/{{contract.party.id}}">{{contract.party.name}}</a></td>
32
29
  </tr>
33
30
  {% endfor %}
34
31
  </tbody>
@@ -28,8 +28,12 @@
28
28
  <fieldset>
29
29
  <legend>Run With Duration</legend>
30
30
  <input type="hidden" name="scenario_id" value="{{scenario.id}}">
31
+ <label>Start Date</label>
32
+ {{ input_date('start', scenario_start_date) }}
33
+ <label>Finish Date</label>
34
+ {{ input_date('finish', scenario_finish_date) }}
31
35
  <label>Site Codes</label>
32
- {{input_textarea('site_codes', '', 5, 40,
36
+ {{input_textarea('site_codes', site_codes, 5, 40,
33
37
  placeholder='One on each line, includes all if left blank')}}
34
38
  <input type="submit" value="Run">
35
39
  </fieldset>
@@ -153,7 +153,7 @@
153
153
  <form action="/reports/111">
154
154
  <fieldset>
155
155
  <input type="hidden" name="batch_id" value="{{batch.id}}">
156
- <legend>Download McBill Check</legend>
156
+ <legend>Download Bill Check</legend>
157
157
  <label>MPAN Cores</label>
158
158
  {{input_textarea(
159
159
  'mpan_cores', '', 5, 40,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: chellow
3
- Version: 1726485186.0.0
3
+ Version: 1726510224.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=NwDgs0iZ6nmfX4qF5sSwFlecSsqDBMRsf46vxuIkgVg,219605
41
+ chellow/e/views.py,sha256=aljiDbLvO_rUl00ohDDxs-3-xPmsuguaOyo69lcXcBA,220624
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
@@ -191,7 +191,7 @@ chellow/templates/e/dc_contract_hh_import.html,sha256=UODiBFNohb60MjH1w-9JW1JE0O
191
191
  chellow/templates/e/dc_contract_hh_imports.html,sha256=eXFDGyzSgag4JRism81_p5yTzQOjCIXaVkQ8tl3dDcM,8172
192
192
  chellow/templates/e/dc_contract_properties.html,sha256=2EmA91gYWZcTOHQ3PxXQrpTOb8dm0OGjwRWsW6qNI9s,455
193
193
  chellow/templates/e/dc_contract_properties_edit.html,sha256=TGYcHTlWbk5WmjZPkdbHhRVZcOpEfhowCp2penZcGiE,1704
194
- chellow/templates/e/dc_contracts.html,sha256=v8czpEcMzndngfWNXIKXib6Xrz9OwJjQAmNQNrQ6Y08,1705
194
+ chellow/templates/e/dc_contracts.html,sha256=vatnEwXJ9xvk97_NI537rTKqIExAuDGhquQ8k07s5xA,1708
195
195
  chellow/templates/e/dc_contracts_add.html,sha256=2lrGrNqAoKp16OiMoNDNlJxBMW3QdSPfgEFheSg826s,710
196
196
  chellow/templates/e/dc_rate_script.html,sha256=gfKUHV2IMsTQT-cYfjl4aiEBqGEWSj3uW22UZpoyGq4,1219
197
197
  chellow/templates/e/dc_rate_script_add.html,sha256=5MlE4r5eLww3xI9qZRlu8hE8bU7RVwyDJcr20-0e4uY,644
@@ -272,7 +272,7 @@ chellow/templates/e/read_add.html,sha256=PGNPKTQiXkTEANMKOXCzBLGwJJJfQIkIgpGRAb-
272
272
  chellow/templates/e/read_edit.html,sha256=JWnHn8Dcq3t_LUGLUV9IAMnhuacw38On7552kGn4QiU,3147
273
273
  chellow/templates/e/read_type.html,sha256=volKteZB79famXrzN_Bgqy9JT9C4a50vXLkuZ0ObBq0,403
274
274
  chellow/templates/e/read_types.html,sha256=CknHXNEkBnsAprqI66ftvnnMFBdR_kqI7o26rxjlrJA,473
275
- chellow/templates/e/scenario.html,sha256=ZPkRsRcl_qgkFxSYanTfLDPQCzEqsV5u1m-swv4QNaU,1353
275
+ chellow/templates/e/scenario.html,sha256=E8o3WQwAEejzaMPzeuUqyt9fWWNSDtN96qkJz0slDEo,1522
276
276
  chellow/templates/e/scenario_add.html,sha256=qQpxvhlrQqrNYiIQTHu_NvSoeSKuRNEJQYwLqRlQ8_U,516
277
277
  chellow/templates/e/scenario_docs.html,sha256=hOg6hrrnOcvdk7jXRsMrk1wtwK7K0IpqcBukX_vlvRg,4878
278
278
  chellow/templates/e/scenario_edit.html,sha256=Uf64v_qsBP0BxaFEIz214CC_dZXlvro4zvQXH_towhA,1070
@@ -289,7 +289,7 @@ chellow/templates/e/source.html,sha256=6cLjZWKS2w9Zy1C4hzi1lTKXAdKKFQ8wSxbwAjhP3
289
289
  chellow/templates/e/sources.html,sha256=AW_ysj5ZzArTLz0-FWappMsUEU1AO9gw7D4XSHbINu4,453
290
290
  chellow/templates/e/ssc.html,sha256=NiTbn9yLYYG_DV4j9S73rnIVmzTAzTbyaXomverHNnI,811
291
291
  chellow/templates/e/sscs.html,sha256=r4uVLWSCMVhYeN_r5e9QVJGLPc4R9yhdJxGXON9Xma8,983
292
- chellow/templates/e/supplier_batch.html,sha256=xr17ydDxKALMOcs8rfz-9T4wGyHKJqPpOQqz9brT9eY,5013
292
+ chellow/templates/e/supplier_batch.html,sha256=A-iut_y8jCJ2nm0QQF_uPuRJWnWH9eN056cUJlmBJ6Q,5011
293
293
  chellow/templates/e/supplier_batch_add.html,sha256=RabJ20yLpsF_npSLL5aeLlPDa2tL99fENaIzDYZJy1w,1240
294
294
  chellow/templates/e/supplier_batch_edit.html,sha256=wFnhGHLo51omagJdE8viIYgmift7Y3n0C39sMru7XWU,1190
295
295
  chellow/templates/e/supplier_batch_file.html,sha256=fohdthY3ibO9a_2BJsYWyJhZL369F0gaUV7McFzWhMQ,1226
@@ -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-1726485186.0.0.dist-info/METADATA,sha256=A-SuyKUAjAIHqSedTnVcPU5whqX-d8hImIz4IW0ANfA,12204
369
- chellow-1726485186.0.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
370
- chellow-1726485186.0.0.dist-info/RECORD,,
368
+ chellow-1726510224.0.0.dist-info/METADATA,sha256=5yHyg_hOusHvyLO5578hobk7B9yosB2-EFVHM94oE7U,12204
369
+ chellow-1726510224.0.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
370
+ chellow-1726510224.0.0.dist-info/RECORD,,