fix: Correct menu logic for portfolio value update and system exit

This commit is contained in:
Bobby (aider) 2025-02-10 10:18:59 -08:00
parent c363745542
commit 952dfcd266

View File

@ -145,6 +145,17 @@ def main():
print(f"\nRemoved position: {symbol}")
elif choice == "5":
new_value = get_float_input("Enter new portfolio value: $")
new_cash = get_float_input("Enter new cash balance: $")
notes = input("Notes (optional): ")
if new_value and new_cash:
portfolio_value = new_value
cash_balance = new_cash
update_portfolio_value(portfolio_value, cash_balance, notes)
print(f"\nPortfolio value updated: ${portfolio_value:.2f}")
print(f"Cash balance updated: ${cash_balance:.2f}")
elif choice == "6":
print("\nExiting Trading Management System")
break