Ejemplo n.º 1
0
def education_bills(db, username):
    print("School | Courses")
    education_choice = input("> ")
    education_choice.lower()
    if education_choice == "school":
        print("press 1 to create new school bill ")
        print("press 2 to see all bills ")
        print(" press anything else to exit")
    choice = input(">")
    if choice == "1":
        print("creating school bill")
        yearlyBills.createBill(db, "schoolbill")
        print("press 2 to see all bills ")
        print(" press anything else to exit")
    choice = input(">")
    if choice == "1":
        print("creating courses bill")
        yearlyBills.createBill(db, "coursesbill")
        reminder_input = input("Do you want to add a reminder: ")
        reminder_input.lower
        if reminder_input == "yes":
            monthlyBills.reminder(db, "pay_date_str")
        elif reminder_input == "no":
            print("You won't be reminded for the paydate of this bill")
        elif choice == "2":
            bills = db.getObjectsFrom(
                "yearlyBills",
                lambda x: x.btype == "coursesbill" and x.name == username)
        for bill in bills:
            print(bill.toString())
Ejemplo n.º 2
0
def Mobile_services(db, username):
    print(" ")
    print("Telephone Bills | Internet Bills")
    mobile_choice = input("> ")
    mobile_choice.lower()
    if mobile_choice == "telephone bills":
        print("press 1 to create new telephone bill ")
        print("press 2 to see all bills ")
        print(" press anything else to exit")
    choice = input(">")
    if choice == "1":
        print("creating telephone bill")
        monthlyBills.createBill(db, "telephonebill")
        reminder_input = input("Do you want to add a reminder: ")
        reminder_input.lower
        if reminder_input == "yes":
            monthlyBills.reminder(db, "pay_date_str")
        elif reminder_input == "no":
            print("You won't be reminded for the paydate of this bill")
    elif choice == "2":
        bills = db.getObjectsFrom(
            "monthlyBills",
            lambda x: x.btype == "telephonebill" and x.name == username)
        for bill in bills:
            print(bill.toString())
    elif mobile_choice == "internet bills":
        print("press 1 to create new internet bill ")
        print("press 2 to see all bills ")
        print(" press anything else to exit")
    choice = input(">")
    if choice == "1":
        print("creating internet bill")
        monthlyBills.createBill(db, "internetbill")
        reminder_input = input("Do you want to add a reminder: ")
        reminder_input.lower
        if reminder_input == "yes":
            monthlyBills.reminder(db, "pay_date_str")
        elif reminder_input == "no":
            print("You won't be reminded for the paydate of this bill")

    elif choice == "2":
        bills = db.getObjectsFrom(
            "monthlyBills",
            lambda x: x.btype == "internetbill" and x.name == username)
        for bill in bills:
            print(bill.toString())
Ejemplo n.º 3
0
def Electricity_bill(db, username):
    print("press 1 to create new electricity bill ")
    print("press 2 to see all bills ")
    print(" press anything else to exit")
    choice = input(">")
    if choice == "1":
        print("creating electricity bill")
        monthlyBills.createBill(db, "electricitybill")
        reminder_input = input("Do you want to add a reminder: ")
        reminder_input.lower
        if reminder_input == "yes":
            monthlyBills.reminder(db, "pay_date_str")
        elif reminder_input == "no":
            print("You won't be reminded for the paydate of this bill")

    elif choice == "2":
        bills = db.getObjectsFrom(
            "monthlyBills",
            lambda x: x.btype == "electricitybill" and x.name == username)
        for bill in bills:
            print(bill.toString())