The Point of sales System is developed using python. The project is built to manage items and transactions. To make a new transaction, fields such as: Item , qty and payment needs to be selected. If you like to learn point of sales systems step by step, this is the right place.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | from tkinter import * from tkinter import ttk def print(): tott = float(totText.get()) top = Toplevel() top.geometry("300x300") top.config(bg="white") l = Label(top, text='---------RECIEPT----------') l.pack() l.config(bg="white") heading = Label(top, text='\tItem\tPRICE\tQTY\tTOTAL') heading.pack() heading.config(bg="white") for child in listBox.get_children(): item = (listBox.item(child, 'values')[0]) price = float(listBox.item(child, 'values')[1]) qty = float(listBox.item(child, 'values')[2]) tot = float(listBox.item(child, 'values')[3]) item1 = Label(top, text=f'{item}\t{price}\t{qty}\t{tot}') item1.config(bg="white") item1.pack() tot = Label(top, text=f'Total\t{tott}') tot.config(bg="white") tot.pack() def show(): tot = 0 if (var1.get()): price = int(e1.get()) qty = int(e6.get()) tot = int(price * qty) tempList = [['Coca Cola', e1.get(), e6.get(), tot]] tempList.sort(key=lambda e: e[1], reverse=True) for i, (item, price, qty, tot) in enumerate(tempList, start=1): listBox.insert("", "end", values=(item, price, qty, tot)) if (var2.get()): price = int(e2.get()) qty = int(e7.get()) tot = int(price * qty) tempList = [['Bun', e2.get(), e7.get(), tot]] tempList.sort(key=lambda e: e[1], reverse=True) for i, (item, price, qty, tot) in enumerate(tempList, start=1): listBox.insert("", "end", values=(item, price, qty, tot)) if (var3.get()): price = int(e3.get()) qty = int(e8.get()) tot = int(price * qty) tempList = [['Chicken Fry', e3.get(), e8.get(), tot]] tempList.sort(key=lambda e: e[1], reverse=True) for i, (item, price, qty, tot) in enumerate(tempList, start=1): listBox.insert("", "end", values=(item, price, qty, tot)) if (var4.get()): price = int(e4.get()) qty = int(e9.get()) tot = int(price * qty) tempList = [['Roll', e4.get(), e9.get(), tot]] tempList.sort(key=lambda e: e[1], reverse=True) for i, (item, price, qty, tot) in enumerate(tempList, start=1): listBox.insert("", "end", values=(item, price, qty, tot)) if (var5.get()): price = int(e5.get()) qty = int(e10.get()) tot = int(price * qty) tempList = [['Fish Fried Rice', e5.get(), e10.get(), tot]] tempList.sort(key=lambda e: e[1], reverse=True) for i, (item, price, qty, tot) in enumerate(tempList, start=1): listBox.insert("", "end", values=(item, price, qty, tot)) sum1 = 0.0 for child in listBox.get_children(): sum1 += float(listBox.item(child, 'values')[3]) totText.set(sum1) root = Tk() root.title("Bill Print Inventory System using Python") root.geometry("1000x600") global e1 global e2 global e3 global e4 global totText global balText totText = StringVar() balText = IntVar() Label(root, text="Bill Print Inventory System using Python", font="arial 22 bold" ,bg="white").place(x=5, y=10) var1 = IntVar() Checkbutton(root, text="Coca Cola", variable=var1).place(x=10, y=50) var2 = IntVar() Checkbutton(root, text="Bun", variable=var2).place(x=10, y=80) var3 = IntVar() Checkbutton(root, text="Chicken Fry", variable=var3).place(x=10, y=110) var4 = IntVar() Checkbutton(root, text="Roll", variable=var4).place(x=10, y=140) var5 = IntVar() Checkbutton(root, text=" Fish Fried Rice ", variable=var5).place(x=10, y=170) Label(root, text="Total").place(x=600, y=10) e1 = Entry(root) e1.place(x=140, y=50) e2 = Entry(root) e2.place(x=140, y=80) e3 = Entry(root) e3.place(x=140, y=110) e4 = Entry(root) e4.place(x=140, y=140) e5 = Entry(root) e5.place(x=140, y=170) e6 = Entry(root) e6.place(x=300, y=50) e7 = Entry(root) e7.place(x=300, y=80) e8 = Entry(root) e8.place(x=300, y=110) e9 = Entry(root) e9.place(x=300, y=140) e10 = Entry(root) e10.place(x=300, y=170) tot = Label(root, text="", font="arial 22 bold", textvariable=totText) tot.place(x=650, y=10) Button(root, text="Add", command=show, height=3, width=13).place(x=10, y=220) Button(root, text="Print", command=print, height=3, width=13).place(x=850, y=120) cols = ('item', 'price', 'qty', 'total') listBox = ttk.Treeview(root, columns=cols, show='headings') for col in cols: listBox.heading(col, text=col) listBox.grid(row=1, column=0, columnspan=2) listBox.place(x=10, y=300) root.mainloop() |
after calculating the total Print receipt will be released.
I have attached the video tutorial below it will help you to do this step by step.