chellow 1726494151.0.0__py3-none-any.whl → 1726564344.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.

@@ -110,10 +110,10 @@ def _process_CCD2(elements, headers):
110
110
  units_billed = to_decimal(nuct) / units_divisor
111
111
  breakdown[key] += units_billed
112
112
 
113
- if "start_date" not in headers:
113
+ if tpref == "standing" or "start_date" not in headers:
114
114
  headers["start_date"] = to_date(csdt[0])
115
115
 
116
- if "finish_date" not in headers:
116
+ if tpref == "standing" or "finish_date" not in headers:
117
117
  headers["finish_date"] = _to_finish_date(cedt[0])
118
118
 
119
119
  if "mprn" not in headers:
@@ -2,7 +2,7 @@ import csv
2
2
  import sys
3
3
  import threading
4
4
  import traceback
5
- from collections import OrderedDict, defaultdict
5
+ from collections import defaultdict
6
6
  from datetime import datetime as Datetime
7
7
  from decimal import Decimal
8
8
  from itertools import combinations
@@ -11,7 +11,7 @@ from dateutil.relativedelta import relativedelta
11
11
 
12
12
  from flask import g, request
13
13
 
14
- from sqlalchemy import or_
14
+ from sqlalchemy import or_, select
15
15
  from sqlalchemy.orm import joinedload, subqueryload
16
16
  from sqlalchemy.sql.expression import null, true
17
17
 
@@ -27,7 +27,6 @@ from chellow.models import (
27
27
  Contract,
28
28
  Era,
29
29
  Llfc,
30
- MarketRole,
31
30
  MtcParticipant,
32
31
  RSession,
33
32
  RegisterRead,
@@ -380,19 +379,19 @@ def _process_supply(
380
379
  while enlarged:
381
380
  enlarged = False
382
381
  covered_elems = find_elements(bill)
383
- covered_bills = OrderedDict(
382
+ covered_bills = dict(
384
383
  (b.id, b)
385
- for b in sess.query(Bill)
386
- .join(Batch)
387
- .join(Contract)
388
- .join(MarketRole)
389
- .filter(
390
- Bill.supply == supply,
391
- Bill.start_date <= covered_finish,
392
- Bill.finish_date >= covered_start,
393
- MarketRole.code == market_role_code,
384
+ for b in sess.scalars(
385
+ select(Bill)
386
+ .join(Batch)
387
+ .where(
388
+ Bill.supply == supply,
389
+ Bill.start_date <= covered_finish,
390
+ Bill.finish_date >= covered_start,
391
+ Batch.contract == contract,
392
+ )
393
+ .order_by(Bill.start_date, Bill.issue_date)
394
394
  )
395
- .order_by(Bill.start_date, Bill.issue_date)
396
395
  )
397
396
  while True:
398
397
  to_del = None
@@ -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>
@@ -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: 1726494151.0.0
3
+ Version: 1726564344.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)
@@ -60,7 +60,7 @@ chellow/e/bill_parsers/sww_xls.py,sha256=QEjiuvwvr5FuWCfqqVw8LaA_vZyAKsvRAS5fw3x
60
60
  chellow/gas/bill_import.py,sha256=w0lPgK_Drzh8rtnEBQe3qFuxrgzZ6qQSgpaGrrGznMU,6549
61
61
  chellow/gas/bill_parser_csv.py,sha256=Ecdy-apFT-mWAxddAsM4k1s-9-FpIaOfjP0oFc0rdQg,5557
62
62
  chellow/gas/bill_parser_engie_edi.py,sha256=Ko0vZP-QdVQ1uuhS_5cdrii60_cM4b_LFJMoY0pZqnk,8950
63
- chellow/gas/bill_parser_total_edi.py,sha256=hbjvahC8mQ0RuyIEQVJu18XNqq7T_htnV-OYg6NSuiE,7379
63
+ chellow/gas/bill_parser_total_edi.py,sha256=HdX2ctKvqIA5saf8VkpWmYWfqaZsdB-sAEcMSZjTgE4,7425
64
64
  chellow/gas/ccl.py,sha256=DMlcPUELZi00CaDekVJINYk3GgH5apFrImVdmkbyba0,2913
65
65
  chellow/gas/cv.py,sha256=4cdYYQ8Qak6NeYdBCB4YaQ0jX8-UkaydIIdibCQuXxM,7344
66
66
  chellow/gas/dn_rate_parser.py,sha256=Mq8rAcUEUxIQOks59bsCKl8GrefvoHbrTCHqon9N0z0,11340
@@ -69,7 +69,7 @@ chellow/gas/transportation.py,sha256=Bkg8TWOs-v0ES-4qqwbleiOhqbE_t2KauUx9JYMZELM
69
69
  chellow/gas/views.py,sha256=zOlJnL6eVq7Tag-0NMabzCPQk5AoTrclEz-923pbwAE,57851
70
70
  chellow/reports/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
71
71
  chellow/reports/report_109.py,sha256=FmRWG8wQC97cj0nqQH7mrfbYesRIKWXQLh6ERHvtHrU,11212
72
- chellow/reports/report_111.py,sha256=AlYjvCDpGNe1qBuzW52EONWDsFaIVElug0Vpe9qm1PY,28169
72
+ chellow/reports/report_111.py,sha256=rgwoOPfvbfwIC_IjBqs2e8umF_YTtpyejLrX_uCgyHE,28145
73
73
  chellow/reports/report_169.py,sha256=tnTiHmhigcgZ7E8rUSfgzsVYUCW947xBZZq04-KqfK8,9287
74
74
  chellow/reports/report_181.py,sha256=mCL6vXfrj8r0kL-LilDS0SnSu5tJOzCq7eMJVx9zpEw,4999
75
75
  chellow/reports/report_183.py,sha256=DZX-hHJPl_Tbgkt31C_cuLZg_5L2b6iCPQ5foOZizR0,8817
@@ -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
@@ -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-1726494151.0.0.dist-info/METADATA,sha256=64Fg0dcAvXBOlRHQla8VKh58635-X7YjLyWsRhWhv2A,12204
369
- chellow-1726494151.0.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
370
- chellow-1726494151.0.0.dist-info/RECORD,,
368
+ chellow-1726564344.0.0.dist-info/METADATA,sha256=OH6pGKFudqcxiUUQ7qIvzgp-iO_kS7m6T0CjY-ywzh8,12204
369
+ chellow-1726564344.0.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
370
+ chellow-1726564344.0.0.dist-info/RECORD,,