from tkinter import *
root = Tk()
root.geometry("450x550")
root.resizable(0, 0)
root.config(bg="#0543a6")
root.title("Modelo de Springate")
def app():
ac = Activos_circulantes.get()
pc = Passivos_Circulantes.get()
pt = passivo_total.get()
v = vendas.get()
l = lucros.get()
working_capital = ac - pc
net_worth = l
total_assets = net_worth + pt
zeta_score = 3.3 * (working_capital / total_assets) + 0.99 * (working_capital / v)
zeta_scorearr = round(zeta_score,2)
mensagem = f"ZETA Score: {zeta_scorearr}"
resultado.set(mensagem)
def limpar():
Activos_circulantes_entrada.delete(0, END)
Passivos_Circulantes_entrada.delete(0, END)
passivo_total_entrada.delete(0, END)
lucros_entrada.delete(0, END)
vendas_entrada.delete(0, END)
resultado.set("")
titulo = Label(text="Modelo de Springate", font=("Arial", "30", "bold"),bg="#0543a6",fg="#e4e9f2")
titulo.place(relx=0.05, rely=0.05)
texto_sub1 = Label(text="Activos circulantes :",
font=("Arial", "15", "bold"),bg="#0543a6",fg="#e4e9f2")
texto_sub1.place(relx=0.1, rely=0.2)
texto_sub2 = Label(text="Passivos Circulantes :",
font=("Arial", "15", "bold"),bg="#0543a6",fg="#e4e9f2")
texto_sub2.place(relx=0.05, rely=0.3)
texto_sub3 = Label(text="Passivo Total :",
font=("Arial", "15", "bold"),bg="#0543a6",fg="#e4e9f2")
texto_sub3.place(relx=0.2, rely=0.4)
texto_sub4 = Label(text="Lucros Retidos :",
font=("Arial", "15", "bold"),bg="#0543a6",fg="#e4e9f2")
texto_sub4.place(relx=0.18, rely=0.5)
texto_sub5 = Label(text="Vendas :",
font=("Arial", "15", "bold"),bg="#0543a6",fg="#e4e9f2")
texto_sub5.place(relx=0.33, rely=0.6)
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.55, rely=0.2, relwidth=0.3)
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.55, rely=0.3, relwidth=0.3)
passivo_total = DoubleVar()
passivo_total_entrada = Entry(textvariable=passivo_total,
font=("Arial", "12", "bold"),
bg="white", fg="blue", justify='center')
passivo_total_entrada.place(relx=0.55, rely=0.4, relwidth=0.3)
lucros = DoubleVar()
lucros_entrada = Entry(textvariable=lucros,
font=("Arial", "12", "bold"),
bg="white", fg="blue", justify='center')
lucros_entrada.place(relx=0.55, rely=0.5, relwidth=0.3)
vendas = DoubleVar()
vendas_entrada = Entry(textvariable=vendas,
font=("Arial", "12", "bold"),
bg="white", fg="blue", justify='center')
vendas_entrada.place(relx=0.55, rely=0.6, relwidth=0.3)
but1 = Button(text="Verificar", bd=2, bg='#107db2', fg='white',
font=('verdana', 12, 'bold'), command=app)
but1.place(relx=0.05, rely=0.7, 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.7, 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.7, 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.85, relwidth=0.9,relheight=0.1)
root.mainloop()