chellow 1755614564.0.0__py3-none-any.whl → 1759155233.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 -88
- 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 +478 -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 +182 -179
- chellow/views.py +55 -65
- {chellow-1755614564.0.0.dist-info → chellow-1759155233.0.0.dist-info}/METADATA +2 -2
- {chellow-1755614564.0.0.dist-info → chellow-1759155233.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-1755614564.0.0.dist-info → chellow-1759155233.0.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{% extends "base.html" %}
|
|
2
|
+
|
|
3
|
+
{% block title %}
|
|
4
|
+
» DC 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/dc_contracts">DC Contracts</a> »
|
|
11
|
+
<a href="/e/dc_contracts/{{element.bill.batch.contract.id}}">{{element.bill.batch.contract.name}}</a>
|
|
12
|
+
»
|
|
13
|
+
<a href="/e/dc_contracts/{{element.bill.batch.contract.id}}/batches">Batches</a> »
|
|
14
|
+
<a href="/e/dc_batches/{{element.bill.batch.id}}">{{element.bill.batch.reference}}</a> »
|
|
15
|
+
<a href="/e/dc_bills/{{element.bill.id}}">{{element.bill.reference}}</a> »
|
|
16
|
+
{{element.name}}</a> » [<a href="/e/dc_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
|
+
» DC Contracts » {{bill.batch.contract.name}} » Batches »
|
|
5
|
+
{{bill.batch.reference}} » {{bill.reference}} » Add Element
|
|
6
|
+
{% endblock %}
|
|
7
|
+
|
|
8
|
+
{% block nav %}
|
|
9
|
+
<a href="/e/dc_contracts">DC Contracts</a> »
|
|
10
|
+
<a href="/e/dc_contracts/{{bill.batch.contract.id}}">{{bill.batch.contract.name}}</a> »
|
|
11
|
+
<a href="/e/dc_contract/{{bill.batch.contract.id}}/batches">Batches</a> »
|
|
12
|
+
<a href="/e/dc_batches/{{bill.batch.id}}">{{bill.batch.reference}}</a> »
|
|
13
|
+
<a href="/e/dc_bills/{{bill.id}}">{{bill.reference}}</a> »
|
|
14
|
+
Add Element
|
|
15
|
+
{% endblock %}
|
|
16
|
+
|
|
17
|
+
{% block content %}
|
|
18
|
+
<form action="/e/dc_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
|
+
» DC 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/dc_contracts">DC Contracts</a> »
|
|
11
|
+
<a href="/e/dc_contracts/{{element.bill.batch.contract.id}}">{{element.bill.batch.contract.name}}</a>
|
|
12
|
+
»
|
|
13
|
+
<a href="/e/dc_contracts/{{element.bill.batch.contract.id}}/batches">Batches</a> »
|
|
14
|
+
<a href="/e/dc_batches/{{element.bill.batch.id}}">{{element.bill.batch.reference}}</a> »
|
|
15
|
+
<a href="/e/dc_bills/{{element.bill.id}}">{{element.bill.reference}}</a> »
|
|
16
|
+
<a href="/e/dc_elements/{{element.id}}">{{element.name}}</a> »
|
|
17
|
+
Edit
|
|
18
|
+
{% endblock %}
|
|
19
|
+
|
|
20
|
+
{% block content %}
|
|
21
|
+
|
|
22
|
+
<form method="post" action="/e/dc_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/dc_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 %}
|
|
@@ -16,51 +16,35 @@
|
|
|
16
16
|
|
|
17
17
|
{% block content %}
|
|
18
18
|
|
|
19
|
-
{
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
<form action="/e/dc_rate_scripts/{{dc_rate_script.id}}/edit" method="post">
|
|
20
|
+
<fieldset>
|
|
21
|
+
<legend>Update Rate Script</legend>
|
|
22
|
+
<label>Start date</label> {{ input_date('start', dc_rate_script.start_date) }}
|
|
22
23
|
<fieldset>
|
|
23
|
-
<legend>
|
|
24
|
-
<
|
|
25
|
-
|
|
24
|
+
<legend>Finish date</legend>
|
|
25
|
+
<label>Ended?</label>
|
|
26
|
+
{{input_checkbox('has_finished', dc_rate_script.finish_date != None)}}
|
|
27
|
+
</label>
|
|
28
|
+
{{ input_date('finish', dc_rate_script.finish_date) }}
|
|
26
29
|
</fieldset>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<fieldset>
|
|
39
|
-
<legend>Finish date</legend>
|
|
40
|
-
<label>Ended?</label>
|
|
41
|
-
{{input_checkbox('has_finished', dc_rate_script.finish_date != None)}}
|
|
42
|
-
</label>
|
|
43
|
-
{{ input_date('finish', dc_rate_script.finish_date) }}
|
|
44
|
-
</fieldset>
|
|
45
|
-
<label>Script</label>
|
|
46
|
-
{{ input_textarea('script', dc_rate_script.script, 40, 80, show_pos=True) }}
|
|
47
|
-
<input type="submit" value="Update">
|
|
48
|
-
<input type="reset" value="Reset">
|
|
49
|
-
</fieldset>
|
|
50
|
-
</form>
|
|
51
|
-
|
|
52
|
-
{% if rate_script_example %}
|
|
53
|
-
<h4>Example</h4>
|
|
54
|
-
<pre>{{rate_script_example}}</pre>
|
|
55
|
-
{% endif %}
|
|
30
|
+
<label>Script</label>
|
|
31
|
+
{{ input_textarea('script', dc_rate_script.script, 40, 80, show_pos=True) }}
|
|
32
|
+
<input type="submit" value="Update">
|
|
33
|
+
<input type="reset" value="Reset">
|
|
34
|
+
</fieldset>
|
|
35
|
+
</form>
|
|
36
|
+
|
|
37
|
+
{% if rate_script_example %}
|
|
38
|
+
<h4>Example</h4>
|
|
39
|
+
<pre>{{rate_script_example}}</pre>
|
|
40
|
+
{% endif %}
|
|
56
41
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
42
|
+
<form hx-delete="/e/dc_rate_scripts/{{dc_rate_script.id}}/edit"
|
|
43
|
+
hx-confirm="Are you sure you want to delete this rate script?">
|
|
44
|
+
<fieldset>
|
|
45
|
+
<legend>Delete this Rate Script</legend>
|
|
60
46
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
{% endif %}
|
|
47
|
+
<input type="submit" name="delete" value="Delete">
|
|
48
|
+
</fieldset>
|
|
49
|
+
</form>
|
|
66
50
|
{% endblock %}
|
|
@@ -9,174 +9,127 @@
|
|
|
9
9
|
<a href="/e/mop_contracts">MOP Contracts</a> »
|
|
10
10
|
<a href="/e/mop_contracts/{{batch.contract.id}}">{{batch.contract.name}}</a>
|
|
11
11
|
»
|
|
12
|
-
<a href="/e/
|
|
12
|
+
<a href="/e/mop_contracts/{{batch.contract.id}}/batches">Batches</a>
|
|
13
13
|
» {{batch.reference}}
|
|
14
14
|
[<a href="/e/mop_batches/{{batch.id}}/edit">edit</a>]
|
|
15
15
|
{% endblock %}
|
|
16
16
|
|
|
17
17
|
{% block content %}
|
|
18
|
-
{% if request.method == 'GET' and request.values.confirm_delete_bills %}
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
<
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
</legend>
|
|
36
|
-
<input type="submit" name="delete_import_bills" value="Re-Import">
|
|
37
|
-
<a href="/e/mop_batches/{{batch.id}}">Cancel</a>
|
|
38
|
-
</fieldset>
|
|
39
|
-
</form>
|
|
40
|
-
|
|
41
|
-
{% elif request.method == 'GET' and request.values.confirm_import_bills %}
|
|
42
|
-
|
|
43
|
-
<form method="post" action="/e/mop_batches/{{batch.id}}">
|
|
44
|
-
<fieldset>
|
|
45
|
-
<legend>
|
|
46
|
-
Are you sure you want to import the bills from the files into this batch?
|
|
47
|
-
</legend>
|
|
48
|
-
<input type="submit" name="import_bills" value="Import">
|
|
49
|
-
<a href="/e/mop_batches/{{batch.id}}">Cancel</a>
|
|
50
|
-
</fieldset>
|
|
51
|
-
</form>
|
|
52
|
-
|
|
53
|
-
{% else %}
|
|
54
|
-
|
|
55
|
-
<table>
|
|
56
|
-
<caption>Batch</caption>
|
|
19
|
+
<table>
|
|
20
|
+
<caption>Batch</caption>
|
|
21
|
+
<tr>
|
|
22
|
+
<th>Reference</th>
|
|
23
|
+
<td>{{ batch.reference }}</td>
|
|
24
|
+
</tr>
|
|
25
|
+
<tr>
|
|
26
|
+
<th>Description</th>
|
|
27
|
+
<td>{{ batch.description }}</td>
|
|
28
|
+
</tr>
|
|
29
|
+
<tr>
|
|
30
|
+
<th>Number Of Bills</th>
|
|
31
|
+
<td>{{ bills|length }}</td>
|
|
32
|
+
</tr>
|
|
33
|
+
{% if batch_reports %}
|
|
57
34
|
<tr>
|
|
58
|
-
<th>
|
|
59
|
-
<td>
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
35
|
+
<th>Custom Reports</th>
|
|
36
|
+
<td>
|
|
37
|
+
<ul>
|
|
38
|
+
{% for report in batch_reports %}
|
|
39
|
+
<li>
|
|
40
|
+
<a href="/local_reports/{{report.id}}/output?batch_id={{batch.id}}">{{report.name}}</a>
|
|
41
|
+
</li>
|
|
42
|
+
{% endfor %}
|
|
43
|
+
</ul>
|
|
44
|
+
</td>
|
|
64
45
|
</tr>
|
|
46
|
+
{% endif %}
|
|
47
|
+
</table>
|
|
48
|
+
|
|
49
|
+
<table>
|
|
50
|
+
<caption>
|
|
51
|
+
Billing Files [<a href="/e/mop_batches/{{batch.id}}/upload_file">upload</a>]
|
|
52
|
+
</caption>
|
|
53
|
+
<thead>
|
|
65
54
|
<tr>
|
|
66
|
-
<th>
|
|
67
|
-
<
|
|
55
|
+
<th>View</th>
|
|
56
|
+
<th>Filename</th>
|
|
57
|
+
<th>Upload Timestamp</th>
|
|
58
|
+
<th>Parser Name</th>
|
|
68
59
|
</tr>
|
|
69
|
-
|
|
60
|
+
</thead>
|
|
61
|
+
<tbody>
|
|
62
|
+
{% for file in batch.files %}
|
|
70
63
|
<tr>
|
|
71
|
-
<
|
|
72
|
-
<td>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
<li>
|
|
76
|
-
<a href="/local_reports/{{report.id}}/output?batch_id={{batch.id}}">{{report.name}}</a>
|
|
77
|
-
</li>
|
|
78
|
-
{% endfor %}
|
|
79
|
-
</ul>
|
|
80
|
-
</td>
|
|
64
|
+
<td><a href="/e/mop_batch_files/{{file.id}}"/>View</td>
|
|
65
|
+
<td>{{file.filename}}</td>
|
|
66
|
+
<td>{{file.upload_timestamp|hh_format}}</td>
|
|
67
|
+
<td>{{file.parser_name}}</td>
|
|
81
68
|
</tr>
|
|
82
|
-
{%
|
|
83
|
-
</
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
<
|
|
69
|
+
{% endfor %}
|
|
70
|
+
</tbody>
|
|
71
|
+
</table>
|
|
72
|
+
|
|
73
|
+
<table>
|
|
74
|
+
<caption>Imports</caption>
|
|
75
|
+
<thead>
|
|
76
|
+
<th>View</th>
|
|
77
|
+
<th>Id</th>
|
|
78
|
+
</thead>
|
|
79
|
+
<tbody>
|
|
80
|
+
{% for id in importer_ids %}
|
|
90
81
|
<tr>
|
|
91
|
-
<
|
|
92
|
-
<
|
|
93
|
-
<th>Upload Timestamp</th>
|
|
94
|
-
<th>Parser Name</th>
|
|
82
|
+
<td><a href="/e/mop_bill_imports/{{id}}">View</a></td>
|
|
83
|
+
<td>{{id}}</td>
|
|
95
84
|
</tr>
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
<table>
|
|
110
|
-
<caption>Imports</caption>
|
|
111
|
-
<thead>
|
|
85
|
+
{% endfor %}
|
|
86
|
+
</tbody>
|
|
87
|
+
</table>
|
|
88
|
+
|
|
89
|
+
<ul>
|
|
90
|
+
<li><a href="/reports/111?batch_id={{batch.id}}">Check Bills</a></li>
|
|
91
|
+
<li><a href="/e/mop_batches/{{batch.id}}/csv">CSV of Bills</a></li>
|
|
92
|
+
</ul>
|
|
93
|
+
|
|
94
|
+
<table class="sticky">
|
|
95
|
+
<caption>Bills [<a href="/e/mop_batches/{{batch.id}}/add_bill">add</a>]</caption>
|
|
96
|
+
<thead>
|
|
97
|
+
<tr>
|
|
112
98
|
<th>View</th>
|
|
113
|
-
<th>
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
<input name="confirm_import_bills" type="submit" value="Import Bills">
|
|
129
|
-
<input name="confirm_delete_bills" type="submit" value="Delete Bills">
|
|
130
|
-
<input name="confirm_delete_import_bills" type="submit" value="Re-Import Bills">
|
|
131
|
-
</fieldset>
|
|
132
|
-
</form>
|
|
133
|
-
|
|
134
|
-
<ul>
|
|
135
|
-
<li><a href="/reports/111?batch_id={{batch.id}}">Check Bills</a></li>
|
|
136
|
-
<li><a href="/e/mop_batches/{{batch.id}}/csv">CSV of Bills</a></li>
|
|
137
|
-
</ul>
|
|
138
|
-
|
|
139
|
-
<table class="sticky">
|
|
140
|
-
<caption>Bills [<a href="/e/mop_batches/{{batch.id}}/add_bill">add</a>]</caption>
|
|
141
|
-
<thead>
|
|
99
|
+
<th>Reference</th>
|
|
100
|
+
<th>Supply</th>
|
|
101
|
+
<th>Account</th>
|
|
102
|
+
<th>Issue Date</th>
|
|
103
|
+
<th>From</th>
|
|
104
|
+
<th>To</th>
|
|
105
|
+
<th>kWh</th>
|
|
106
|
+
<th>Net</th>
|
|
107
|
+
<th>VAT</th>
|
|
108
|
+
<th>Gross</th>
|
|
109
|
+
<th>Type</th>
|
|
110
|
+
</tr>
|
|
111
|
+
</thead>
|
|
112
|
+
<tbody>
|
|
113
|
+
{% for bill in bills %}
|
|
142
114
|
<tr>
|
|
143
|
-
<
|
|
144
|
-
<
|
|
145
|
-
<
|
|
146
|
-
<
|
|
147
|
-
<
|
|
148
|
-
<
|
|
149
|
-
<
|
|
150
|
-
<
|
|
151
|
-
<
|
|
152
|
-
<
|
|
153
|
-
<
|
|
154
|
-
<
|
|
115
|
+
<td><a href="/e/mop_bills/{{bill.id}}">View</a></td>
|
|
116
|
+
<td>{{bill.reference}}</td>
|
|
117
|
+
<td><a href="/e/supplies/{{bill.supply.id}}">supply</a></td>
|
|
118
|
+
<td>{{ bill.account }}</td>
|
|
119
|
+
<td>{{ bill.issue_date|hh_format }}</td>
|
|
120
|
+
<td>{{ bill.start_date|hh_format }}</td>
|
|
121
|
+
<td>{{ bill.finish_date|hh_format }}</td>
|
|
122
|
+
<td>{{ bill.kwh }}</td>
|
|
123
|
+
<td>{{ bill.net }}</td>
|
|
124
|
+
<td>{{ bill.vat }}</td>
|
|
125
|
+
<td>{{ bill.gross }}</td>
|
|
126
|
+
<td>
|
|
127
|
+
<a href="/bill_types/{{bill.bill_type.id}}"
|
|
128
|
+
title="{{bill.bill_type.description}}">{{bill.bill_type.code}}</a>
|
|
129
|
+
</td>
|
|
155
130
|
</tr>
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
<tr>
|
|
160
|
-
<td><a href="/e/mop_bills/{{bill.id}}">View</a></td>
|
|
161
|
-
<td>{{bill.reference}}</td>
|
|
162
|
-
<td><a href="/e/supplies/{{bill.supply.id}}">supply</a></td>
|
|
163
|
-
<td>{{ bill.account }}</td>
|
|
164
|
-
<td>{{ bill.issue_date|hh_format }}</td>
|
|
165
|
-
<td>{{ bill.start_date|hh_format }}</td>
|
|
166
|
-
<td>{{ bill.finish_date|hh_format }}</td>
|
|
167
|
-
<td>{{ bill.kwh }}</td>
|
|
168
|
-
<td>{{ bill.net }}</td>
|
|
169
|
-
<td>{{ bill.vat }}</td>
|
|
170
|
-
<td>{{ bill.gross }}</td>
|
|
171
|
-
<td>
|
|
172
|
-
<a href="/bill_types/{{bill.bill_type.id}}"
|
|
173
|
-
title="{{bill.bill_type.description}}">{{bill.bill_type.code}}</a>
|
|
174
|
-
</td>
|
|
175
|
-
</tr>
|
|
176
|
-
{% endfor %}
|
|
177
|
-
</tbody>
|
|
178
|
-
</table>
|
|
179
|
-
|
|
180
|
-
{% endif %}
|
|
131
|
+
{% endfor %}
|
|
132
|
+
</tbody>
|
|
133
|
+
</table>
|
|
181
134
|
|
|
182
135
|
{% endblock %}
|
|
@@ -7,12 +7,11 @@
|
|
|
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
|
-
<a href="/e/
|
|
11
|
-
» Add
|
|
10
|
+
<a href="/e/mop_contracts/{{contract.id}}/batches">Batches</a> » Add
|
|
12
11
|
{% endblock %}
|
|
13
12
|
|
|
14
13
|
{% block content %}
|
|
15
|
-
<form action="/e/mop_contracts/{{contract.id}}/
|
|
14
|
+
<form action="/e/mop_contracts/{{contract.id}}/batches/add" method="post">
|
|
16
15
|
<fieldset>
|
|
17
16
|
<legend>Add a batch</legend>
|
|
18
17
|
<label>Reference</label>
|
|
@@ -7,60 +7,52 @@
|
|
|
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
|
|
13
|
-
»
|
|
14
|
-
<a href="/e/mop_batches/{{batch.id}}">{{batch.reference}}</a>
|
|
15
|
-
» Edit
|
|
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> »
|
|
12
|
+
<a href="/e/mop_batches/{{batch.id}}">{{batch.reference}}</a> » Edit
|
|
16
13
|
{% endblock %}
|
|
17
14
|
|
|
18
15
|
{% block content %}
|
|
19
16
|
|
|
20
|
-
{
|
|
17
|
+
<form action="/e/mop_batches/{{batch.id}}/edit" method="post">
|
|
18
|
+
<fieldset>
|
|
19
|
+
<legend>Update batch</legend>
|
|
20
|
+
<label>Reference</label> {{input_text('reference', batch.reference)}}
|
|
21
|
+
<label>Description</label> {{input_text('description', batch.description)}}
|
|
22
|
+
<input type="submit" name="update" value="Update">
|
|
23
|
+
</fieldset>
|
|
24
|
+
</form>
|
|
25
|
+
|
|
26
|
+
<form hx-post="/mop_batches/{{batch_id}}/edit"
|
|
27
|
+
hx-confirm="Are you sure you want to delete all the bills in this batch?">
|
|
28
|
+
<fieldset>
|
|
29
|
+
<legend>Delete All The Bills In This Batch</legend>
|
|
30
|
+
<input type="submit" name="delete_bills" value="Delete">
|
|
31
|
+
</fieldset>
|
|
32
|
+
</form>
|
|
33
|
+
|
|
34
|
+
<form hx-post="/e/mop_batches/{{batch.id}}/edit"
|
|
35
|
+
hx-confirm="Are you sure you want to import the bills from the files into this batch?">
|
|
36
|
+
<fieldset>
|
|
37
|
+
<legend>Import The Bills From The Files Into This Batch</legend>
|
|
38
|
+
<input type="submit" name="import_bills" value="Import">
|
|
39
|
+
</fieldset>
|
|
40
|
+
</form>
|
|
41
|
+
|
|
42
|
+
<form hx-post="/e/mop_batches/{{batch.id}}/edit"
|
|
43
|
+
hx-confirm="Are you sure you want to delete all the bills in this batch and then re-import bills from the files?">
|
|
44
|
+
<fieldset>
|
|
45
|
+
<legend>Delete All The Bills In This Batch And Then Re-Import Bills From The Files</legend>
|
|
46
|
+
<input type="submit" name="delete_import_bills" value="Re-Import">
|
|
47
|
+
</fieldset>
|
|
48
|
+
</form>
|
|
49
|
+
|
|
50
|
+
<form hx-delete="/e/mop_batches/{{batch.id}}/edit"
|
|
51
|
+
hx-confirm="Are you sure you want to delete this batch and all its bills?">
|
|
52
|
+
<fieldset>
|
|
53
|
+
<legend>Delete This Batch</legend>
|
|
54
|
+
<input type="submit" name="confirm_delete" value="Delete">
|
|
55
|
+
</fieldset>
|
|
56
|
+
</form>
|
|
21
57
|
|
|
22
|
-
<form action="/e/mop_batches/{{batch.id}}/edit" method="post">
|
|
23
|
-
<fieldset>
|
|
24
|
-
<legend>Are you sure you want to delete this batch and all its bills?</legend>
|
|
25
|
-
<input type="submit" name="delete" value="Delete">
|
|
26
|
-
<a href="/mop_batches/{{batch.id}}/edit">Cancel</a>
|
|
27
|
-
</fieldset>
|
|
28
|
-
</form>
|
|
29
|
-
|
|
30
|
-
{% elif request.method == 'GET' and request.values.confirm_delete_bills %}
|
|
31
|
-
|
|
32
|
-
<form method="post" action="/e/mop_batches/{{batch.id}}/edit">
|
|
33
|
-
<fieldset>
|
|
34
|
-
<legend>Are you sure you want to delete all the bills in this batch?</legend>
|
|
35
|
-
<input type="submit" name="delete_bills" value="Delete">
|
|
36
|
-
<a href="/e/mop_batches/{{batch.id}}/edit">Cancel</a>
|
|
37
|
-
</fieldset>
|
|
38
|
-
</form>
|
|
39
|
-
|
|
40
|
-
{% else %}
|
|
41
|
-
|
|
42
|
-
<form action="/e/mop_batches/{{batch.id}}/edit" method="post">
|
|
43
|
-
<fieldset>
|
|
44
|
-
<legend>Update batch</legend>
|
|
45
|
-
<label>Reference</label> {{input_text('reference', batch.reference)}}
|
|
46
|
-
<label>Description</label> {{input_text('description', batch.description)}}
|
|
47
|
-
<input type="submit" name="update" value="Update">
|
|
48
|
-
</fieldset>
|
|
49
|
-
</form>
|
|
50
|
-
|
|
51
|
-
<form action="/e/mop_batches/{{batch.id}}/edit">
|
|
52
|
-
<fieldset>
|
|
53
|
-
<legend>Delete all the bills in this batch</legend>
|
|
54
|
-
<input type="submit" name="confirm_delete_bills" value="Delete">
|
|
55
|
-
</fieldset>
|
|
56
|
-
</form>
|
|
57
|
-
|
|
58
|
-
<form action="/e/mop_batches/{{batch.id}}/edit">
|
|
59
|
-
<fieldset>
|
|
60
|
-
<legend>Delete this batch</legend>
|
|
61
|
-
<input type="submit" name="confirm_delete" value="Delete">
|
|
62
|
-
</fieldset>
|
|
63
|
-
</form>
|
|
64
|
-
|
|
65
|
-
{% endif %}
|
|
66
58
|
{% endblock %}
|