from tkinter import *
root = Tk()
root.geometry("500x550")
root.resizable(0, 0)
root.config(bg="#193285")
root.title("Fluxo de Caixa Livre para a Empresa ")
titulo = Label(text="Fluxo de Caixa Livre para a Empresa ",
font=("Arial", "19", "bold"),bg="#193285",fg="#1aa6ab")
titulo.place(relx=0.05, rely=0.05)
texto_sub1 = Label(text="Lucro Líquido :",
font=("Arial", "15", "bold"),bg="#193285",fg="#1aa6ab")
texto_sub1.place(relx=0.31, rely=0.15)
texto_sub2 = Label(text="Depreciação :",
font=("Arial", "15", "bold"),bg="#193285",fg="#1aa6ab")
texto_sub2.place(relx=0.35, rely=0.25)
texto_sub3 = Label(text="Variação no Fundo de Maneio :",
font=("Arial", "14", "bold"),bg="#193285",fg="#1aa6ab")
texto_sub3.place(relx=0.05, rely=0.35)
texto_sub4 = Label(text="Investimentos em Activos Fixos :",
font=("Arial", "14", "bold"),bg="#193285",fg="#1aa6ab")
texto_sub4.place(relx=0.05, rely=0.45)
texto_sub5 = Label(text="Endividamento Novo :",
font=("Arial", "14", "bold"),bg="#193285",fg="#1aa6ab")
texto_sub5.place(relx=0.2, rely=0.55)
texto_sub6 = Label(text="Pagamento de Dívidas :",
font=("Arial", "14", "bold"),bg="#193285",fg="#1aa6ab")
texto_sub6.place(relx=0.2, rely=0.65)
Lucro_Líquido = DoubleVar()
Lucro_Líquido_entrada = Entry(textvariable=Lucro_Líquido,
font=("Arial", "12", "bold"),
bg="white", fg="blue", justify='center')
Lucro_Líquido_entrada.place(relx=0.65, rely=0.15, relwidth=0.3)
Depreciação = DoubleVar()
Depreciação_entrada = Entry(textvariable=Depreciação,
font=("Arial", "12", "bold"),
bg="white", fg="blue", justify='center')
Depreciação_entrada.place(relx=0.65, rely=0.25, relwidth=0.3)
Fundo_Maneio = DoubleVar()
Fundo_Maneio_entrada = Entry(textvariable=Fundo_Maneio,
font=("Arial", "12", "bold"),
bg="white", fg="blue", justify='center')
Fundo_Maneio_entrada.place(relx=0.65, rely=0.35, relwidth=0.3)
Activos_Fixos = DoubleVar()
Activos_Fixos_entrada = Entry(textvariable=Activos_Fixos,
font=("Arial", "12", "bold"),
bg="white", fg="blue", justify='center')
Activos_Fixos_entrada.place(relx=0.65, rely=0.45, relwidth=0.3)
Endividamento_Novo = DoubleVar()
Endividamento_Novo_entrada = Entry(textvariable=Endividamento_Novo,
font=("Arial", "12", "bold"),
bg="white", fg="blue", justify='center')
Endividamento_Novo_entrada.place(relx=0.65, rely=0.55, relwidth=0.3)
Pagamento_dívidas = DoubleVar()
Pagamento_dívidas_entrada = Entry(textvariable=Pagamento_dívidas,
font=("Arial", "12", "bold"),
bg="white", fg="blue", justify='center')
Pagamento_dívidas_entrada.place(relx=0.65, rely=0.65, relwidth=0.3)
def limpar():
Pagamento_dívidas_entrada.delete(0, END)
Endividamento_Novo_entrada.delete(0, END)
Activos_Fixos_entrada.delete(0, END)
Fundo_Maneio_entrada.delete(0, END)
Depreciação_entrada.delete(0, END)
Lucro_Líquido_entrada.delete(0, END)
resultado.set("")
def app():
l_liquido= Lucro_Líquido.get()
pagamento=Pagamento_dívidas.get()
endividamento =Endividamento_Novo.get()
activo_fixo =Activos_Fixos.get()
dep= Depreciação.get()
caixa =Fundo_Maneio.get()
FCFE = l_liquido +dep -caixa -activo_fixo+endividamento-pagamento
resultado.set(f"FCFE: {FCFE:.2f}")
#FCFE= Lucro Líquido + Depreciação -Variação no Capital de Giro -
# Investimentos em Ativos Fixos+Endividamento Novo-Pagamento de Dívidas
resultado.set(FCFE)
but1 = Button(text="Calcular", bd=2, bg='#107db2', fg='white',
font=('verdana', 12, 'bold'), command=app)
but1.place(relx=0.05, rely=0.73, relwidth=0.25, relheight=0.05)
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.73, relwidth=0.25, relheight=0.05)
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.73, relwidth=0.25, relheight=0.05)
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()