fixed bug where we sell $0 of shares each year once we run out of shares
This commit is contained in:
2
BUGS
2
BUGS
@@ -1,5 +1,3 @@
|
|||||||
* if run out of shares, we still sell "$0" of them (annotation)
|
|
||||||
|
|
||||||
* cannot remove bill type (Kayo) - OR (TODO): modify it to yearly from monthly
|
* cannot remove bill type (Kayo) - OR (TODO): modify it to yearly from monthly
|
||||||
|
|
||||||
* can put in dumb dates - DO SOME INPUT VALIDATION, *sigh*
|
* can put in dumb dates - DO SOME INPUT VALIDATION, *sigh*
|
||||||
|
|||||||
6
calc.py
6
calc.py
@@ -285,8 +285,10 @@ def calculate_savings_depletion(finance, bill_data, bill_type):
|
|||||||
D_CBA_shares -= 1
|
D_CBA_shares -= 1
|
||||||
Sell_shares -= 1
|
Sell_shares -= 1
|
||||||
|
|
||||||
current_savings += actual_sell
|
# can run out, if so, no need to add :)
|
||||||
add_annotation(finance, current_date, current_savings, actual_sell, "Sell shares" )
|
if actual_sell>0:
|
||||||
|
current_savings += actual_sell
|
||||||
|
add_annotation(finance, current_date, current_savings, actual_sell, "Sell shares" )
|
||||||
|
|
||||||
|
|
||||||
current_date += timedelta(days=1)
|
current_date += timedelta(days=1)
|
||||||
|
|||||||
Reference in New Issue
Block a user