This is a Python-based desktop application that allows users to generate professional invoices or quotations in PDF format using either a Graphical User Interface or a Command Line Interface. The system supports customer input, itemized billing, automatic calculations, watermarking (INVOICE/QUOTATION, PAID/UNPAID), and stores all records in a MySQL database.
- Dual Interface: Use either GUI (
GUI_app.py
viatkinter
) or CLI (CLI_main.py
) - Auto-formatted PDF invoices with watermarking
- Dynamic Discount and Tax (Flat or % based)
- Data Persistence with MySQL using
mysql-connector-python
andpymysql
- Company Logo and Watermark Support
- Invoices folder to store generated PDFs
- GUI preview image (
GUI.png
)
├── invoices/ # Folder for generated PDFs
├── connect_db.py # Utility to connect with MySQL
├── db_connect.py # Alternate DB connection script
├── input_collect.py # Collects input from user (CLI)
├── invoice_generator.py # Generates and exports the PDF
├── GUI_app.py # GUI application using tkinter
├── CLI_main.py # CLI version of the application
├── Dummy_logo.png # Logo used in PDF
├── GUI.png # Screenshot of the GUI
├── invoice_system.sql # Main DB schema
├── dumb_db/ # Folder containing exported DB dump
├── requirements.txt # List of Python dependencies
└── README.md # This file
Install the following dependencies using pip:
pip install -r requirements.txt
Dependencies:
fpdf
pymysql
tkinter
(usually pre-installed)
-
Start your MySQL server.
-
Import the database:
mysql -u root -p < invoice_system.sql
Or use the exported dump inside the dumb_db/
folder.
python GUI_app.py
python CLI_main.py
- Customer Name, Phone, Address, Date
- Invoice/Quotation Number
- Item(s) with Quantity, Description, Unit Price
- Discount (flat or %)
- Tax (%)
- Notes (e.g., Please pay within 15 days)
- Watermark: Invoice/Quotation, Paid/Unpaid
- PDF file saved to
/invoices
folder - Stored in MySQL DB
Here is a sample preview of an invoice generated by the system:
invoice_system.sql creates:
invoices
tableinvoice_items
table as shown below:
- Stores all generated data including file paths
This project is licensed under the MIT License.
This project is complete and working as expected. Suggestions and improvements are welcome!