Skip to content

Commit bf9b7c8

Browse files
Add files via upload
1 parent c68bbb3 commit bf9b7c8

File tree

3 files changed

+79
-0
lines changed

3 files changed

+79
-0
lines changed

2 - Budget Generator/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Automated Budgeting in Python
2+
3+
This Python project offers an efficient solution for the automated generation of budgets, now with a user-friendly graphical interface. By entering essential project information, such as description, estimated hours, hourly rate, and deadline, the program automatically calculates the total project value. Additionally, the system creates a visually appealing PDF document summarizing all this information.
4+
5+
## Features
6+
1. **Simplified Data Entry:** Users provide crucial project details intuitively through an interactive graphical interface.
7+
2. **Automated Calculation:** Based on the entered information, the program automatically calculates the total project value, facilitating cost estimation.
8+
3. **Professional PDF Generation:** Utilizing the FPDF library, the system creates a PDF file containing a visually appealing presentation of the budget, ready to be shared with clients.
9+
10+
## How to Use
11+
1. Download the Windows executable and the template image (you can also create a template in the same format).
12+
2. Run the program and input project details.
13+
3. The program will automatically calculate the total project value.
14+
4. A PDF file will be generated, providing an organized and professional preview of the budget.
15+
16+
This project is a practical solution to automate the budget creation process, saving time and ensuring accuracy in calculations. Ideal for professionals looking to streamline project management and deliver a professional presentation to clients.

2 - Budget Generator/budget.py

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
from tkinter import *
2+
from fpdf import FPDF
3+
import webbrowser
4+
5+
def generate_quote():
6+
description = entry_description.get()
7+
estimated_hours = entry_hours.get()
8+
hourly_rate = entry_hourly_rate.get().replace(",", ".") # Replace commas with dots
9+
deadline = entry_deadline.get()
10+
11+
total_amount = float(estimated_hours) * float(hourly_rate)
12+
13+
# Generating PDF
14+
pdf = FPDF()
15+
pdf.add_page()
16+
pdf.set_font("Arial")
17+
18+
# PDF coordinates/path
19+
pdf.image("template.png", x=0, y=0)
20+
pdf.text(115, 145, description)
21+
pdf.text(115, 160, estimated_hours)
22+
pdf.text(115, 175, hourly_rate)
23+
pdf.text(115, 190, deadline)
24+
pdf.text(115, 205, str(total_amount))
25+
26+
pdf_file_path = "Quote.pdf"
27+
pdf.output(pdf_file_path)
28+
print("Quote generated successfully")
29+
30+
# Open the file in the web browser
31+
webbrowser.open(pdf_file_path)
32+
33+
# Configuring the graphical interface
34+
root = Tk()
35+
root.title("Quote Generator")
36+
37+
# Increasing the window size
38+
root.geometry("600x400")
39+
40+
label_description = Label(root, text="Project description:", font=("Arial", 12))
41+
label_description.grid(row=0, column=0, pady=10, padx=10)
42+
entry_description = Entry(root, font=("Arial", 12))
43+
entry_description.grid(row=0, column=1, pady=10, padx=10)
44+
45+
label_hours = Label(root, text="Estimated hours:", font=("Arial", 12))
46+
label_hours.grid(row=1, column=0, pady=10, padx=10)
47+
entry_hours = Entry(root, font=("Arial", 12))
48+
entry_hours.grid(row=1, column=1, pady=10, padx=10)
49+
50+
label_hourly_rate = Label(root, text="Hourly rate:", font=("Arial", 12))
51+
label_hourly_rate.grid(row=2, column=0, pady=10, padx=10)
52+
entry_hourly_rate = Entry(root, font=("Arial", 12))
53+
entry_hourly_rate.grid(row=2, column=1, pady=10, padx=10)
54+
55+
label_deadline = Label(root, text="Estimated deadline in days:", font=("Arial", 12))
56+
label_deadline.grid(row=3, column=0, pady=10, padx=10)
57+
entry_deadline = Entry(root, font=("Arial", 12))
58+
entry_deadline.grid(row=3, column=1, pady=10, padx=10)
59+
60+
button_generate = Button(root, text="Generate Quote", command=generate_quote, font=("Arial", 12))
61+
button_generate.grid(row=4, columnspan=2, pady=20)
62+
63+
root.mainloop()

2 - Budget Generator/template.png

35.9 KB
Loading

0 commit comments

Comments
 (0)