chellow 1717489198.0.0__py3-none-any.whl → 1717768383.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.

@@ -8,7 +8,7 @@ from openpyxl import load_workbook
8
8
  from werkzeug.exceptions import BadRequest
9
9
 
10
10
  from chellow.models import Session
11
- from chellow.utils import hh_format, parse_mpan_core, to_utc
11
+ from chellow.utils import parse_mpan_core, to_utc
12
12
 
13
13
 
14
14
  class Parser:
@@ -99,10 +99,18 @@ class Parser:
99
99
  ad_hoc_visits = self.get_dec("P", row)
100
100
  ad_hoc_rate = self.get_dec("Q", row)
101
101
  ad_hoc_gbp = self.get_dec("R", row)
102
+ activity_names = set()
103
+ activity_gbp = Decimal("0")
104
+ if ad_hoc_gbp != 0:
105
+ activity_names.add("ad_hoc_visit")
106
+ activity_gbp += ad_hoc_gbp
102
107
 
103
108
  annual_visits = self.get_int("S", row)
104
109
  annual_rate = self.get_dec("T", row)
105
110
  annual_gbp = self.get_dec("U", row)
111
+ if annual_gbp != 0:
112
+ activity_names.add("annual_visit")
113
+ activity_gbp += annual_gbp
106
114
 
107
115
  if cop_3_meters > 0:
108
116
  cop = "3"
@@ -121,19 +129,16 @@ class Parser:
121
129
  "mpan-gbp": mpan_gbp,
122
130
  "ad-hoc-visits": ad_hoc_visits,
123
131
  "ad-hoc-rate": [ad_hoc_rate],
124
- "ad-hoc-gbp": ad_hoc_gbp,
132
+ "ad-hoc-gbp-info": ad_hoc_gbp,
125
133
  "annual-visits-count": annual_visits,
126
134
  "annual-visits-rate": [annual_rate],
127
- "annual-visits-gbp": annual_gbp,
135
+ "annual-visits-gbp-info": annual_gbp,
128
136
  }
129
- annual_date_cell = self.get_cell("V", row)
130
- annual_date_value = annual_date_cell.value
131
- if annual_date_value is not None:
132
- if isinstance(annual_date_value, Datetime):
133
- annual_date = hh_format(annual_date_value)
134
- else:
135
- annual_date = annual_date_value
136
- breakdown["annual-visits-date"] = [annual_date]
137
+ if len(activity_names) > 0:
138
+ breakdown["activity-name"] = sorted(activity_names)
139
+
140
+ if activity_gbp != 0:
141
+ breakdown["activity-gbp"] = activity_gbp
137
142
 
138
143
  bills.append(
139
144
  {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: chellow
3
- Version: 1717489198.0.0
3
+ Version: 1717768383.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)
@@ -53,7 +53,7 @@ chellow/e/bill_parsers/haven_edi.py,sha256=YGPHRxPOhje9s32jqPHHELni2tooOYj3cMC_q
53
53
  chellow/e/bill_parsers/haven_edi_tprs.py,sha256=ZVX9CCqUybsot_Z0BEOJPvl9x5kSr7fEWyuJXvZDcz4,11841
54
54
  chellow/e/bill_parsers/mm.py,sha256=ShhaVc0IpShpy4Q2pfj3EfjhpjbffQutKsAq6ivNiys,8522
55
55
  chellow/e/bill_parsers/nonsettlement_dc_stark_xlsx.py,sha256=yogXTuQHGRL7IiqvRWr2C9V24ez1j9Yx0128UygPE_k,4723
56
- chellow/e/bill_parsers/settlement_dc_stark_xlsx.py,sha256=gKeYMdUO4bVycV8n1lWs5AIfF3bHZLkM6tkasD4rhHs,6239
56
+ chellow/e/bill_parsers/settlement_dc_stark_xlsx.py,sha256=PlEqCZuJ9DfQXeeYQ64jtf3ML7sUt_tt61QOOTnkE5c,6380
57
57
  chellow/e/bill_parsers/sse_edi.py,sha256=L85DOfNkqexeEIEr8pCBn_2sHJI-zEaw6cogpE3YyYM,15204
58
58
  chellow/e/bill_parsers/sww_xls.py,sha256=QEjiuvwvr5FuWCfqqVw8LaA_vZyAKsvRAS5fw3xtFhM,7533
59
59
  chellow/gas/bill_import.py,sha256=w0lPgK_Drzh8rtnEBQe3qFuxrgzZ6qQSgpaGrrGznMU,6549
@@ -364,6 +364,6 @@ chellow/templates/g/supply_note_edit.html,sha256=6UQf_qbhFDys3cVsTp-c7ABWZpggW9R
364
364
  chellow/templates/g/supply_notes.html,sha256=WR3YwGh_qqTklSJ7JqWX6BKBc9rk_jMff4RiWZiF2CM,936
365
365
  chellow/templates/g/unit.html,sha256=KouNVU0-i84afANkLQ_heJ0uDfJ9H5A05PuLqb8iCN8,438
366
366
  chellow/templates/g/units.html,sha256=p5Nd-lAIboKPEOO6N451hx1bcKxMg4BDODnZ-43MmJc,441
367
- chellow-1717489198.0.0.dist-info/METADATA,sha256=ot9Lf-fyAnN_scgT4ordJTmGiv3CDAIOUQz3lmqiV28,12205
368
- chellow-1717489198.0.0.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
369
- chellow-1717489198.0.0.dist-info/RECORD,,
367
+ chellow-1717768383.0.0.dist-info/METADATA,sha256=FSbmmHYytVZN9CdVIekLk3eUbkbT4a-3mLVR3ow7PFM,12205
368
+ chellow-1717768383.0.0.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
369
+ chellow-1717768383.0.0.dist-info/RECORD,,