chellow 1757320031.0.0__py3-none-any.whl → 1759411815.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/bill_importer.py +136 -80
- chellow/e/bill_parsers/activity_mop_stark_xlsx.py +99 -86
- chellow/e/bill_parsers/annual_mop_stark_xlsx.py +78 -61
- chellow/e/bill_parsers/csv.py +139 -101
- chellow/e/bill_parsers/drax_edi.py +65 -89
- chellow/e/bill_parsers/engie_edi.py +187 -255
- chellow/e/bill_parsers/engie_xls.py +153 -167
- chellow/e/bill_parsers/haven_edi.py +189 -228
- chellow/e/bill_parsers/haven_edi_tprs.py +67 -67
- chellow/e/bill_parsers/nonsettlement_dc_stark_xlsx.py +75 -66
- chellow/e/bill_parsers/settlement_dc_stark_xlsx.py +229 -126
- chellow/e/bill_parsers/sse_edi.py +107 -75
- chellow/e/bill_parsers/sww_xls.py +78 -91
- chellow/e/computer.py +1 -1
- chellow/e/views.py +626 -281
- chellow/edi_lib.py +4 -27
- chellow/models.py +92 -3
- chellow/reports/report_111.py +514 -616
- chellow/reports/report_247.py +96 -137
- chellow/templates/e/dc_batch.html +110 -157
- chellow/templates/e/dc_batch_add.html +2 -3
- chellow/templates/e/dc_batch_edit.html +42 -46
- chellow/templates/e/dc_batch_file.html +2 -3
- chellow/templates/e/dc_batch_file_edit.html +28 -40
- chellow/templates/e/dc_batch_upload_file.html +68 -0
- chellow/templates/e/dc_batches.html +2 -1
- chellow/templates/e/dc_batches_edit.html +26 -0
- chellow/templates/e/dc_bill.html +27 -5
- chellow/templates/e/dc_bill_add.html +4 -4
- chellow/templates/e/dc_bill_edit.html +43 -63
- chellow/templates/e/dc_bill_import.html +1 -1
- chellow/templates/e/dc_bill_import_contract.html +130 -0
- chellow/templates/e/dc_contract.html +1 -1
- chellow/templates/e/dc_element.html +41 -0
- chellow/templates/e/dc_element_add.html +36 -0
- chellow/templates/e/dc_element_edit.html +49 -0
- chellow/templates/e/dc_rate_script_edit.html +27 -43
- chellow/templates/e/mop_batch.html +105 -152
- chellow/templates/e/mop_batch_add.html +2 -3
- chellow/templates/e/mop_batch_edit.html +43 -51
- chellow/templates/e/mop_batch_upload_file.html +71 -5
- chellow/templates/e/mop_batches.html +2 -1
- chellow/templates/e/mop_batches_edit.html +26 -0
- chellow/templates/e/mop_bill.html +31 -8
- chellow/templates/e/mop_bill_add.html +7 -27
- chellow/templates/e/mop_bill_import.html +1 -1
- chellow/templates/e/mop_bill_import_contract.html +130 -0
- chellow/templates/e/mop_contract.html +4 -5
- chellow/templates/e/mop_element.html +41 -0
- chellow/templates/e/mop_element_add.html +36 -0
- chellow/templates/e/mop_element_edit.html +49 -0
- chellow/templates/e/supplier_batch.html +3 -7
- chellow/templates/e/supplier_batch_add.html +2 -2
- chellow/templates/e/supplier_batch_edit.html +1 -1
- chellow/templates/e/supplier_batch_file.html +3 -5
- chellow/templates/e/supplier_batch_file_add.html +18 -11
- chellow/templates/e/supplier_batch_upload_file.html +83 -9
- chellow/templates/e/supplier_batches.html +4 -4
- chellow/templates/e/supplier_batches_edit.html +26 -0
- chellow/templates/e/supplier_bill.html +29 -6
- chellow/templates/e/supplier_bill_add.html +3 -3
- chellow/templates/e/supplier_bill_import.html +1 -1
- chellow/templates/e/supplier_bill_import_contract.html +118 -0
- chellow/templates/e/supplier_contract.html +1 -1
- chellow/templates/e/supplier_element.html +45 -0
- chellow/templates/e/supplier_element_add.html +36 -0
- chellow/templates/e/supplier_element_edit.html +51 -0
- chellow/templates/report_run_bill_check.html +137 -179
- chellow/templates/report_run_row_bill_check.html +187 -179
- chellow/views.py +57 -64
- {chellow-1757320031.0.0.dist-info → chellow-1759411815.0.0.dist-info}/METADATA +2 -2
- {chellow-1757320031.0.0.dist-info → chellow-1759411815.0.0.dist-info}/RECORD +73 -60
- chellow/e/bill_parsers/drax_element_edi.py +0 -459
- chellow/templates/e/supplier_bill_imports.html +0 -421
- {chellow-1757320031.0.0.dist-info → chellow-1759411815.0.0.dist-info}/WHEEL +0 -0
|
@@ -9,191 +9,149 @@
|
|
|
9
9
|
{% endblock %}
|
|
10
10
|
|
|
11
11
|
{% block content %}
|
|
12
|
-
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
12
|
+
<table>
|
|
13
|
+
<caption>Bill Check</caption>
|
|
14
|
+
<thead>
|
|
15
|
+
<tr>
|
|
16
|
+
<th>Date Created</th>
|
|
17
|
+
<th>Created By</th>
|
|
18
|
+
<th>Title</th>
|
|
19
|
+
<th>State</th>
|
|
20
|
+
<th>Number Of Rows</th>
|
|
21
|
+
<th>Delete</th>
|
|
22
|
+
<th>Download Spreadsheet</th>
|
|
23
|
+
</tr>
|
|
24
|
+
</thead>
|
|
25
|
+
<tbody>
|
|
26
|
+
<tr>
|
|
27
|
+
<td>{{run.date_created|hh_format}}</td>
|
|
28
|
+
<td>{{run.creator}}</td>
|
|
29
|
+
<td>{{run.title}}</td>
|
|
30
|
+
<td>{{run.state}}</td>
|
|
31
|
+
<td>{{rows|length}} (truncated at {{ROW_LIMIT}})</td>
|
|
32
|
+
<td>
|
|
33
|
+
<form hx-delete="/report_runs/{{run.id}}"
|
|
34
|
+
hx-confirm="Are you sure you want to delete this report run?">
|
|
35
|
+
<fieldset style="border: none;">
|
|
36
|
+
<input type="submit" name="delete" value="Delete">
|
|
37
|
+
</fieldset>
|
|
38
|
+
</form>
|
|
39
|
+
</td>
|
|
40
|
+
<td><a href="/report_runs/{{run.id}}/spreadsheet">Download</a></td>
|
|
41
|
+
</tr>
|
|
42
|
+
</tbody>
|
|
43
|
+
</table>
|
|
44
|
+
|
|
45
|
+
<table class="sticky">
|
|
46
|
+
<caption>Periods - Ordered By Difference In {{element}}</caption>
|
|
47
|
+
<thead>
|
|
48
|
+
<tr>
|
|
49
|
+
<th rowspan="3">View</th>
|
|
50
|
+
<th rowspan="3">Contract</th>
|
|
51
|
+
<th rowspan="3">Supply</th>
|
|
52
|
+
<th rowspan="3">Import MPAN Core</th>
|
|
53
|
+
<th rowspan="3">Export MPAN Core</th>
|
|
54
|
+
<th rowspan="3">Site</th>
|
|
55
|
+
<th rowspan="3">Period Start</th>
|
|
56
|
+
<th rowspan="3">Period Finish</th>
|
|
57
|
+
<th rowspan="3" style="white-space: nowrap">
|
|
58
|
+
{% if element == 'problem' %}
|
|
59
|
+
↑
|
|
60
|
+
{% else %}
|
|
61
|
+
<a href="/report_runs/{{run.id}}?element=problem">↑</a>
|
|
62
|
+
{% endif %}
|
|
63
|
+
Problem
|
|
64
|
+
</th>
|
|
65
|
+
<th colspan="{{elements|length + 1}}">Difference GBP</th>
|
|
66
|
+
</tr>
|
|
67
|
+
<tr>
|
|
68
|
+
<th>
|
|
69
|
+
{% if 'sum_difference' in summary and summary.sum_difference is not none %}
|
|
70
|
+
{{"{:0,.2f}".format(summary.sum_difference)}}
|
|
71
|
+
{% endif %}
|
|
72
|
+
</th>
|
|
73
|
+
{% for elem, diff in elements %}
|
|
74
|
+
<th style="white-space: nowrap">
|
|
75
|
+
{{"{:0,.2f}".format(diff)}}
|
|
76
|
+
</th>
|
|
77
|
+
{% endfor %}
|
|
78
|
+
</tr>
|
|
79
|
+
<tr>
|
|
80
|
+
<th style="white-space: nowrap">
|
|
81
|
+
{% if element == 'net' %}
|
|
82
|
+
↑
|
|
83
|
+
{% else %}
|
|
84
|
+
<a href="/report_runs/{{run.id}}?element=net">↑</a>
|
|
85
|
+
{% endif %}
|
|
86
|
+
Total
|
|
87
|
+
</th>
|
|
88
|
+
{% for elem, diff in elements %}
|
|
89
|
+
<th style="white-space: nowrap">
|
|
90
|
+
{% if elem == element %}
|
|
91
|
+
↑
|
|
92
|
+
{% else %}
|
|
93
|
+
<a href="/report_runs/{{run.id}}?element={{elem}}">↑</a>
|
|
94
|
+
{% endif %}
|
|
95
|
+
{{elem}}
|
|
96
|
+
</th>
|
|
97
|
+
{% endfor %}
|
|
98
|
+
</tr>
|
|
99
|
+
</thead>
|
|
100
|
+
<tbody>
|
|
101
|
+
{% for row in rows %}
|
|
102
|
+
{% set data = row.data['data'] %}
|
|
103
|
+
{% set properties = row.data.get('properties', {}) %}
|
|
104
|
+
{% set market_role_code = data['market_role_code'] %}
|
|
36
105
|
<tr>
|
|
37
|
-
<td
|
|
38
|
-
<td>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
{%
|
|
44
|
-
{{"
|
|
106
|
+
<td><a href="/report_run_rows/{{row.id}}">View</a></td>
|
|
107
|
+
<td style="white-space: nowrap">
|
|
108
|
+
{% if market_role_code == 'X' %}
|
|
109
|
+
<a href="/e/supplier_contracts/{{data['contract_id']}}">{{data['contract_name']}}</a>
|
|
110
|
+
{% elif market_role_code == 'C' %}
|
|
111
|
+
<a href="/e/dc_contracts/{{data['contract_id']}}">{{data['contract_name']}}</a>
|
|
112
|
+
{% elif market_role_code == 'M' %}
|
|
113
|
+
<a href="/e/mop_contracts/{{data['contract_id']}}">{{data['contract_name']}}</a>
|
|
45
114
|
{% endif %}
|
|
115
|
+
</td>
|
|
46
116
|
<td>
|
|
47
|
-
<
|
|
48
|
-
<fieldset style="border: none;">
|
|
49
|
-
<input type="submit" name="delete" value="Delete">
|
|
50
|
-
</fieldset>
|
|
51
|
-
</form>
|
|
117
|
+
<a href="/e/supplies/{{data['supply_id']}}">View</a>
|
|
52
118
|
</td>
|
|
53
|
-
<td
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
</table>
|
|
85
|
-
{% endif %}
|
|
86
|
-
|
|
87
|
-
<table class="sticky">
|
|
88
|
-
<caption>Elements</caption>
|
|
89
|
-
<thead>
|
|
90
|
-
<tr>
|
|
91
|
-
<th>Element</th>
|
|
92
|
-
{% for elname, diff in elements %}
|
|
93
|
-
<th>{{elname}}</th>
|
|
94
|
-
{% endfor %}
|
|
95
|
-
</tr>
|
|
96
|
-
</thead>
|
|
97
|
-
<tbody>
|
|
98
|
-
<tr>
|
|
99
|
-
<td>Sum of differences (GBP)</td>
|
|
100
|
-
{% for elname, diff in elements %}
|
|
101
|
-
<td>{{"%.2f"|format(diff)}}</td>
|
|
102
|
-
{% endfor %}
|
|
103
|
-
</tr>
|
|
104
|
-
<tr>
|
|
105
|
-
<td rowspan="2">Order rows</td>
|
|
106
|
-
{% for elname, diff in elements %}
|
|
107
|
-
<td>
|
|
108
|
-
{% if elname == element and not hide_checked %}
|
|
109
|
-
Order (show checked)
|
|
110
|
-
{% else %}
|
|
111
|
-
<a href="/report_runs/{{run.id}}?element={{elname}}&hide_checked=false"
|
|
112
|
-
>Order (show checked)</a>
|
|
113
|
-
{% endif %}
|
|
114
|
-
</td>
|
|
115
|
-
{% endfor %}
|
|
116
|
-
</tr>
|
|
117
|
-
<tr>
|
|
118
|
-
{% for elname, diff in elements %}
|
|
119
|
-
<td>
|
|
120
|
-
{% if elname == element and hide_checked %}
|
|
121
|
-
Order (hide checked)
|
|
122
|
-
{% else %}
|
|
123
|
-
<a href="/report_runs/{{run.id}}?element={{elname}}&hide_checked=true"
|
|
124
|
-
>Order (hide checked)</a>
|
|
119
|
+
<td style="white-space: nowrap">
|
|
120
|
+
{% if data['imp_mpan_core'] is not none %}
|
|
121
|
+
{{data['imp_mpan_core']}}
|
|
122
|
+
{% endif %}
|
|
123
|
+
</td>
|
|
124
|
+
<td style="white-space: nowrap">
|
|
125
|
+
{% if data['exp_mpan_core'] is not none %}
|
|
126
|
+
{{data['exp_mpan_core']}}
|
|
127
|
+
{% endif %}
|
|
128
|
+
</td>
|
|
129
|
+
<td style="white-space: nowrap">
|
|
130
|
+
{% if data['site_id'] is not none %}
|
|
131
|
+
<a href="/sites/{{data['site_id']}}" title="{{data.site_name}}">{{data.site_code}}</a>
|
|
132
|
+
{% endif %}
|
|
133
|
+
</td>
|
|
134
|
+
<td style="white-space: nowrap">
|
|
135
|
+
{{data['period_start']}}
|
|
136
|
+
</td>
|
|
137
|
+
<td style="white-space: nowrap">
|
|
138
|
+
{{data['period_finish']}}
|
|
139
|
+
</td>
|
|
140
|
+
<td style="text-align: right;">
|
|
141
|
+
{{data['problem']}}
|
|
142
|
+
</td>
|
|
143
|
+
<td style="text-align: right;">
|
|
144
|
+
{{"{:0,.2f}".format(data['difference_net_gbp'])}}
|
|
145
|
+
</td>
|
|
146
|
+
{% for elem, diff in elements %}
|
|
147
|
+
<td style="text-align: right;">
|
|
148
|
+
{% if elem in data.elements %}
|
|
149
|
+
{{"{:0,.2f}".format(data.elements[elem]['parts']['gbp']['difference'])}}
|
|
125
150
|
{% endif %}
|
|
126
151
|
</td>
|
|
127
152
|
{% endfor %}
|
|
128
153
|
</tr>
|
|
129
|
-
|
|
130
|
-
</
|
|
131
|
-
|
|
132
|
-
<table class="etheling etheling_sticky">
|
|
133
|
-
<caption>Rows - Ordered By Difference In {{element}}</caption>
|
|
134
|
-
{% set titles = [
|
|
135
|
-
'batch', 'bill-reference', 'imp-mpan-core',
|
|
136
|
-
'exp-mpan-core', 'site-code', 'site-name',
|
|
137
|
-
'covered-from', 'covered-to'
|
|
138
|
-
]
|
|
139
|
-
%}
|
|
140
|
-
<thead>
|
|
141
|
-
<tr>
|
|
142
|
-
<th rowspan="2">View</th>
|
|
143
|
-
{% for title in titles %}
|
|
144
|
-
<th rowspan="2">{{title}}</th>
|
|
145
|
-
{% endfor %}
|
|
146
|
-
<th colspan="{{elements|length}}">Difference GBP</th>
|
|
147
|
-
<th rowspan="2">Note</th>
|
|
148
|
-
</tr>
|
|
149
|
-
<tr>
|
|
150
|
-
{% for elem, diff in elements %}
|
|
151
|
-
<th>{{elem}}</th>
|
|
152
|
-
{% endfor %}
|
|
153
|
-
</tr>
|
|
154
|
-
</thead>
|
|
155
|
-
<tbody>
|
|
156
|
-
{% for row in rows %}
|
|
157
|
-
{% set values = row.data['values'] %}
|
|
158
|
-
{% set properties = row.data.get('properties', {}) %}
|
|
159
|
-
<tr>
|
|
160
|
-
<td><a href="/report_run_rows/{{row.id}}">View</a></td>
|
|
161
|
-
{% for title in titles %}
|
|
162
|
-
<td>
|
|
163
|
-
{%
|
|
164
|
-
if title == 'covered-bills' and
|
|
165
|
-
values['covered-bills'] != None
|
|
166
|
-
%}
|
|
167
|
-
<ul>
|
|
168
|
-
{% for bill_id in values['covered-bills'] %}
|
|
169
|
-
<li>
|
|
170
|
-
<a href="/e/supplier_bills/{{bill_id}}"
|
|
171
|
-
>{{bill_id}}</a>
|
|
172
|
-
{% if bill_id == values.bill_id %}
|
|
173
|
-
(This bill)
|
|
174
|
-
{% endif %}
|
|
175
|
-
</li>
|
|
176
|
-
{% endfor %}
|
|
177
|
-
</ul>
|
|
178
|
-
{% elif values[title] is not none %}
|
|
179
|
-
{{values[title]}}
|
|
180
|
-
{% endif %}
|
|
181
|
-
</td>
|
|
182
|
-
{% endfor %}
|
|
183
|
-
{% for elem, diff in elements %}
|
|
184
|
-
{% set title = 'difference-' + elem + '-gbp' %}
|
|
185
|
-
<td>
|
|
186
|
-
{% if title in values %}
|
|
187
|
-
{{"%.2f"|format(values[title])}}
|
|
188
|
-
{% endif %}
|
|
189
|
-
</td>
|
|
190
|
-
{% endfor %}
|
|
191
|
-
<td>
|
|
192
|
-
{{ properties.get('note', '') }}
|
|
193
|
-
</td>
|
|
194
|
-
</tr>
|
|
195
|
-
{% endfor %}
|
|
196
|
-
</tbody>
|
|
197
|
-
</table>
|
|
198
|
-
{% endif %}
|
|
154
|
+
{% endfor %}
|
|
155
|
+
</tbody>
|
|
156
|
+
</table>
|
|
199
157
|
{% endblock %}
|