totals row on top
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user