Liquidez Imediata

from tkinter import *
root = Tk()
root.geometry("400x500")
root.resizable(0, 0)
root.config(bg="#024a73")
root.title("Liquidez Imediata")
titulo = Label(text="Liquidez Imediata",
font=("Arial", "33", "bold"),bg="#024a73",fg="#1ea1eb")
titulo.place(relx=0.05, rely=0.05)
texto_sub1 = Label(text="Activos Circulantes :",
font=("Arial", "15", "bold"),bg="#024a73",fg="#1ea1eb")
texto_sub1.place(relx=0.05, rely=0.25)

Activos_Circulantes = DoubleVar()
Activos_Circulantes_entrada = Entry(textvariable=Activos_Circulantes,
font=("Arial", "12", "bold"),
bg="white", fg="blue", justify='center')
Activos_Circulantes_entrada.place(relx=0.6, rely=0.25, relwidth=0.33)
texto_sub2 = Label(text="Passivos Circulantes :",
font=("Arial", "15", "bold"),bg="#024a73",fg="#1ea1eb")
texto_sub2.place(relx=0.05, rely=0.4)

Passivos_Circulantes = DoubleVar()
Passivos_Circulantes_entrada = Entry(textvariable=Passivos_Circulantes,
font=("Arial", "12", "bold"),
bg="white", fg="blue", justify='center')
Passivos_Circulantes_entrada.place(relx=0.6, rely=0.4, relwidth=0.33)

texto_sub3 = Label(text="Stock :",
font=("Arial", "15", "bold"),bg="#024a73",fg="#1ea1eb")
texto_sub3.place(relx=0.4, rely=0.55)

Stock = DoubleVar()
Stock_entrada = Entry(textvariable=Stock,
font=("Arial", "12", "bold"),
bg="white", fg="blue", justify='center')
Stock_entrada.place(relx=0.6, rely=0.55, relwidth=0.33)
def app():
pc = Passivos_Circulantes.get()
ac = Activos_Circulantes.get()
s = Stock.get()
ativos_liquidos = ac - s
quick_ratio = ativos_liquidos / pc
mensagem = f"Índice de Liquidez Imediata: {quick_ratio:.2f}"
resultado.set(mensagem)


def limpar():
Stock_entrada.delete(0, END)
Passivos_Circulantes_entrada.delete(0, END)
Activos_Circulantes_entrada.delete(0, END)
resultado.set("")

but1 = Button(text="Verificar", bd=2, bg='#107db2', fg='white',
font=('verdana', 12, 'bold'), command=app)
but1.place(relx=0.05, rely=0.65, relwidth=0.25, relheight=0.1)
but_limpar = Button(text="Limpar", bd=2, bg='#107db2', fg='white',
font=('verdana', 12, 'bold'), command=limpar)
but_limpar.place(relx=0.35, rely=0.65, relwidth=0.25, relheight=0.1)

but_sair = Button(text="Sair", bd=2, bg='#107db2', fg='white',
font=('verdana', 12, 'bold'), command=root.destroy)
but_sair.place(relx=0.65, rely=0.65, relwidth=0.25, relheight=0.1)

resultado = StringVar()
resultado_texto = Label(textvariable=resultado,
font=("Arial", 12, "bold"), bg="#cfe2f3")
resultado_texto.place(relx=0.05, rely=0.8, relwidth=0.9,relheight=0.15)
root.mainloop()

Comentários

Mensagens populares deste blogue

Criar Cartões de Visita

12 signos egípcios

Análise de Probabilidades