number of days bug in portfolio features fixed
This commit is contained in:
parent
58474f8eea
commit
f3f99e6ee6
@ -1061,6 +1061,9 @@ class StockTicker():
|
||||
try:
|
||||
cost = portfolio_settings[cb]['cost']
|
||||
day = portfolio_settings[cb]['day']
|
||||
day_start = datetime.strptime(str(day), "%Y-%m-%d")
|
||||
day_today = datetime.strptime(datetime.now(pytz.utc).strftime("%Y-%m-%d"), "%Y-%m-%d")
|
||||
day = str((day_today - day_start).days)
|
||||
shares = portfolio_settings[cb]['shares']
|
||||
|
||||
original_value = float(cost) * float(shares)
|
||||
@ -1230,6 +1233,9 @@ class StockTicker():
|
||||
try:
|
||||
cost = portfolio_settings[cb]['cost']
|
||||
day = portfolio_settings[cb]['day']
|
||||
day_start = datetime.strptime(str(day), "%Y-%m-%d")
|
||||
day_today = datetime.strptime(datetime.now(pytz.utc).strftime("%Y-%m-%d"), "%Y-%m-%d")
|
||||
day = str((day_today - day_start).days)
|
||||
shares = portfolio_settings[cb]['shares']
|
||||
|
||||
original_value = float(cost) * float(shares)
|
||||
@ -2020,6 +2026,9 @@ class StockTicker():
|
||||
try:
|
||||
cost = portfolio_settings[symbol]['cost']
|
||||
day = portfolio_settings[symbol]['day']
|
||||
day_start = datetime.strptime(str(day), "%Y-%m-%d")
|
||||
day_today = datetime.strptime(datetime.now(pytz.utc).strftime("%Y-%m-%d"), "%Y-%m-%d")
|
||||
day = str((day_today - day_start).days)
|
||||
shares = portfolio_settings[symbol]['shares']
|
||||
|
||||
original_value = float(cost) * float(shares)
|
||||
@ -2286,6 +2295,9 @@ class StockTicker():
|
||||
try:
|
||||
cost = portfolio_settings[symbol]['cost']
|
||||
day = portfolio_settings[symbol]['day']
|
||||
day_start = datetime.strptime(str(day), "%Y-%m-%d")
|
||||
day_today = datetime.strptime(datetime.now(pytz.utc).strftime("%Y-%m-%d"), "%Y-%m-%d")
|
||||
day = str((day_today - day_start).days)
|
||||
shares = portfolio_settings[symbol]['shares']
|
||||
|
||||
original_value = float(cost) * float(shares)
|
||||
|
Loading…
Reference in New Issue
Block a user