From b736ec9c0e3efa947a53ed9156a11ab772460119 Mon Sep 17 00:00:00 2001 From: Eric Phillips Date: Tue, 19 Oct 2021 23:08:41 -0600 Subject: [PATCH] totals row on top --- flaskfdx/dashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flaskfdx/dashboard.py b/flaskfdx/dashboard.py index 026e35f..0d073b2 100644 --- a/flaskfdx/dashboard.py +++ b/flaskfdx/dashboard.py @@ -18,6 +18,7 @@ def index(): 'SELECT * FROM totals ORDER BY date DESC LIMIT 56' ).fetchall() lastseven = {} + lastseven['Totals'] = {} stops = 0 totstops = 0 totpkgs = 0 @@ -39,7 +40,6 @@ def index(): tottermpkgs += fourweeks[i]['prepkgs'] lastseven[fourweeks[i]['date']]['termpkgs'] = fourweeks[i]['prepkgs'] lastseven[fourweeks[i]['date']]['percenttermvol'] = round(100 * stops / fourweeks[i]['prepkgs'], 2) - lastseven['Totals'] = {} lastseven['Totals']['pkgs'] = totpkgs lastseven['Totals']['stops'] = totstops lastseven['Totals']['pkgsperstop'] = round(totpkgs / totstops, 2)