Aa
Aa
import os
while True:
print("\nWelcome to the Shop Management System")
print("1. Add New Product")
print("2. Update Product Stock")
print("3. Record Sale")
print("4. Generate Sales Report")
print("5. Add New Supplier")
print("6. Find Supplier")
print("7. Check Low Stock")
print("8. Calculate Total Revenue")
print("9. List All Products")
print("10. Delete a Product")
print("11. Exit")
if choice == '1':
product_id = input("Enter Product ID: ")
product_name = input("Enter Product Name: ")
category = input("Enter Product Category: ")
price = input("Enter Product Price: ")
stock_quantity = input("Enter Product Stock Quantity: ")
supplier_id = input("Enter Supplier ID: ")
new_product = {
'Product_ID': product_id,
'Product_Name': product_name,
'Category': category,
'Price': price,
'Stock_Quantity': stock_quantity,
'Supplier_ID': supplier_id
}
add_new_product(products, new_product)
print("Product added successfully!")
new_sale = {
'Sale_ID': sale_id,
'Product_ID': product_id,
'Customer_ID': customer_id,
'Quantity_Sold': str(quantity_sold),
'Sale_Date': sale_date,
'Total_Price': total_price
}
record_sale(sales, new_sale)
print("Sale recorded successfully!")
new_supplier = {
'Supplier_ID': supplier_id,
'Supplier_Name': supplier_name,
'Contact_Info': contact_info,
'Address': address
}
add_new_supplier(suppliers, new_supplier)
print("Supplier added successfully!")
else:
print("Invalid choice. Please try again.")