chellow 1742546814.0.0__py3-none-any.whl → 1742914638.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/general_import.py +6 -0
- chellow/reports/report_bills.py +2 -0
- chellow/reports/report_g_supplies_snapshot.py +2 -17
- chellow/templates/general_imports.html +5 -0
- {chellow-1742546814.0.0.dist-info → chellow-1742914638.0.0.dist-info}/METADATA +1 -1
- {chellow-1742546814.0.0.dist-info → chellow-1742914638.0.0.dist-info}/RECORD +7 -7
- {chellow-1742546814.0.0.dist-info → chellow-1742914638.0.0.dist-info}/WHEEL +0 -0
chellow/general_import.py
CHANGED
|
@@ -1052,6 +1052,12 @@ def general_import_bill(sess, action, vals, args):
|
|
|
1052
1052
|
breakdown,
|
|
1053
1053
|
)
|
|
1054
1054
|
|
|
1055
|
+
elif action == "delete":
|
|
1056
|
+
bill_id_str = add_arg(args, "Bill Chellow Id", vals, 0)
|
|
1057
|
+
bill_id = int(bill_id_str)
|
|
1058
|
+
bill = Bill.get_by_id(sess, bill_id)
|
|
1059
|
+
bill.delete(sess)
|
|
1060
|
+
|
|
1055
1061
|
|
|
1056
1062
|
def general_import_g_bill(sess, action, vals, args):
|
|
1057
1063
|
if action == "insert":
|
chellow/reports/report_bills.py
CHANGED
|
@@ -16,6 +16,7 @@ from chellow.utils import csv_make_val, req_int
|
|
|
16
16
|
def _content(sess, writer, batch_id):
|
|
17
17
|
batch = Batch.get_by_id(sess, batch_id)
|
|
18
18
|
titles = [
|
|
19
|
+
"chellow_id",
|
|
19
20
|
"supplier_contract",
|
|
20
21
|
"batch_reference",
|
|
21
22
|
"bill_reference",
|
|
@@ -60,6 +61,7 @@ def _content(sess, writer, batch_id):
|
|
|
60
61
|
vbd["net"] += vat_vals["net"]
|
|
61
62
|
|
|
62
63
|
vals = {
|
|
64
|
+
"chellow_id": bill.id,
|
|
63
65
|
"supplier_contract": batch.contract.name,
|
|
64
66
|
"batch_reference": batch.reference,
|
|
65
67
|
"bill_reference": bill.reference,
|
|
@@ -9,11 +9,7 @@ from sqlalchemy import or_
|
|
|
9
9
|
from sqlalchemy.orm import joinedload
|
|
10
10
|
from sqlalchemy.sql.expression import null
|
|
11
11
|
|
|
12
|
-
from werkzeug.exceptions import BadRequest
|
|
13
|
-
|
|
14
12
|
from chellow.dloads import open_file
|
|
15
|
-
from chellow.e.computer import contract_func
|
|
16
|
-
from chellow.gas.engine import GDataSource, forecast_date
|
|
17
13
|
from chellow.models import GEra, GSupply, Session
|
|
18
14
|
from chellow.utils import csv_make_val, req_date, req_int
|
|
19
15
|
|
|
@@ -44,8 +40,6 @@ def content(date, g_supply_id, user):
|
|
|
44
40
|
"soq",
|
|
45
41
|
)
|
|
46
42
|
)
|
|
47
|
-
fdate = forecast_date()
|
|
48
|
-
caches = {}
|
|
49
43
|
|
|
50
44
|
g_eras = (
|
|
51
45
|
sess.query(GEra, GSupply)
|
|
@@ -83,16 +77,7 @@ def content(date, g_supply_id, user):
|
|
|
83
77
|
g_supply_start_date = sup_g_eras[0].start_date
|
|
84
78
|
g_supply_finish_date = sup_g_eras[-1].finish_date
|
|
85
79
|
|
|
86
|
-
ds = GDataSource(sess, date, date, fdate, g_era, caches, None)
|
|
87
80
|
g_supplier_contract = g_era.g_contract
|
|
88
|
-
vb_function = contract_func(caches, g_supplier_contract, "virtual_bill")
|
|
89
|
-
if vb_function is None:
|
|
90
|
-
raise BadRequest(
|
|
91
|
-
f"The contract {g_supplier_contract.name} doesn't have the "
|
|
92
|
-
f"virtual_bill() function."
|
|
93
|
-
)
|
|
94
|
-
vb_function(ds)
|
|
95
|
-
bill = ds.bill
|
|
96
81
|
|
|
97
82
|
writer.writerow(
|
|
98
83
|
csv_make_val(value)
|
|
@@ -112,8 +97,8 @@ def content(date, g_supply_id, user):
|
|
|
112
97
|
g_supply_start_date,
|
|
113
98
|
g_supply_finish_date,
|
|
114
99
|
g_era.g_reading_frequency.code,
|
|
115
|
-
|
|
116
|
-
|
|
100
|
+
g_era.aq,
|
|
101
|
+
g_era.soq,
|
|
117
102
|
]
|
|
118
103
|
)
|
|
119
104
|
except BaseException:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: chellow
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1742914638.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)
|
|
@@ -4,7 +4,7 @@ chellow/bank_holidays.py,sha256=T_utYMwe_g1dz5X-aOTdIPryg49SvB7QsWM1yphlqG8,4423
|
|
|
4
4
|
chellow/commands.py,sha256=ESBe9ZWj1c3vdZgqMZ9gFvYAB3hRag2R1PzOwuw9yFo,1302
|
|
5
5
|
chellow/dloads.py,sha256=dixp-O0MF2_mlwrnKx3D9DH09Qu05BjTo0rZfigTjR4,5534
|
|
6
6
|
chellow/edi_lib.py,sha256=alu20x9ZX06iPfnNI9dEJzuP6RIf4We3Y_M_bl7RrcY,51789
|
|
7
|
-
chellow/general_import.py,sha256=
|
|
7
|
+
chellow/general_import.py,sha256=pRGMcdhPq0Gfr1QG8LiqToKp-mnYa2yB8tfh8fy7eQo,65313
|
|
8
8
|
chellow/models.py,sha256=GVuPnDUGJqPbdD8Z4Ccoiw4ZLeuEXFgAkrTLS_znTQw,244452
|
|
9
9
|
chellow/national_grid.py,sha256=czwIZqzJndSGhEMQ5YzI6hRBhvjkM6VRVYXybf4_KXg,4377
|
|
10
10
|
chellow/proxy.py,sha256=cVXIktPlX3tQ1BYcwxq0nJXKE6r3DtFTtfFHPq55HaM,1351
|
|
@@ -96,13 +96,13 @@ chellow/reports/report_81.py,sha256=bBpV6MtvKGtoLiqzZoK2h21KDs4vfDwy-etpfL9oiEI,
|
|
|
96
96
|
chellow/reports/report_87.py,sha256=udzbCuXcckWD-OHmfJCT6bwg_paYhm4vfDWlL8WM-jA,6933
|
|
97
97
|
chellow/reports/report_asset_comparison.py,sha256=Cl2NgvbclqhOVvKuUu3sajTVO2JupMfzK3bV0_K8eNs,6077
|
|
98
98
|
chellow/reports/report_batches.py,sha256=MoCv2dE-JgaJzaMjMA-kZrPkYR13uDoXer5UuF12OYc,4757
|
|
99
|
-
chellow/reports/report_bills.py,sha256=
|
|
99
|
+
chellow/reports/report_bills.py,sha256=LP7XDxzO0Fp10c8xDE67e4tHTEc7nN74ESQBy762Nx4,3401
|
|
100
100
|
chellow/reports/report_csv_llfcs.py,sha256=mMB06b6Jems5kcQU4H4Le_fyKgVr8THP8BCx3pkvg5E,1903
|
|
101
101
|
chellow/reports/report_csv_site_hh_data.py,sha256=ik0OkGVo1bfTXLdcT3gPUHnxSkSdorzZheP3qgnOR5c,4331
|
|
102
102
|
chellow/reports/report_csv_site_snags.py,sha256=AuAy6vjL0g7vwPPAZhBqxOyITL9_jnyFj012MnUcxxk,2627
|
|
103
103
|
chellow/reports/report_ecoes_comparison.py,sha256=wEwJrFMOz74CidONkTmgWD1Ghhgo9DT0V7Vddkspkqg,21403
|
|
104
104
|
chellow/reports/report_g_monthly_duration.py,sha256=VQq5xTLvdu9Z_vqrgWNP2S4xm2uCSSZA9HVNiQv9Dus,18264
|
|
105
|
-
chellow/reports/report_g_supplies_snapshot.py,sha256=
|
|
105
|
+
chellow/reports/report_g_supplies_snapshot.py,sha256=9xB6RDrnbgxuomMcP1b1yEP4kOnEJ34WgKpyxLTprOQ,3998
|
|
106
106
|
chellow/reports/report_g_supply_virtual_bill.py,sha256=EaYrB8PHJIXrUuhiZ7dwUlbNBkuyJebQHrdc308_z1o,3653
|
|
107
107
|
chellow/reports/report_g_virtual_bills.py,sha256=20vHa5LGQwOAlJlaGJaGszZrrbT0PMOZJf6hSxU2hIQ,4528
|
|
108
108
|
chellow/reports/report_g_virtual_bills_hh.py,sha256=gaiLEmKTpq6JsfZ1p0SdCDuPvzvigXp6z88gHRCA63w,3416
|
|
@@ -122,7 +122,7 @@ chellow/templates/csv_sites_monthly_duration.html,sha256=59gErG6KwA57z-qh2EJsVGv
|
|
|
122
122
|
chellow/templates/downloads.html,sha256=R9QPcFz-PLJOX7rDlmquIk-Hp9Iq-thzWCTfOexSpXg,937
|
|
123
123
|
chellow/templates/edi_viewer.html,sha256=szUthgHOdph6Of-7f_1LeC_zYlNJaMeS5ctn6xTAeiM,1437
|
|
124
124
|
chellow/templates/general_import.html,sha256=9ezzieDjaPBZ0nUJkMkzoDxWVzYtr4D-Dr2UCA5xV8U,1370
|
|
125
|
-
chellow/templates/general_imports.html,sha256=
|
|
125
|
+
chellow/templates/general_imports.html,sha256=9sYN7FdzfxFypAUbUJ4VbhU3WhJrjArtqneohgX1hGE,13171
|
|
126
126
|
chellow/templates/home.html,sha256=illtSabepcScYwmKss0o2gwvjXGBtr6LkfwmeL6ezSA,5655
|
|
127
127
|
chellow/templates/input_date.html,sha256=rpgB5n0LfN8Y5djN_ZiuSxqdskxzCoKrEqI7hyJkVQo,1248
|
|
128
128
|
chellow/templates/local_report.html,sha256=pV7_0QwyQ-D3OS9LXrly5pq3qprZnwTCoq6vCnMTkS4,1332
|
|
@@ -378,6 +378,6 @@ chellow/templates/g/supply_note_edit.html,sha256=b8mB6_ucBwoljp03iy6AgVaZUhGw3-1
|
|
|
378
378
|
chellow/templates/g/supply_notes.html,sha256=6epNmZ3NKdXZz27fvmRUGeffg_oc1kmwuBeyRzQe3Rg,854
|
|
379
379
|
chellow/templates/g/unit.html,sha256=KouNVU0-i84afANkLQ_heJ0uDfJ9H5A05PuLqb8iCN8,438
|
|
380
380
|
chellow/templates/g/units.html,sha256=p5Nd-lAIboKPEOO6N451hx1bcKxMg4BDODnZ-43MmJc,441
|
|
381
|
-
chellow-
|
|
382
|
-
chellow-
|
|
383
|
-
chellow-
|
|
381
|
+
chellow-1742914638.0.0.dist-info/METADATA,sha256=Qphw1t1o5DK0P4xefom0CRq28M2N0rPjj5D2Vs3iO50,12238
|
|
382
|
+
chellow-1742914638.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
383
|
+
chellow-1742914638.0.0.dist-info/RECORD,,
|
|
File without changes
|