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
|
@@ -7,9 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
{% block nav %}
|
|
9
9
|
<a href="/e/mop_contracts">MOP Contracts</a> »
|
|
10
|
-
<a href="/e/mop_contracts/{{batch.contract.id}}">{{batch.contract.name}}</a>
|
|
11
|
-
|
|
12
|
-
<a href="/e/mop_batches?mop_contract_id={{batch.contract.id}}">Batches</a> »
|
|
10
|
+
<a href="/e/mop_contracts/{{batch.contract.id}}">{{batch.contract.name}}</a> »
|
|
11
|
+
<a href="/e/mop_contracts/{{batch.contract.id}}/batches">Batches</a> »
|
|
13
12
|
<a href="/e/mop_batches/{{batch.id}}">{{batch.reference}}</a> »
|
|
14
13
|
Upload Bill File
|
|
15
14
|
{% endblock %}
|
|
@@ -31,8 +30,6 @@
|
|
|
31
30
|
</fieldset>
|
|
32
31
|
</form>
|
|
33
32
|
|
|
34
|
-
<br>
|
|
35
|
-
|
|
36
33
|
<table>
|
|
37
34
|
<caption>The '.csv' Format</caption>
|
|
38
35
|
<tbody>
|
|
@@ -49,6 +46,75 @@
|
|
|
49
46
|
<td>VAT</td>
|
|
50
47
|
<td>Gross</td>
|
|
51
48
|
<td>Breakdown</td>
|
|
49
|
+
<td>element</td>
|
|
50
|
+
<td>Name</td>
|
|
51
|
+
<td>Start Date (YYY-mm-dd HH:MM)</td>
|
|
52
|
+
<td>Finish Date (YYY-mm-dd HH:MM)</td>
|
|
53
|
+
<td>Net</td>
|
|
54
|
+
<td>Breakdown</td>
|
|
55
|
+
</tr>
|
|
56
|
+
</tbody>
|
|
57
|
+
</table>
|
|
58
|
+
|
|
59
|
+
<p>
|
|
60
|
+
The columns after 'element' can be repeated for each element, or can be left out
|
|
61
|
+
entirely if the bill doesn't have any elements associated with it. Here's an example:
|
|
62
|
+
</p>
|
|
63
|
+
|
|
64
|
+
<table>
|
|
65
|
+
<caption>Example CSV File</caption>
|
|
66
|
+
<tbody>
|
|
67
|
+
<tr>
|
|
68
|
+
<td>N</td>
|
|
69
|
+
<td>JJih988</td>
|
|
70
|
+
<td>22 7338 1192 184</td>
|
|
71
|
+
<td>jhl449</td>
|
|
72
|
+
<td>2025-07-13 03:26</td>
|
|
73
|
+
<td>2025-06-01 00:00</td>
|
|
74
|
+
<td>2025-06-30 23:30</td>
|
|
75
|
+
<td>288</td>
|
|
76
|
+
<td>13.76</td>
|
|
77
|
+
<td>1.56</td>
|
|
78
|
+
<td>15.82</td>
|
|
79
|
+
<td>{}</td>
|
|
80
|
+
<td>element</td>
|
|
81
|
+
<td>nrg</td>
|
|
82
|
+
<td>2025-06-01 00:00</td>
|
|
83
|
+
<td>2025-06-30 23:30</td>
|
|
84
|
+
<td>5.88</td>
|
|
85
|
+
<td>{"kwh": 55, 'rate': 0.05}</td>
|
|
86
|
+
<td>element</td>
|
|
87
|
+
<td>ccl</td>
|
|
88
|
+
<td>2025-06-01 00:00</td>
|
|
89
|
+
<td>2025-06-30 23:30</td>
|
|
90
|
+
<td>0.92</td>
|
|
91
|
+
<td>{"kwh": 55, 'rate': 0.075}</td>
|
|
92
|
+
</tr>
|
|
93
|
+
<tr>
|
|
94
|
+
<td>N</td>
|
|
95
|
+
<td>jhgjfj8i</td>
|
|
96
|
+
<td>22 9981 4881 118</td>
|
|
97
|
+
<td>khghl</td>
|
|
98
|
+
<td>2025-07-13 03:26</td>
|
|
99
|
+
<td>2025-06-01 00:00</td>
|
|
100
|
+
<td>2025-06-30 23:30</td>
|
|
101
|
+
<td>8892</td>
|
|
102
|
+
<td>885.71</td>
|
|
103
|
+
<td>32.87</td>
|
|
104
|
+
<td>15.82</td>
|
|
105
|
+
<td>{}</td>
|
|
106
|
+
<td>element</td>
|
|
107
|
+
<td>day</td>
|
|
108
|
+
<td>2025-06-01 00:00</td>
|
|
109
|
+
<td>2025-06-30 23:30</td>
|
|
110
|
+
<td>881.77</td>
|
|
111
|
+
<td>{"kwh": 81, 'rate': 0.12}</td>
|
|
112
|
+
<td>element</td>
|
|
113
|
+
<td>aahedc</td>
|
|
114
|
+
<td>2025-06-01 00:00</td>
|
|
115
|
+
<td>2025-06-30 23:30</td>
|
|
116
|
+
<td>88</td>
|
|
117
|
+
<td>{"kwh": 7754, 'rate': 0.0511}</td>
|
|
52
118
|
</tr>
|
|
53
119
|
</tbody>
|
|
54
120
|
</table>
|
|
@@ -7,12 +7,13 @@
|
|
|
7
7
|
{% block nav %}
|
|
8
8
|
<a href="/e/mop_contracts">MOP Contracts</a> »
|
|
9
9
|
<a href="/e/mop_contracts/{{contract.id}}">{{contract.name}}</a> »
|
|
10
|
-
Batches [<a href="/e/mop_contracts/{{contract.id}}/
|
|
10
|
+
Batches [<a href="/e/mop_contracts/{{contract.id}}/batches/edit">edit</a>]
|
|
11
11
|
{% endblock %}
|
|
12
12
|
|
|
13
13
|
{% block content %}
|
|
14
14
|
|
|
15
15
|
<table class="sticky">
|
|
16
|
+
<caption>Batches [<a href="/e/mop_contracts/{{contract.id}}/batches/add">add</a>]
|
|
16
17
|
<thead>
|
|
17
18
|
<tr>
|
|
18
19
|
<th>Reference</th>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{% extends "base.html" %}
|
|
2
|
+
|
|
3
|
+
{% block title %}
|
|
4
|
+
» MOP Contracts » {{contract.name}} » Batches
|
|
5
|
+
{% endblock %}
|
|
6
|
+
|
|
7
|
+
{% block nav %}
|
|
8
|
+
<a href="/e/mop_contracts">MOP Contracts</a> »
|
|
9
|
+
<a href="/e/mop_contracts/{{contract.id}}">{{contract.name}}</a> »
|
|
10
|
+
<a href="/e/mop_contracts/{{contract.id}}/batches">Batches</a> »
|
|
11
|
+
Edit
|
|
12
|
+
{% endblock %}
|
|
13
|
+
|
|
14
|
+
{% block content %}
|
|
15
|
+
<form hx-post="/e/mop_contracts/{{contract.id}}/batches/edit"
|
|
16
|
+
hx-confirm="Are you sure you want to delete all the bills then re-import bills from the files for all batches in the contract that have batch files?"
|
|
17
|
+
>
|
|
18
|
+
<fieldset>
|
|
19
|
+
<legend>
|
|
20
|
+
For All Batches With At Least One Batch File, Delete All The Bills And Then Re-import Rrom The
|
|
21
|
+
Files
|
|
22
|
+
</legend>
|
|
23
|
+
<button name="delete_import_bills">Re-Import Bills</button>
|
|
24
|
+
</fieldset>
|
|
25
|
+
</form>
|
|
26
|
+
{% endblock %}
|
|
@@ -7,20 +7,16 @@
|
|
|
7
7
|
|
|
8
8
|
{% block nav %}
|
|
9
9
|
<a href="/e/mop_contracts">MOP Contracts</a> »
|
|
10
|
-
<a
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<a href="/e/mop_batches?mop_contract_id={{bill.batch.contract.id}}">Batches</a>
|
|
14
|
-
»
|
|
15
|
-
<a href="/e/mop_batches/{{bill.batch.id}}">{{bill.batch.reference}}</a>
|
|
16
|
-
» {{bill.reference}}
|
|
10
|
+
<a href="/e/mop_contracts/{{bill.batch.contract.id}}">{{bill.batch.contract.name}}</a> »
|
|
11
|
+
<a href="/e/mop_contracts/{{bill.batch.contract.id}}/batches">Batches</a> »
|
|
12
|
+
<a href="/e/mop_batches/{{bill.batch.id}}">{{bill.batch.reference}}</a> » {{bill.reference}}
|
|
17
13
|
[<a href="/e/mop_bills/{{bill.id}}/edit">edit</a>]
|
|
18
14
|
{% endblock %}
|
|
19
15
|
|
|
20
16
|
{% block content %}
|
|
21
17
|
<table>
|
|
18
|
+
<caption>Bill</caption>
|
|
22
19
|
<thead>
|
|
23
|
-
<caption>Bill</caption>
|
|
24
20
|
<tr>
|
|
25
21
|
<th>Supply</th>
|
|
26
22
|
<th>Reference</th>
|
|
@@ -58,6 +54,33 @@
|
|
|
58
54
|
</tbody>
|
|
59
55
|
</table>
|
|
60
56
|
|
|
57
|
+
<table>
|
|
58
|
+
<caption>Elements [<a href="/e/mop_bills/{{bill.id}}/add_element">add</a>]</caption>
|
|
59
|
+
<thead>
|
|
60
|
+
<tr>
|
|
61
|
+
<th>Edit</th>
|
|
62
|
+
<th>Name</th>
|
|
63
|
+
<th>Start Date</th>
|
|
64
|
+
<th>Finish Date</th>
|
|
65
|
+
<th>Net GBP</th>
|
|
66
|
+
<th>Breakdown</th>
|
|
67
|
+
</tr>
|
|
68
|
+
</thead>
|
|
69
|
+
<tbody>
|
|
70
|
+
{% for element in elements %}
|
|
71
|
+
<tr>
|
|
72
|
+
<td>[<a href="/e/mop_elements/{{element.id}}/edit">edit</a>]</td>
|
|
73
|
+
<td>{{element.name}}</td>
|
|
74
|
+
<td>{{element.start_date|hh_format}}</td>
|
|
75
|
+
<td>{{element.finish_date|hh_format}}</td>
|
|
76
|
+
<td style="text-align: right">{{element.net}}</td>
|
|
77
|
+
<td>{{element.breakdown}}</td>
|
|
78
|
+
</tr>
|
|
79
|
+
{% endfor %}
|
|
80
|
+
</tbody>
|
|
81
|
+
</table>
|
|
82
|
+
|
|
83
|
+
|
|
61
84
|
<h2>Breakdown</h2>
|
|
62
85
|
|
|
63
86
|
<pre>{%- for line in raw_lines -%}
|
|
@@ -5,19 +5,10 @@
|
|
|
5
5
|
{{batch.reference}} » Add Bill
|
|
6
6
|
{% endblock %}
|
|
7
7
|
|
|
8
|
-
{% block inside_head %}
|
|
9
|
-
<style>
|
|
10
|
-
label {
|
|
11
|
-
width: 6em;
|
|
12
|
-
float: left;
|
|
13
|
-
}
|
|
14
|
-
</style>
|
|
15
|
-
{% endblock %}
|
|
16
|
-
|
|
17
8
|
{% block nav %}
|
|
18
9
|
<a href="/e/mop_contracts">MOP Contracts</a> »
|
|
19
10
|
<a href="/e/mop_contracts/{{batch.contract.id}}">{{batch.contract.name}}</a> »
|
|
20
|
-
<a href="/e/
|
|
11
|
+
<a href="/e/mop_contracts/{{batch.contract.id}}/batches">Batches</a> »
|
|
21
12
|
<a href="/e/mop_batches/{{batch.id}}">{{batch.reference}}</a>
|
|
22
13
|
» Add Bill
|
|
23
14
|
{% endblock %}
|
|
@@ -29,24 +20,13 @@
|
|
|
29
20
|
<legend>Add A Bill</legend>
|
|
30
21
|
<label>MPAN Core</label> {{input_text('mpan_core')}}
|
|
31
22
|
<label>Reference</label> {{input_text('reference')}}
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
</fieldset>
|
|
36
|
-
|
|
37
|
-
<fieldset>
|
|
38
|
-
<legend>Start Date</legend>
|
|
39
|
-
{{input_date('start')}}
|
|
40
|
-
</fieldset>
|
|
41
|
-
|
|
42
|
-
<fieldset>
|
|
43
|
-
<legend>Finish Date</legend>
|
|
44
|
-
{{input_date('finish')}}
|
|
45
|
-
</fieldset>
|
|
23
|
+
<label>Issue Date</label> {{input_date('issue')}}
|
|
24
|
+
<label>Start Date</label> {{input_date('start')}}
|
|
25
|
+
<label>Finish Date</label> {{input_date('finish')}}
|
|
46
26
|
<label>kWh</label> {{input_text('kwh', '0')}}
|
|
47
|
-
<label>Net</label> {{input_text('net', '0')}}
|
|
48
|
-
<label>VAT</label> {{input_text('vat', '0')}}
|
|
49
|
-
<label>Gross</label> {{input_text('gross', '0')}}
|
|
27
|
+
<label>Net</label> {{input_text('net', '0.00')}}
|
|
28
|
+
<label>VAT</label> {{input_text('vat', '0.00')}}
|
|
29
|
+
<label>Gross</label> {{input_text('gross', '0.00')}}
|
|
50
30
|
<label>Account</label> {{input_text('account', '0')}}
|
|
51
31
|
<label>Type</label>
|
|
52
32
|
<select name="bill_type_id">
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<a href="/e/mop_contracts">MOP Contracts</a> »
|
|
11
11
|
<a href="/e/mop_contracts/{{batch.contract.id}}">{{batch.contract.name}}</a>
|
|
12
12
|
»
|
|
13
|
-
<a href="/e/mop_batches
|
|
13
|
+
<a href="/e/mop_batches/{{batch.contract.id}}/batches">Batches</a> »
|
|
14
14
|
<a href="/e/mop_batches/{{batch.id}}">{{batch.reference}}</a> »
|
|
15
15
|
Import {{importer_id}}
|
|
16
16
|
{% endblock %}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
{% extends "base.html" %}
|
|
2
|
+
|
|
3
|
+
{% block title %}
|
|
4
|
+
» MOP Contracts » {{contract.name}} » Batches » {{importer_id}}
|
|
5
|
+
{% endblock %}
|
|
6
|
+
|
|
7
|
+
{% block nav %}
|
|
8
|
+
<a href="/e/mop_contracts">Supplier Contracts</a> »
|
|
9
|
+
<a href="/e/mop_contracts/{{contract.id}}">{{contract.name}}</a> »
|
|
10
|
+
<a href="/e/mop_contracts/{{contract.id}}/batches">Batches</a> »
|
|
11
|
+
{{importer_id}}
|
|
12
|
+
{% endblock %}
|
|
13
|
+
|
|
14
|
+
{% block content %}
|
|
15
|
+
<h2>Bill Import</h2>
|
|
16
|
+
|
|
17
|
+
{% if is_alive %}
|
|
18
|
+
<p>Still running. Refresh the page to see latest progress.</p>
|
|
19
|
+
{% endif %}
|
|
20
|
+
|
|
21
|
+
{% if status %}
|
|
22
|
+
<p>{{status}}</p>
|
|
23
|
+
{% endif %}
|
|
24
|
+
|
|
25
|
+
<ul>
|
|
26
|
+
{% for msg in log %}
|
|
27
|
+
<li>{{msg}}</li>
|
|
28
|
+
{% endfor %}
|
|
29
|
+
</ul>
|
|
30
|
+
|
|
31
|
+
{% if failed_bills|length > 0 %}
|
|
32
|
+
<table class="sticky">
|
|
33
|
+
<caption>Failed Bills</caption>
|
|
34
|
+
<thead>
|
|
35
|
+
<tr>
|
|
36
|
+
<th>Error</th>
|
|
37
|
+
<th>MPAN Core</th>
|
|
38
|
+
<th>Account</th>
|
|
39
|
+
<th>Reference</th>
|
|
40
|
+
<th>Bill Type Code</th>
|
|
41
|
+
<th>Issue Date</th>
|
|
42
|
+
<th>Start Date</th>
|
|
43
|
+
<th>Finish Date</th>
|
|
44
|
+
<th>kWh</th>
|
|
45
|
+
<th>Net</th>
|
|
46
|
+
<th>VAT</th>
|
|
47
|
+
<th>Gross</th>
|
|
48
|
+
<th>Breakdown</th>
|
|
49
|
+
</tr>
|
|
50
|
+
</thead>
|
|
51
|
+
<tbody>
|
|
52
|
+
{% for bill in failed_bills %}
|
|
53
|
+
<tr>
|
|
54
|
+
<td>{{bill.error}}</td>
|
|
55
|
+
<td>
|
|
56
|
+
<a href="/supplies?search_pattern={{bill.mpan_core}}"
|
|
57
|
+
>{{bill.mpan_core}}</a>
|
|
58
|
+
</td>
|
|
59
|
+
<td>{{bill.account}}</td>
|
|
60
|
+
<td>{{bill.reference}}</td>
|
|
61
|
+
<td>{{bill.bill_type_code}}</td>
|
|
62
|
+
<td>
|
|
63
|
+
{% if 'issue_date' in bill %}
|
|
64
|
+
{{bill.issue_date|hh_format}}
|
|
65
|
+
{% endif %}
|
|
66
|
+
</td>
|
|
67
|
+
<td>
|
|
68
|
+
{% if 'start_date' in bill %}
|
|
69
|
+
{{bill.start_date|hh_format}}
|
|
70
|
+
{% endif %}
|
|
71
|
+
</td>
|
|
72
|
+
<td>
|
|
73
|
+
{% if 'finish_date' in bill %}
|
|
74
|
+
{{bill.finish_date|hh_format}}</td>
|
|
75
|
+
{% endif %}
|
|
76
|
+
<td>{{bill.kwh}}</td>
|
|
77
|
+
<td>{{bill.net}}</td>
|
|
78
|
+
<td>{{bill.vat}}</td>
|
|
79
|
+
<td>{{bill.gross}}</td>
|
|
80
|
+
<td>
|
|
81
|
+
{% if 'breakdown' in bill %}
|
|
82
|
+
<pre>{{bill.breakdown|dumps}}</pre>
|
|
83
|
+
{% endif %}
|
|
84
|
+
</td>
|
|
85
|
+
</tr>
|
|
86
|
+
{% endfor %}
|
|
87
|
+
</tbody>
|
|
88
|
+
</table>
|
|
89
|
+
{% endif %}
|
|
90
|
+
|
|
91
|
+
{% if successful_bills|length > 0 %}
|
|
92
|
+
<table class="sticky">
|
|
93
|
+
<caption>Successful Bills</caption>
|
|
94
|
+
<thead>
|
|
95
|
+
<tr>
|
|
96
|
+
<th>Reference</th>
|
|
97
|
+
<th>Account</th>
|
|
98
|
+
<th>Bill Type</th>
|
|
99
|
+
<th>MPAN Core</th>
|
|
100
|
+
<th>Issue Date</th>
|
|
101
|
+
<th>Start Date</th>
|
|
102
|
+
<th>Finish Date</th>
|
|
103
|
+
<th>kWh</th>
|
|
104
|
+
<th>Net</th>
|
|
105
|
+
<th>VAT</th>
|
|
106
|
+
<th>Gross</th>
|
|
107
|
+
<th>Breakdown</th>
|
|
108
|
+
</tr>
|
|
109
|
+
</thead>
|
|
110
|
+
<tbody>
|
|
111
|
+
{% for bill in successful_bills %}
|
|
112
|
+
<tr>
|
|
113
|
+
<td>{{bill.reference}}</td>
|
|
114
|
+
<td>{{bill.account}}</td>
|
|
115
|
+
<td>{{bill.bill_type_code}}</td>
|
|
116
|
+
<td>{{bill.mpan_core}}</td>
|
|
117
|
+
<td>{{bill.issue_date|hh_format}}</td>
|
|
118
|
+
<td>{{bill.start_date|hh_format}}</td>
|
|
119
|
+
<td>{{bill.finish_date|hh_format}}</td>
|
|
120
|
+
<td>{{bill.kwh}}</td>
|
|
121
|
+
<td>{{bill.net}}</td>
|
|
122
|
+
<td>{{bill.vat}}</td>
|
|
123
|
+
<td>{{bill.gross}}</td>
|
|
124
|
+
<td><pre>{{bill.breakdown|dumps}}</pre></td>
|
|
125
|
+
</tr>
|
|
126
|
+
{% endfor %}
|
|
127
|
+
</tbody>
|
|
128
|
+
</table>
|
|
129
|
+
{% endif %}
|
|
130
|
+
{% endblock %}
|
|
@@ -62,17 +62,16 @@
|
|
|
62
62
|
<br>
|
|
63
63
|
<ul>
|
|
64
64
|
<li>
|
|
65
|
-
<a href="/e/
|
|
65
|
+
<a href="/e/mop_contracts/{{contract.id}}/batches">Batches</a>
|
|
66
66
|
</li>
|
|
67
67
|
</ul>
|
|
68
68
|
<br>
|
|
69
69
|
<form action="/reports/231">
|
|
70
70
|
<fieldset>
|
|
71
|
-
<input
|
|
72
|
-
type="hidden" name="mop_contract_id" value="{{contract.id}}">
|
|
71
|
+
<input type="hidden" name="mop_contract_id" value="{{contract.id}}">
|
|
73
72
|
|
|
74
|
-
From {{input_date('start', last_month_start)}}
|
|
75
|
-
{{input_date('finish', last_month_finish)}}
|
|
73
|
+
<label>From</label> {{input_date('start', last_month_start)}}
|
|
74
|
+
<label>To</label> {{input_date('finish', last_month_finish)}}
|
|
76
75
|
<input type="submit" value="Download"/>
|
|
77
76
|
</fieldset>
|
|
78
77
|
</form>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{% extends "base.html" %}
|
|
2
|
+
|
|
3
|
+
{% block title %}
|
|
4
|
+
» MOP Contracts » {{element.bill.batch.contract.name}} »
|
|
5
|
+
Batches » {{element.bill.batch.reference}} » {{element.bill.reference}} »
|
|
6
|
+
{{element.bill.reference}} » {{element.name}}
|
|
7
|
+
{% endblock %}
|
|
8
|
+
|
|
9
|
+
{% block nav %}
|
|
10
|
+
<a href="/e/mop_contracts">MOP Contracts</a> »
|
|
11
|
+
<a href="/e/mop_contracts/{{element.bill.batch.contract.id}}">{{element.bill.batch.contract.name}}</a>
|
|
12
|
+
»
|
|
13
|
+
<a href="/e/mop_contracts/{{element.bill.batch.contract.id}}/batches">Batches</a> »
|
|
14
|
+
<a href="/e/mop_batches/{{element.bill.batch.id}}">{{element.bill.batch.reference}}</a> »
|
|
15
|
+
<a href="/e/mop_bills/{{element.bill.id}}">{{element.bill.reference}}</a> »
|
|
16
|
+
{{element.name}}</a> » [<a href="/e/mop_elements/{{element.id}}/edit">edit</a>]
|
|
17
|
+
{% endblock %}
|
|
18
|
+
|
|
19
|
+
{% block content %}
|
|
20
|
+
<table>
|
|
21
|
+
<caption>Element</caption>
|
|
22
|
+
<thead>
|
|
23
|
+
<tr>
|
|
24
|
+
<th>Name</th>
|
|
25
|
+
<th>Start Date</th>
|
|
26
|
+
<th>Finish Date</th>
|
|
27
|
+
<th>Net GBP</th>
|
|
28
|
+
<th>Breakdown</th>
|
|
29
|
+
</tr>
|
|
30
|
+
</thead>
|
|
31
|
+
<tbody>
|
|
32
|
+
<tr>
|
|
33
|
+
<td>{{element.name}}</td>
|
|
34
|
+
<td>{{element.start_date|hh_format }}</td>
|
|
35
|
+
<td>{{element.finish_date|hh_format }}</td>
|
|
36
|
+
<td>{{element.net}}</td>
|
|
37
|
+
<td><pre>{{element.breakdown}}</pre></td>
|
|
38
|
+
</tr>
|
|
39
|
+
</tbody>
|
|
40
|
+
</table>
|
|
41
|
+
{% endblock %}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{% extends "base.html" %}
|
|
2
|
+
|
|
3
|
+
{% block title %}
|
|
4
|
+
» MOP Contracts » {{bill.batch.contract.name}} » Batches »
|
|
5
|
+
{{bill.batch.reference}} » {{bill.reference}} » Add Element
|
|
6
|
+
{% endblock %}
|
|
7
|
+
|
|
8
|
+
{% block nav %}
|
|
9
|
+
<a href="/e/mop_contracts">MOP Contracts</a> »
|
|
10
|
+
<a href="/e/mop_contracts/{{bill.batch.contract.id}}">{{bill.batch.contract.name}}</a> »
|
|
11
|
+
<a href="/e/mop_contract/{{bill.batch.contract.id}}/batches">Batches</a> »
|
|
12
|
+
<a href="/e/mop_batches/{{bill.batch.id}}">{{bill.batch.reference}}</a> »
|
|
13
|
+
<a href="/e/mop_bills/{{bill.id}}">{{bill.reference}}</a> »
|
|
14
|
+
Add Element
|
|
15
|
+
{% endblock %}
|
|
16
|
+
|
|
17
|
+
{% block content %}
|
|
18
|
+
<form action="/e/mop_bills/{{bill.id}}/add_element" method="post">
|
|
19
|
+
<fieldset>
|
|
20
|
+
<legend>Add An Element</legend>
|
|
21
|
+
|
|
22
|
+
<label>Name</label> {{input_text('name')}}
|
|
23
|
+
|
|
24
|
+
<label>Start Date</label> {{input_date('start', start_date)}}
|
|
25
|
+
|
|
26
|
+
<label>Finish Date</label> {{input_date('finish')}}
|
|
27
|
+
|
|
28
|
+
<label>Net GBP</label> {{input_text('net', '0.00')}}
|
|
29
|
+
|
|
30
|
+
<label>Breakdown</label>
|
|
31
|
+
{{input_textarea('breakdown', '{}', 10, 80, show_pos=True)}}
|
|
32
|
+
|
|
33
|
+
<input type="submit" value="Add">
|
|
34
|
+
</fieldset>
|
|
35
|
+
</form>
|
|
36
|
+
{% endblock %}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{% extends "base.html" %}
|
|
2
|
+
|
|
3
|
+
{% block title %}
|
|
4
|
+
» MOP Contracts » {{element.bill.batch.contract.name}} »
|
|
5
|
+
Batches » {{element.bill.batch.reference}} » Bills »
|
|
6
|
+
{{element.bill.reference}} » {{element.name}} » Edit
|
|
7
|
+
{% endblock %}
|
|
8
|
+
|
|
9
|
+
{% block nav %}
|
|
10
|
+
<a href="/e/mop_contracts">MOP Contracts</a> »
|
|
11
|
+
<a href="/e/mop_contracts/{{element.bill.batch.contract.id}}">{{element.bill.batch.contract.name}}</a>
|
|
12
|
+
»
|
|
13
|
+
<a href="/e/mop_contracts/{{element.bill.batch.contract.id}}/batches">Batches</a> »
|
|
14
|
+
<a href="/e/mop_batches/{{element.bill.batch.id}}">{{element.bill.batch.reference}}</a> »
|
|
15
|
+
<a href="/e/mop_bills/{{element.bill.id}}">{{element.bill.reference}}</a> »
|
|
16
|
+
<a href="/e/mop_elements/{{element.id}}">{{element.name}}</a> »
|
|
17
|
+
Edit
|
|
18
|
+
{% endblock %}
|
|
19
|
+
|
|
20
|
+
{% block content %}
|
|
21
|
+
|
|
22
|
+
<form method="post" action="/e/mop_elements/{{element.id}}/edit">
|
|
23
|
+
<fieldset>
|
|
24
|
+
<legend>Update This Element</legend>
|
|
25
|
+
<label>Name</label> {{input_text('name', element.name)}}
|
|
26
|
+
<label>Start Date</label> {{input_date('start', element.start_date)}}
|
|
27
|
+
<label>Finish Date</label> {{input_date('finish', element.finish_date)}}
|
|
28
|
+
<label>Net GBP</label> {{input_text('net', element.net)}}
|
|
29
|
+
<label>Breakdown</label>
|
|
30
|
+
{{input_textarea('breakdown', element.breakdown, 10, 80, show_pos=True)}}
|
|
31
|
+
<input type="submit" name="update" value="Update">
|
|
32
|
+
</fieldset>
|
|
33
|
+
</form>
|
|
34
|
+
|
|
35
|
+
<h3>Example Breakdown</h3>
|
|
36
|
+
|
|
37
|
+
<pre>{
|
|
38
|
+
"nrg-kwh": 1000,
|
|
39
|
+
"nrg-rate": 0.1,
|
|
40
|
+
}</pre>
|
|
41
|
+
|
|
42
|
+
<form hx-delete="/e/mop_elements/{{element.id}}/edit"
|
|
43
|
+
hx-confirm="Are you sure you want to delete this element?">
|
|
44
|
+
<fieldset>
|
|
45
|
+
<legend>Delete This Element</legend>
|
|
46
|
+
<input type="submit" name="confirm_delete" value="Delete">
|
|
47
|
+
</fieldset>
|
|
48
|
+
</form>
|
|
49
|
+
{% endblock %}
|
|
@@ -7,13 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
{% block nav %}
|
|
9
9
|
<a href="/e/supplier_contracts">Supplier Contracts</a> »
|
|
10
|
-
<a href="/e/supplier_contracts/{{batch.contract.id}}"
|
|
11
|
-
|
|
12
|
-
<a
|
|
13
|
-
href="/e/supplier_batches?supplier_contract_id={{batch.contract.id}}"
|
|
14
|
-
>Batches</a> »
|
|
15
|
-
{{batch.reference}}
|
|
16
|
-
[<a href="/e/supplier_batches/{{batch.id}}/edit">edit</a>]
|
|
10
|
+
<a href="/e/supplier_contracts/{{batch.contract.id}}" >{{batch.contract.name}}</a> »
|
|
11
|
+
<a href="/e/supplier_contracts/{{batch.contract.id}}/batches" >Batches</a> »
|
|
12
|
+
{{batch.reference}} [<a href="/e/supplier_batches/{{batch.id}}/edit">edit</a>]
|
|
17
13
|
{% endblock %}
|
|
18
14
|
|
|
19
15
|
{% block content %}
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
{% block nav %}
|
|
17
17
|
<a href="/e/supplier_contracts">Supplier Contracts</a> »
|
|
18
18
|
<a href="/e/supplier_contracts/{{contract.id}}">{{contract.name}}</a> »
|
|
19
|
-
<a href="/e/
|
|
19
|
+
<a href="/e/supplier_contracts/{{contract.id}}/batches">Batches</a> »
|
|
20
20
|
Add
|
|
21
21
|
{% endblock %}
|
|
22
22
|
|
|
23
23
|
{% block content %}
|
|
24
|
-
<form action="/e/supplier_contracts/{{contract.id}}/
|
|
24
|
+
<form action="/e/supplier_contracts/{{contract.id}}/batches/add" method="post">
|
|
25
25
|
<fieldset>
|
|
26
26
|
<legend>Add a batch</legend>
|
|
27
27
|
<label>Reference</label>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
{% block content %}
|
|
19
19
|
|
|
20
|
-
<form action="/e/supplier_batches/{{batch.id}}/edit" method="post">
|
|
20
|
+
<form action="/e/supplier_batches/{{batch.id}}/edit" method="post">
|
|
21
21
|
<fieldset>
|
|
22
22
|
<legend>Update batch</legend>
|
|
23
23
|
<label>Reference</label> {{input_text('reference', batch.reference)}}
|
|
@@ -9,12 +9,10 @@
|
|
|
9
9
|
<a href="/e/supplier_contracts">Supplier Contracts</a> »
|
|
10
10
|
<a href="/e/supplier_contracts/{{batch_file.batch.contract.id}}"
|
|
11
11
|
>{{batch_file.batch.contract.name}}</a> »
|
|
12
|
-
<a href="/e/
|
|
12
|
+
<a href="/e/supplier_contracts/{{batch_file.batch.contract.id}}/batches"
|
|
13
13
|
>Batches</a> »
|
|
14
|
-
<a href="/e/supplier_batches/{{batch_file.batch.id}}"
|
|
15
|
-
|
|
16
|
-
{{batch_file.filename}}
|
|
17
|
-
[<a href="/e/supplier_batch_files/{{batch_file.id}}/edit">edit</a>]
|
|
14
|
+
<a href="/e/supplier_batches/{{batch_file.batch.id}}">{{batch_file.batch.reference}}</a> »
|
|
15
|
+
{{batch_file.filename}} [<a href="/e/supplier_batch_files/{{batch_file.id}}/edit">edit</a>]
|
|
18
16
|
{% endblock %}
|
|
19
17
|
|
|
20
18
|
{% block content %}
|
|
@@ -51,17 +51,24 @@
|
|
|
51
51
|
<td>VAT</td>
|
|
52
52
|
<td>Gross</td>
|
|
53
53
|
<td>Breakdown</td>
|
|
54
|
-
<td>
|
|
55
|
-
<td>
|
|
56
|
-
<td>
|
|
57
|
-
<td>
|
|
58
|
-
<td>
|
|
59
|
-
<td>
|
|
60
|
-
<td>
|
|
61
|
-
<td>
|
|
62
|
-
<td>
|
|
63
|
-
<td>
|
|
64
|
-
<td>
|
|
54
|
+
<td>Following Type (Read or Eelement)</td>
|
|
55
|
+
<td>Read Serial Number</td>
|
|
56
|
+
<td>Read MPAN</td>
|
|
57
|
+
<td>Read Coefficient</td>
|
|
58
|
+
<td>Read Units (kWh, kW, kVA or kVArh)</td>
|
|
59
|
+
<td>Read TPR (Blank if kW or kVA)</td>
|
|
60
|
+
<td>Read Previous Read Date</td>
|
|
61
|
+
<td>Read Previous Read Value</td>
|
|
62
|
+
<td>Read Previous Read Type</td>
|
|
63
|
+
<td>Read Present Read Date</td>
|
|
64
|
+
<td>Read Present Read Value</td>
|
|
65
|
+
<td>Read Present Read Type</td>
|
|
66
|
+
<td>Following Type (Read or Element)</td>
|
|
67
|
+
<td>Element Name</td>
|
|
68
|
+
<td>Element Start Date (YYYY-mm-dd HH:MM)</td>
|
|
69
|
+
<td>Element Finish Date (YYYY-mm-dd HH:MM)</td>
|
|
70
|
+
<td>Element Net GBP</td>
|
|
71
|
+
<td>Element Breakdown</td>
|
|
65
72
|
</tr>
|
|
66
73
|
</tbody>
|
|
67
74
|
</table>
|