Beispiel #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())
Beispiel #2
0
def holiday_bills(db, username):
    print("Acomodation | Transportation")
    holiday_choice = input("> ")
    holiday_choice.lower()
    if holiday_choice == "acomodation":

        def akomodim():
            print("press 1 to create new insurance bill ")
            print("press 2 to see all bills ")
            print(" press anything else to exit")

    choice = input(">")
    if choice == "1":
        print("creating accomodation bill")
        yearlyBills.createBill(db, "accomodationbill")
    elif choice == "2":
        bills = db.getObjectsFrom(
            "yearlyBills",
            lambda x: x.btype == "accomodationbill" and x.name == username)
        for bill in bills:
            print(bill.toString())
    elif holiday_choice == "transportation":
        print("press 1 to create new transportation bill ")
        print("press 2 to see all bills ")
        print(" press anything else to exit")
    choice = input(">")
    if choice == "1":
        print("creating  transportation bill")
        yearlyBills.createBill(db, "transportationbill")
    elif choice == "2":
        bills = db.getObjectsFrom(
            "yearlyBills",
            lambda x: x.btype == "transportationbill" and x.name == username)
        for bill in bills:
            print(bill.toString())