def open_new_account(id): account = None print("\n --- Menu --- ") print("1. Open Savings Account") print("2. Open Current Account") print("3. Open Fixed Deposit Account") try: ch = int(input("Enter Choice: ")) except: print("ERROR: Invalid Choice") return account = get_new_account(ch, id) if account is not None: database.open_new_account_customer(account, id) if ch == 3: res = db_admin.get_fd_report(id) print("Account No \t\t\t\t Amount \t\t\t\t Deposit Term") for i in range(0, len(res)): print(res[i][0], " \t\t\t\t\t Rs", res[i][1], " \t\t\t\t ", res[i][2]) else: print("ERROR: Invalid Choice")
def open_new_account(id): account = None print("\n --- Menu --- ") print("1. Open Savings Account") print("2. Open Current Account") print("3. Open Fixed Deposit Account") try: ch = int(input()) except: print("Invalid Choice") return account = get_new_account(ch,id) if account is not None: try: database.open_new_account_customer(account,id) except cx_Oracle.DatabaseError as e: print("Sorry something went Wrong") print(e) con.rollback() return if ch == 3: res = db_admin.get_fd_report(id) print("Account No \t\t\t\t Amount \t\t\t\t Deposit Term") for i in range(0,len(res)): print(res[i][0]," \t\t\t\t\t ",res[i][1]," \t\t\t\t ",res[i][2]) else: print("Invalid Choice")
def open_new_account(self): account = self.get_new_account() if account is not None: database.open_new_account_customer(account, self.id) if self.selection == 3: res = db_admin.get_fd_report(self.id) print(res) print(tabulate(res, headers=["Account No", "Amount", "Deposit Term"], tablefmt="pretty")) else: print("Invalid Choice")