No video

Python Invoice Generator tutorial for beginners - Python GUI Automation project [resume project]

  Рет қаралды 59,973

Code First with Hala

Code First with Hala

Күн бұрын

Build a GUI with Tkinter and automate MS Word with Python. In this tutorial for beginners, we will build an Invoice Generator with Python. Python GUI project and Python automation project for beginners.
Learn how to create a responsive entry form with Tkinter. Use buttons, labels, and entries. Position with the tkinter grid system. Learn Tkinter and Tkinter for GUI design. Learn how to launch and create your first GUI for Python programs and desktop applications.
Automate MS Word with Python and doxtpl. Generate documents from templates with Python.
In this tutorial, you will learn how to use Tkinter and doxtpl to build your Invoice Generator. You will:
- Use doxtpl to automate Word documents with Python
- Generate Word documents with Python
- Create your Python Tkinter application
- Use labels, buttons, entries in Tkinter
- Use combobox, spinbox and checkbox in Tkinter
- learn about positioning in Tkinter: pack() and grid.
- Setup a Tkinter form and use Tkinter input fields.
- Make a responsive interface with Tkinter
- Add messagebox in Tkinter
Source code: github.com/codefirstio/invoic...
For more info:
Install and Setup Tkinter for beginners: • Install and Setup Tkin...
Playlist link: • Tkinter tutorials
Timestamps:
00:00 Introduction and demo
03:40 Generating MS Word docs with Python
16:37 Building the GUI with Tkinter
52:19 Putting it all together
Socials:
My email: code.first.io@gmail.com
Tiktok: / hala.codes
*************
*Tags*
Tkinter tutorial
Tkinter Project
Python GUI Project
Automation Project Python
Python Automation Project
Python Automation Tutorial
Tkinter GUI tutorial
GUI tutorial Python
GUI Project Python
Graphical User Interface Python
Python tutorial
Python Resume Project
Python Automation GUI Project

Пікірлер: 64
@arielspalter7425
@arielspalter7425 Жыл бұрын
This is absolutely amazing tutorial! I started binge watching your channel, you’ve uploaded so much great stuff.
@thedebapriyakar
@thedebapriyakar 6 ай бұрын
I've been binging several of your tkinter videos since I found your channel this morning. Insanely good content, thank you SO MUCH for your efforts.
@bentsionben-david2769
@bentsionben-david2769 Жыл бұрын
Wow you are genious.. i searched this more than half a year 🙏🏻🙏🏻🙏🏻
@alananalyst7795
@alananalyst7795 Жыл бұрын
Hey Hala, I just wanted to thank you for this kind of videos, I am really enjoying them
@leekumkitv3826
@leekumkitv3826 Жыл бұрын
BROTHER, YOU ARE THE BEST!!! You oooh really helped me!! THANK YOU VERY MUCH!
@samfritkin
@samfritkin Жыл бұрын
Amazing, thanks a ton! Your videos are incredibly helpful. For anyone that's interested, I found a way to edit the tree: def delete_item(): selected_item = tree.selection()[0] tree.delete(selected_item) Put this command in for a delete button you create and you should be able to select items from the tree and delete them without having to reset your entire invoice.
@mohdsarim4671
@mohdsarim4671 8 ай бұрын
def Remove_items(): for i in table.selection(): id = i idx = table.index(id) table.delete(id) del invoice_list[idx] i made somethig like this to delete multiple items and also fron the invoice_list too
@pingmetal
@pingmetal 20 күн бұрын
Thank you for the great tutorial. By the way, just note that when you used the module datetime and made it add time to the filename, the last digits were not just seconds. The first digits indicated the hours however using the 24-hour clock format, so as it was 8 PM on your PC, that became the number 20.
@JorgeEscobarMX
@JorgeEscobarMX Жыл бұрын
I actually didn't knew treeview was supposed to be used as a table render widget. I figure it was for showing up file system stuff like files and directories. Thanks for this tkinter tutorial
@LEON-zo7ce
@LEON-zo7ce Жыл бұрын
what a life saver ....... ......thank you🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
@IbrahimDar-nu5tz
@IbrahimDar-nu5tz Жыл бұрын
The stuff which i was looking for.......thanks for sharing!
@dilshanchrishantha6548
@dilshanchrishantha6548 Жыл бұрын
excellent tutorial, well explained, keep moving !!!!
@matthewdamolaojelere6553
@matthewdamolaojelere6553 6 ай бұрын
Every bit of your tutorial is very understable and good, you are good in explaning code
@Harambe_
@Harambe_ 8 ай бұрын
Very helpful, thank you!
@rzvn111
@rzvn111 10 ай бұрын
You are great! Thanks!
@feras5834
@feras5834 Жыл бұрын
Great video.. thank you 🙂
@ntutfitness
@ntutfitness Жыл бұрын
Ilove the all series of template projects. Thanks
@khushbukumari6000
@khushbukumari6000 Жыл бұрын
Thank u so much mam 100% working
@bigrevkev55
@bigrevkev55 8 ай бұрын
Thank you again!!!
@nassimelmasri6515
@nassimelmasri6515 Жыл бұрын
Super Tutorial Thank you Hala
@yahia_nali
@yahia_nali 8 ай бұрын
Macha Allah, you are the best Hala in the world! I mean it.
@fabriciocarranza7044
@fabriciocarranza7044 10 ай бұрын
Great video. I am Learning a lot
@sandrogirolamo
@sandrogirolamo Жыл бұрын
Very good Hala! Your explanation is structured, clear, you have a wonderful voice, your speak is clear like water, have a good pace to understand every word. This reports example is very good. Have you made some report example using sqlite data?
@mukeshkumars9887
@mukeshkumars9887 Жыл бұрын
HI HALA THANK YOU FOR YOUR EFFECT ON THIS VIDEO
@kksfervajali6602
@kksfervajali6602 11 ай бұрын
So Helpful
@migue29movi64
@migue29movi64 9 ай бұрын
You're the best Nala!!!
@lynn7140
@lynn7140 Жыл бұрын
Thanks.❤
@anassportal
@anassportal 7 ай бұрын
Awesome tutorial
@user-ds9ey8pp5h
@user-ds9ey8pp5h Жыл бұрын
This channel will reach 1 million subscribed, I promise 💙
@abuloly2690
@abuloly2690 Жыл бұрын
Nice work girl , amazing project 🎉
@ShadowMindInsights-qk4vc
@ShadowMindInsights-qk4vc 6 ай бұрын
Thank you God bless you mam
@digitalmachine0101
@digitalmachine0101 4 ай бұрын
Good information
@familiezink9098
@familiezink9098 3 ай бұрын
Very nice. Thank you so much for your videos. Greetings from Germany
@fabriciocarranza7044
@fabriciocarranza7044 10 ай бұрын
Thank you.
@samokoth1014
@samokoth1014 3 ай бұрын
Great
@DoctorLyrics97
@DoctorLyrics97 Жыл бұрын
You explained it well. Can you do a video how to save data in to excel file to a format , I created a recipe saving app but I cannot figure out how to save the recipe in to a format. My current version it just saves in to pdf without template , as a chef I am very happy that I was able to created the gui app to that far 😂
@bentsionben-david2769
@bentsionben-david2769 Жыл бұрын
Hi hala its realy amazing this video.. can you please add to it CRUD method like create, search, update, save, delete and print on hard copy? Pleasee, i tried for months and i failed, i think thousands of people want and need it.. please consider it.. thanks 🙏🏻🙏🏻🙏🏻
@thomashart5081
@thomashart5081 6 ай бұрын
Great tutorial. Can you make a video on how to create also a record of the invoices as well as means to conclude which have been payed or not along with the saved invoice. Maybe a database SQLite and have the means to switch between displayed pages depending on which is wanted for viewing at the time.
@logunscott
@logunscott Жыл бұрын
Amazing tutorail Thank you. please is there a way to edit or delete an item in the list?
@lstephen
@lstephen Жыл бұрын
Do you think I can use python to pull data from Google docs once created and then put them into Google sheets of invoice template? and then have it covert to pdf and email to be send? Is this automation process possible?
@user-uy1ev2oe7v
@user-uy1ev2oe7v 3 ай бұрын
Thank you so much for this helpful video, but I have a question as I have tried so much to show for example this word file in the frame in Tkinter, could you please help me with that?
@surendarsingh6228
@surendarsingh6228 Жыл бұрын
where the additem function is add the previous list of invoice_item since we are not using the append ??? please let me know.
@sauer7592
@sauer7592 Жыл бұрын
Hi Hala can you show it with pyside6
@its_code
@its_code Жыл бұрын
😍💗😍💗😍💗😍🤩🤩🤩🤩
@contraplano3157
@contraplano3157 Жыл бұрын
I prefer PysimpleGui, for this one will be easy make the interface
@gauravmankoo4743
@gauravmankoo4743 Жыл бұрын
Hi, Hala I love ❤❤your videos. I have one request can you please make a video where you use a pdf file instead of a word document. thank you so much this really helped
@walitouseef549
@walitouseef549 Жыл бұрын
Just conevert using doxc2pdf
@enesk3474
@enesk3474 Жыл бұрын
Hi Hala can you show it with pyside6 ? thanks
@solomonezra1253
@solomonezra1253 Жыл бұрын
Hello Hala.. How are you? I have written same line of codes and it’s not updating the values in the.docx file. What might be the problem please and what can I do? Thank you
@kapibara2440
@kapibara2440 4 ай бұрын
Brilliant tutorial ❤❤❤thank you.
@contraplano3157
@contraplano3157 Жыл бұрын
why they do not use the open document format?
@user-ll7tz6kh4d
@user-ll7tz6kh4d 10 ай бұрын
I want to save the generated invoice in pdf form ,What should I do for that?
@kangdesain3922
@kangdesain3922 8 ай бұрын
hi great tutorial, how to make all of this into exe format?
@KeKuHauPiOx
@KeKuHauPiOx Жыл бұрын
Awesome tutorial! Is there a way to put a business logo on this?
@vdeoracle
@vdeoracle 11 ай бұрын
Yes. You can customize the docx template to suit your need.
@dipak_chandra
@dipak_chandra Жыл бұрын
Can you make one more video this. How to create exe file
@BelalAhamdNasery
@BelalAhamdNasery Жыл бұрын
Hi Hala can make Django videos 🙏🏻
@TheRealWattsie
@TheRealWattsie Жыл бұрын
Minor point, your Total should be the SubTotal plus the tax percentage of SubTotal... ie SubTotal $33.5, Tax 10% therefore: Total === $36.85 not $30.12... Unless you were thinking a discount, however a discount should be applied per item not just on total invoice. Cheers.
@kelechikk-xr7xh
@kelechikk-xr7xh 3 ай бұрын
Hi this video tutorial is not bright
@mohdsarim4671
@mohdsarim4671 8 ай бұрын
thanks you so much your videos are amazing i only saw the part of docTemplate working and intro of the video and Tried to made this myself here is the version i made i added 2 extra features like removing the items , saving as a new file to a directory the code is this from customtkinter import * import tkinter.ttk as ttk import tkinter as tk from docxtpl import DocxTemplate import tkinter.filedialog as fd import tkinter.messagebox as tmsg import os root = CTk() set_appearance_mode('dark') root.title("Invoice Generator") root.geometry("800x580") # creating widgets cfont = CTkFont(family="Sans Serif",size=20,weight="bold",) head = CTkLabel(root,text="Invoice Generator",font=cfont) head.place(relx = 0.5,rely =0,anchor = "n") EntriesFrame = CTkFrame(root) EntriesFrame.place(relx = 0,rely = 0.07,relwidth = 1) l1 = CTkLabel(EntriesFrame,text="First Name") l2 = CTkLabel(EntriesFrame,text="Last Name") l3 = CTkLabel(EntriesFrame,text="Phone Number") l4 = CTkLabel(EntriesFrame,text="Qty") l5 = CTkLabel(EntriesFrame,text="Description ") l6 = CTkLabel(EntriesFrame,text="Unit Price") e1 = CTkEntry(EntriesFrame) e2 = CTkEntry(EntriesFrame) e3 = CTkEntry(EntriesFrame) e5 = CTkEntry(EntriesFrame) style = ttk.Style() print(style.theme_names()) style.theme_use("default") style.configure('C.TSpinbox', background ='gray14', arrowcolor ="gray84", foreground="gray84", fieldbackground = "#343638", bordercolor ="yellow", padding = (5,5), arrowsize = 12, selectbackground ="#1f538d", insertwidth = 10 ) qtyvar = IntVar(value=0) spb4 = ttk.Spinbox(EntriesFrame,from_=0,to=100,textvariable=qtyvar,style='C.TSpinbox') unitpricevar = DoubleVar(value=0.00) spb6= ttk.Spinbox(EntriesFrame,from_=0.00,to=5000.00,increment=0.5,textvariable=unitpricevar,style='C.TSpinbox') invoice_list = [] i =0 # function to get the final cost of each item , qty*unitproce def Add_lnTotal(x): linetotal = x[0]*x[2] x.insert(3,linetotal) return x # to Sum the list Elements def sumlist(x): sum = 0 for i in x: sum+=i return sum def calc_subtotal(): global subtotal linetotal = [x[3] for x in invoice_list] subtotal = sum(linetotal) return subtotal # functio to Calculate Tax from String def total_with_tax(t,s): tax_dig = int(t.split('%')[0][:1]) tax = float(f"0.{tax_dig}") return s*tax+s def Calc_Total(): global total total = total_with_tax("10%",calc_subtotal()) def Add_items(): global fname,lname,phone,Desc,i global Qty,UnitPrice,items,invoice_list,linetotal,subtotal,total fname = e1.get() lname = e2.get() phone = e3.get() Desc = e5.get() Qty = qtyvar.get() UnitPrice = unitpricevar.get() # MAKING A 2D INVOICE LIST items = [Qty,Desc,UnitPrice] invoice_list.append(Add_lnTotal(items)) # counting Subtotal & # Caluting Total after including Tax # with one function call Calc_Total() tempdata = Add_lnTotal(items) tempdata.pop() data=tuple(tempdata) table.insert(parent = '',index=i,values=data) i+=1 print(data) print(invoice_list) # print(f"First Name:{fname}, Last Name : {lname}, " # f"Phone Number :{phone}, Description :{Desc}" # f"Qty : {Qty}, Unit Price : {UnitPrice}" # ) def Remove_items(): for i in table.selection(): id = i idx = table.index(id) table.delete(id) del invoice_list[idx] Calc_Total() print(subtotal) print(invoice_list) addbtn = CTkButton(EntriesFrame,text="Add Item",command=Add_items) Removebtn = CTkButton(EntriesFrame,text="Remove Item",command=Remove_items) # making Grids EntriesFrame.columnconfigure((0,1,2),weight=1) EntriesFrame.rowconfigure((0,1,2,3,4),weight=1) # placing widgets l1.grid(row = 0,column = 0) e1.grid(row = 1,column = 0) l2.grid(row = 0,column = 1) e2.grid(row = 1,column = 1) l3.grid(row = 0,column = 2) e3.grid(row = 1,column = 2) l4.grid(row = 2,column = 0) spb4.grid(row =3 ,column = 0) l5.grid(row = 2,column = 1) e5.grid(row = 3,column = 1) l6.grid(row = 2,column = 2) spb6.grid(row = 3,column = 2) addbtn.grid(row= 4 ,column = 1,sticky = "news",padx = 60,pady = 20) Removebtn.grid(row= 4 ,column = 2,sticky = "news",padx = 60,pady = 20) infoFrame = CTkFrame(root,fg_color="gray14",corner_radius=0) style.configure("table.Treeview",fieldbackground = "gray17",foregorund = "white") style.configure("table.Treeview.Heading") table = ttk.Treeview(infoFrame,style = 'table.Treeview',columns=(0,1,2,4),show='headings') table.heading(0,text="QTY") table.heading(1,text="Description") table.heading(2,text="Unit Price") table.heading(3,text="Total") table.place(relx = 0.072,rely = 0.04,relwidth=0.86,relheight = 0.96) infoFrame.place(relx = 0 ,rely = 0.38,relwidth = 1,relheight=0.46) global generate_invoice def generate_invoice(): def write_data(x): doc = DocxTemplate("invoice_template.docx") doc.render({ "name":f"{fname}{lname}", "phone" : phone, "invoice_list":invoice_list, "subtotal":subtotal, "salestax":"10%", "total":total }) doc.save(x) flag = tmsg.askyesno("Create File","Want To Create a New File ?") if flag : fdir = fd.askdirectory( title="Save file To" ) inpd =CTkInputDialog(title="Enter Name",text="Enter The the name of the File") filename = f"{inpd.get_input()}" file_path = f"{fdir}/{filename}.docx" write_data(file_path) tmsg.showinfo("Success",f"Generated At {file_path}") else: file_path = "Records.docx" write_data(file_path) tmsg.showinfo("Success","Your Invoice hava Been Generated Succesfully in Default Directory") frameBtn =CTkFrame(root,fg_color="gray18") btn1 = CTkButton(frameBtn,text="Generate Invoice",command=generate_invoice) btn1.pack(fill=X,pady = 5,padx = 60) btn2 = CTkButton(frameBtn,text="New Invoice") btn2.pack(fill=X,padx = 60,pady =5) frameBtn.place(relx = 0,rely = 0.853,relwidth = 1) root.mainloop()
@destinbrav4903
@destinbrav4903 Жыл бұрын
please guys i'm getting an error at 8minute of the video please help me !!! here is the error : raise PackageNotFoundError( docx.opc.exceptions.PackageNotFoundError: Package not found at 'template.docx' that is the last line of the error
@iioru1829
@iioru1829 8 ай бұрын
did you have the Word template downloaded in your programs files?
@familiezink9098
@familiezink9098 3 ай бұрын
pip install docxtpl
@user-ll7tz6kh4d
@user-ll7tz6kh4d 10 ай бұрын
I want to save the generated invoice in pdf form ,What should I do for that?
Python Tkinter Load Excel Data tutorial [openpyxl, tkinter]
14:22
Code First with Hala
Рет қаралды 19 М.
Create Stunning Python GUIs in 10 Minutes With Drag & Drop
11:38
Coding Is Fun
Рет қаралды 42 М.
小蚂蚁被感动了!火影忍者 #佐助 #家庭
00:54
火影忍者一家
Рет қаралды 44 МЛН
IQ Level: 10000
00:10
Younes Zarou
Рет қаралды 12 МЛН
SPILLED CHOCKY MILK PRANK ON BROTHER 😂 #shorts
00:12
Savage Vlogs
Рет қаралды 13 МЛН
3 PYTHON AUTOMATION PROJECTS FOR BEGINNERS
17:00
Internet Made Coder
Рет қаралды 1,6 МЛН
Use a Drag & Drop Editor to Make Tkinter Python GUI Applications!
11:16
Modern Graphical User Interfaces in Python
11:12
NeuralNine
Рет қаралды 1,5 МЛН
Make Tkinter Look 10x Better in 5 Minutes (CustomTkinter)
4:40
TurbineThree
Рет қаралды 268 М.
小蚂蚁被感动了!火影忍者 #佐助 #家庭
00:54
火影忍者一家
Рет қаралды 44 МЛН