A dual-interface invoice generator that lets you:
- Create invoices from a clean Tkinter desktop GUI (
invoice_generator.py). - Produce the same professional PDF invoices from a Flask web app (
invoice-app).
Both interfaces render the final invoice with ReportLab, embed a QR code containing GST details, and follow an Indian GST layout.
โข Add unlimited line-items with description, HSN, quantity, rate & GST%.
โข Auto-calculates CGST, SGST and grand totals.
โข Produces high-resolution PDF invoices on-the-fly.
โข Company branding (logo, address, GSTIN) is fully configurable.
โข Embeds machine-readable QR code with invoice meta.
โข Works completely offline; no external services required.
A professional invoice generation system with both Desktop (Tkinter) and Web (Flask) interfaces, designed specifically for Indian GST compliance with QR code support.
- ๐ฅ๏ธ Dual Interface: Choose between desktop or web interface
- ๐งพ GST Compliant: Automatically calculates CGST & SGST
- ๐ PDF Generation: Professional invoice generation with ReportLab
- ๐ QR Code: Embeds invoice details in QR code
- ๐พ Database: MySQL integration for data persistence
- ๐ Built with Python 3.8+
- ๐ Web interface powered by Flask
- ๐ฝ MySQL database for data storage
- ๐จ Clean, responsive UI
- ๐ Secure data handling
Bill-Generation-Using-Python/
โ
โโโ invoice-app/ # Flask web application
โ โโโ app.py # Main application file with routes and logic
โ โโโ requirements.txt # Python dependencies
โ โโโ config.py # Configuration settings
โ โ
โ โโโ static/ # Static files
โ โ โโโ css/ # CSS stylesheets
โ โ โโโ js/ # JavaScript files
โ โ โโโ images/ # Image assets
โ โ
โ โโโ templates/ # HTML templates
โ โโโ base.html # Base template
โ โโโ index.html # Main page
โ โโโ partials/ # Reusable template components
โ
โโโ invoice_generator.py # Desktop GUI application
โโโ requirements.txt # Main project dependencies
โโโ README.md # Project documentation
- Python 3.8 or higher
- MySQL Server 8.0+
- pip (Python package manager)
-
Clone the repository
git clone https://github.com/yourusername/invoice-generator.git cd invoice-generator -
Set up a virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Configure the database
- Create a MySQL database
- Update the database configuration in
config.py - Initialize the database:
flask init-db
-
Run the application
- For web interface:
cd invoice-app flask run - For desktop interface:
python invoice_generator.py
- For web interface:
Access the web interface at http://localhost:5000
- ๐ฑ Responsive design
- ๐ Real-time calculations
- ๐พ Auto-save functionality
- ๐ค PDF download
Run invoice_generator.py to launch the desktop application.
- ๐ฑ๏ธ Native look and feel
- โก Fast performance
- ๐พ Local data storage
- ๐จ๏ธ Direct printing support
Edit config.py to customize:
- Company details
- GST rates
- Database connection
- Application settings
- Upload your code to PythonAnywhere
- Set up a new web app
- Configure the database
- Set environment variables
- Install dependencies
- Initialize the database
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please read our contributing guidelines to get started.
For support, email ayinalakoteswararao@gmail.com or open an issue in the GitHub repository.