Exemple #1
0
# add or remove stock. adds or removes from current stock
elif choose == "3":
    print(f"Update inventory for:\n{title} [1]\n{title2} [2]")
    choice = input("> ")
    if choice == "1":
        print(f"For {title}:\nAdd inventory [1]\nDeduct inventory [2]")
        choice1 = input("> ")
        if choice1 == "1":
            new_stock = input("New incoming stock\n> ")
            new_stock = int(new_stock)
            inven = book1.add_inventory(new_stock)
            print(inven)
        elif choice1 == "2":
            lost = input("Out-going stock\n> ")
            lost = int(lost)
            inven = book1.deduct_inventory(lost)
            print(inven)
        else:
            print("Bye")
    if choice == "2":
        print(f"For {title2}:\nAdd inventory [1]\nDeduct inventory [2]")
        choice1 = input("> ")
        if choice1 == "1":
            new_stock = input("New incoming stock\n> ")
            new_stock = int(new_stock)
            inven = book2.add_inventory(new_stock)
            print(inven)
        elif choice1 == "2":
            lost = input("Out going stock\n> ")
            lost = int(lost)
            inven = book2.deduct_inventory(lost)