Welcome to the Billing System! This terminal-based application is designed to efficiently manage users, products, transactions, and inventory. It includes role-based access control, ensuring that regular users and admins have access to appropriate functionalities. Built using Python and MySQL, this system is both robust and easy to use.
- 👤 View Profile: Access your personal profile information.
- 🛍️ View Products: Browse the list of available products.
- 🧾 Generate Bill: Create bills for your purchases.
- 📄 View Transactions: Review your transaction history.
- 🚪 Logout: Securely log out of the system.
- 👤 View Profile: Access your personal profile information.
- 🛍️ View Products: Browse the list of available products.
- 🧾 Generate Bill: Create bills for purchases.
- 📄 View Transactions: Review your transaction history.
- 🚪 Logout: Securely log out of the system.
- 👥 View Users: See the list of all users.
- ➕ Add Product: Add new products to the inventory.
- ✏️ Update Product: Update details of existing products.
- ❌ Delete Product: Remove products from the inventory.
- 🔍 View All Transactions: View all user transactions.
- 🔔 Inventory Notification: Get alerts for low inventory.
- 📊 Generate Sales Report: Generate reports on sales.
- 📝 Generate User Activity Report: Generate reports on user activities.
- 📦 Generate Inventory Report: Generate reports on inventory status.
- 🔎 Search and Filter Products: Search and filter the product list.
- 🔍 Search and Filter Transactions: Search and filter transactions.
billing_system/
│
├── main.py
├── auth.py
├── user.py
├── product.py
├── transaction.py
├── report.py
├── inventory.py
└── search_filter.py
-
Clone the repository:
git clone https://github.com/your-username/billing_system.git cd billing_system
-
Install dependencies:
pip install tabulate mysql-connector-python
-
Set up the database: Create a MySQL database named billing_system and create the required tables using the following SQL commands:
CREATE DATABASE IF NOT EXISTS billing_system; USE billing_system; CREATE TABLE IF NOT EXISTS users ( id INT AUTO_INCREMENT PRIMARY KEY, username VARCHAR(255) UNIQUE, password TEXT, name TEXT, address TEXT, age INT, role TEXT DEFAULT 'user' ); CREATE TABLE IF NOT EXISTS products ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) UNIQUE, price FLOAT, description TEXT, category TEXT, quantity INT DEFAULT 0 ); CREATE TABLE IF NOT EXISTS transactions ( id INT AUTO_INCREMENT PRIMARY KEY, user_id INT, product_id INT, quantity INT, date DATETIME, FOREIGN KEY(user_id) REFERENCES users(id), FOREIGN KEY(product_id) REFERENCES products(id) );
- Run the application:
python main.py
-
Login or Register: Upon running the application, you will be prompted to login or register as a new user.
-
User Menu: Based on your role (user or admin), you will be presented with a menu of options.
This is the entry point of the application. It contains the main
function which handles user login and redirects to the appropriate menu based on the user's role.
Contains authentication functions for user login and registration.
Handles user-related functionalities, including viewing the user profile, viewing products, generating bills, viewing transactions, and user menu options. It imports necessary functions from other modules.
Manages product-related functionalities, including viewing, adding, updating, and deleting products.
Manages transaction-related functionalities, including generating bills and viewing transactions.
Generates various reports, such as sales reports and user activity reports.
Handles inventory-related functionalities, including inventory notifications and generating inventory reports. It includes an SMTP integration to automatically send email notifications when product stock falls below or equals 5.
Provides search and filter functionalities for products and transactions.
📜 License
This project is licensed under the MIT License. See the LICENSE file for details.
- This project utilizes the tabulate library for displaying data in tabular format.