Я пытаюсь создать систему управления рестораном, которую я разработал для продуктов и других услуг, чтобы они отображались в кнопках, чтобы одна кнопка всегда сохраняла название кнопки и количество нажатий в текстовом поле (квитанция). Это будет выглядеть так:

Моя проблема заключается в том, как получить текст кнопки, сгенерированный циклом for и вставить ее в текстовое поле
Это часть моего кода:
def readbreakfast(): #this reads food names from database
cur.execute("SELECT name FROM breakfast")
return cur.fetchall()
def showbreakfast(): #this reads names into buttons
global name
data1 = readbreakfast()
for index, dat in enumerate(data1):
name= ttk.Button(master, text=dat[0],command=lambda row=index+1:update_count(row))
name.grid(row=index+1, column=0,padx=0, pady=0)
def update_count(value): #this gets button name and number of clicks
global bttn,bttn_clicks,my_text
my_text=StringVar()
my_text = dat.cget('text')
bttn_clicks += 1
bttn = IntVar()
global variable
variable = value
print(update_count)
def Receipt(): #text of the button that is clicked is to insert here
txtReceipt.delete("1.0", END)
x = random.randint(10908, 500876)
randomRef = str(x)
Receipt_Ref.set("BILL" + randomRef)
txtReceipt.insert(END, 'Receipt Ref: \t\t\t'+Receipt_Ref.get()+"\t\t"+DateofOrder.get()+"\n")
txtReceipt.insert(END, 'Items\t\t'+'Quantity\t\t\t'+"Price \n\n")
if variable == 1:
txtReceipt.insert(END, str(my_text)+'\t\t'+str(bttn_clicks)+'\t\t\t'+""+str(bttn_clicks*3)+"\n")
if variable == 2:
txtReceipt.insert(END, str(my_text)+'\t\t'+str(bttn_clicks)+'\t\t\t'+""+str(bttn_clicks*3)+"\n")
I have found different code examples but nothing specific enough to implement into my program. Any advice is much appreciated!