A Python-based GUI application for creating and managing invoices, built using tkinter
, ReportLab
, and SQLite3
. This project is designed to streamline the process of generating professional invoices, maintaining a database of invoicing companies, clients, and invoices. This app is also completely local, so no worries about a server being compromised in a faraway land with a company that "apologizes" for data leaks the size of a supermassive black hole.
Of course, there may be bugs, and I would be happy to fix them if you let me know, or if you're really generous and fix them yourself :)
I hope this tool is useful, and saves you the headache of making invoices. If you are unfamiliar with Python, then I made a .exe version of the application to be used as an end user.
This repository is set up to automatically generate an .exe
file for this project using GitHub Actions. You can download the executable directly from the repository without needing to manually run any packaging tools. Here's how:
-
Go to the Actions Tab
- Navigate to the Actions tab in this GitHub repository.
-
Select the Latest Workflow Run
- Find the most recent workflow run triggered by a push or pull request to the
main
branch. - Click on the workflow name (e.g., "Build EXE").
- Find the most recent workflow run triggered by a push or pull request to the
-
Download the Artifact
- Scroll down to the Artifacts section in the workflow summary.
- You’ll find a downloadable artifact named
python-app-exe
(or a similar name). - Click on it to download the
.exe
file.
-
Run the
.exe
File- Extract the
.exe
file (if needed). - Double-click the
.exe
file to run the application. No additional setup is required.
- Extract the
- The
.exe
file is built usingpyinstaller
to ensure it works as a standalone executable on Windows systems. - If you encounter issues or need the application for a different platform, feel free to open an issue in the repository.
- Add, edit, and manage invoicing companies and client details.
- Generate detailed invoices in PDF format.
- Maintain a history of invoices with options to mark invoices as erroneous.
- Modern GUI designed using
ttkbootstrap
for enhanced aesthetics. - Scrollable sections to manage long forms and itemized invoices.
- Automatic calculation of totals, including VAT.
- Use
SQLite3
to store and retrieve invoicing company and client information. - Maintain a history of generated invoices.
- Dynamically calculated prices and totals.
- VAT exemption toggle.
- Error handling and logging.
- Python 3.10 or higher
tkinter
ttkbootstrap
ReportLab
SQLite3
Install dependencies using the following command:
pip install -r requirements.txt
.
├── main.py # Entry point for the application
├── gui.py # GUI implementation using tkinter and ttkbootstrap
├── invoice.py # Invoice generation logic using ReportLab
├── database.py # SQLite3 database integration
├── utils.py # Utility functions
├── invoice_app.db # SQLite3 database (auto-generated on first run)
├── invoice_app.log # Log file for error tracking
├── requirements.txt # Dependencies for the project
└── README.md # Project documentation
- Clone the repository:
git clone https://github.com/your-username/invoice-generator.git
cd invoice-generator
- Install required dependencies:
pip install -r requirements.txt
- Run the application:
python main.py
- Click on "Add Invoicing Company".
- Enter the company's details (e.g., KVK number, VAT number, etc.) in the prompted dialog.
- Save the details to populate the dropdown menu.
- Click on "Add Client Company".
- Enter the client's name and address in the prompted dialog.
- Save the details to populate the dropdown menu.
- Select an invoicing company and client.
- Fill in the invoice metadata (e.g., invoice number, date, reference).
- Add items to the invoice with descriptions, hours, and prices.
- Click on "Generate Invoice" to create a PDF and save the details to the database.
- Click on "View Invoices".
- Browse the list of invoices for the selected company.
- Mark invoices as erroneous or unmark them as needed.
To add more fields to the invoice:
- Update the
gui.py
file to include the new field in the GUI. - Update the
invoice.py
file to include the field in the PDF generation. - Modify the database schema in
database.py
to store the additional data.
You can customize the GUI theme by changing the ttkbootstrap
style in gui.py
:
self.style = ttk.Style("cosmo") # Replace "cosmo" with a preferred style
If you want to use the application without requiring Python installation, you can package it as an executable using pyinstaller
:
- Install
pyinstaller
:
pip install pyinstaller
- Create the executable:
pyinstaller --onefile --noconsole main.py
- The executable will be located in the
dist
folder. Share this file with users who can run the application without installing Python.
- Multi-language support for invoices (let's be real, Dutch would probably be the only other language added).
- A better GUI (Python may not have been the right choice for this).
- Tax calculation and management for each of your companies.
- Integration with email to directly send invoices and keep track of them in your local database.
- Role-based access for multiple users.
Feel free to pick up any one you think would be the most helpful and contribute! They are not listed in any particular order of importance.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add feature-name"
- Push to your branch:
git push origin feature-name
- Create a pull request.
This project is licensed under the GNU GPL License. See the LICENSE file for details.
- ttkbootstrap for the modern tkinter themes.
- ReportLab for PDF generation.
- Darsh Modi
Feel free to reach out for feedback or questions!