Rácios de Liquez usando Tkinter

from tkinter import *
from tkinter import ttk
import webbrowser
root=Tk()
class Appliquidez():
def __init__(self):
self.root =root
self.tela()
self.frames_da_tela()
self.widgets_frame1()
self.widgets_frame2()
self.Menus()
root.mainloop()
def tela(self):
self.root.title("Liquidez")
self.root.configure(background='#1e3743')
self.root.geometry("1100x500")
self.root.resizable(True, True)
self.root.maxsize(width=900, height=700)
self.root.minsize(width=500, height=400)
def frames_da_tela(self):
self.frame_1 = Frame(self.root, bd=4, bg='#dfe3ee'
, highlightbackground='#759fe6', highlightthickness=2)
self.frame_1.place(relx=0.02, rely=0.02, relwidth=0.96, relheight=0.46)

self.frame_2 = Frame(self.root, bd=4, bg='#dfe3ee'
, highlightbackground='#759fe6', highlightthickness=2)
self.frame_2.place(relx=0.02, rely=0.5, relwidth=0.96, relheight=0.46)
def widgets_frame1(self):
self.abas = ttk.Notebook(self.frame_1)
self.lred = Frame(self.abas)
self.lgeral = Frame(self.abas)

self.lred.configure(background="#dfe3ee")
self.lgeral.configure(background="#dfe3ee")

self.abas.add(self.lred, text="Liquidez reduzida")
self.abas.add(self.lgeral, text="Liquidez geral")
self.abas.place(relx=0, rely=0, relwidth=0.98, relheight=0.98)
#Liquidez reduzida
self.activoc4 = DoubleVar()
self.lb_activoc4 = Label(self.lred, text="Activo Corrente"
, bg='#dfe3ee', fg='#107db2')
self.lb_activoc4.place(relx=0.05, rely=0.05)
self.activoc4_entry = Entry(self.lred, textvariable=self.activoc4)
self.activoc4_entry.place(relx=0.2, rely=0.05, relwidth=0.1)

self.activobio = DoubleVar()
self.lb_activobio = Label(self.lred, text="Ativos Biológicos "
"", bg='#dfe3ee', fg='#107db2')
self.lb_activobio.place(relx=0.45, rely=0.05)
self.activobio_entry = Entry(self.lred, textvariable=self.activobio)
self.activobio_entry.place(relx=0.68, rely=0.05, relwidth=0.1)

self.inventarios = DoubleVar()
self.lb_inventarios = Label(self.lred, text="Inventários",
bg='#dfe3ee', fg='#107db2')
self.lb_inventarios.place(relx=0.05, rely=0.2)
self.inventarios_entry = Entry(self.lred, textvariable=self.inventarios)
self.inventarios_entry.place(relx=0.2, rely=0.2, relwidth=0.1)

self.ativos_naocorrentes = DoubleVar()
self.lb_ativos_naocorrentes = Label(self.lred,
text="Ativos não"
" correntes detidos para venda",
bg='#dfe3ee', fg='#107db2')
self.lb_ativos_naocorrentes.place(relx=0.4, rely=0.2)
self.ativos_naocorrentes_entry = Entry(self.lred, textvariable=self.ativos_naocorrentes)
self.ativos_naocorrentes_entry.place(relx=0.68, rely=0.2, relwidth=0.1)


self.passivoc4 = DoubleVar()
self.lb_passivoc4 = Label(self.lred, text="Passivo Corrente",
bg='#dfe3ee', fg='#107db2')
self.lb_passivoc4.place(relx=0.05, rely=0.4)
self.passivoc4_entry = Entry(self.lred, textvariable=self.passivoc4)
self.passivoc4_entry.place(relx=0.2, rely=0.4, relwidth=0.1)

self.bt_calcular3 = Button(self.lred, text="Calcular", bd=2,
bg='#107db2', fg='white', font=('verdana', 8, 'bold'),
command=self.butaoclick3)
self.bt_calcular3.place(relx=0.3, rely=0.55, relwidth=0.35, relheight=0.15)
self.rlred = StringVar()
self.resultado4 = Label(self.lred, textvariable=self.rlred)
self.resultado4.place(relx=0.68, rely=0.35,relwidth=0.1)
self.lb_lreduzida = Label(self.lred, text="Liquidez Reduzida",
bg='#dfe3ee', fg='#107db2')
self.lb_lreduzida.place(relx=0.45, rely=0.35)

#Liquidez geral
self.activoc2 = DoubleVar()
self.lb_activoc2 = Label(self.lgeral, text="Activo Corrente",
bg='#dfe3ee', fg='#107db2')
self.lb_activoc2.place(relx=0.25, rely=0.05)
self.activoc2_entry = Entry(self.lgeral, textvariable=self.activoc2)
self.activoc2_entry.place(relx=0.4, rely=0.05, relwidth=0.1)

self.passivoc2 = DoubleVar()
self.lb_passivoc2 = Label(self.lgeral, text="Passivo Corrente",
bg='#dfe3ee', fg='#107db2')
self.lb_passivoc2.place(relx=0.25, rely=0.2)
self.passivoc2_entry = Entry(self.lgeral, textvariable=self.passivoc2)
self.passivoc2_entry.place(relx=0.4, rely=0.2, relwidth=0.1)


self.bt_calcular2 = Button(self.lgeral, text="Calcular", bd=2,
bg='#107db2', fg='white', font=('verdana', 8, 'bold'),
command=self.butaoclick2)
self.bt_calcular2.place(relx=0.6, rely=0.15, relwidth=0.2, relheight=0.25)
self.rlg = StringVar()
self.resultado3 = Label(self.lgeral, textvariable=self.rlg)
self.resultado3.place(relx=0.4, rely=0.35,relwidth=0.1)
self.lb_lgeral = Label(self.lgeral, text="Liquidez geral",
bg='#dfe3ee', fg='#107db2')
self.lb_lgeral.place(relx=0.25, rely=0.35)
# Butão para os sites frame 1
self.bt_calcular = Button(self.lred, text="Informação sobre Liquidez Reduzida ", bd=2,
bg='#107db2', fg='white', font=('verdana', 8, 'bold'),
command=self.siteredu)
self.bt_calcular.place(relx=0.2, rely=0.8, relwidth=0.5, relheight=0.15)

self.bt_calcular = Button(self.lgeral, text="Informação sobre Liquidez Geral", bd=2,
bg='#107db2', fg='white', font=('verdana', 8, 'bold'),
command=self.sitelgeral)
self.bt_calcular.place(relx=0.2, rely=0.6, relwidth=0.5, relheight=0.15)

def siteredu(self):
new = 2
url = "http://www.thinkfn.com/wikibolsa/R%C3%A1cio_de_liquidez_reduzida"

webbrowser.open(url, new=new)
def sitelgeral(self):
new = 2
url = "https://maisretorno.com/blog/termos/l/liquidez-geral"

webbrowser.open(url, new=new)

def butaoclick3(self):
a = self.activoc4.get()
ab =self.activobio.get()
i=self.inventarios.get()
anc =self.ativos_naocorrentes.get()
p = self.passivoc4.get()
n = a-ab-i-anc
lr = n/p
r=round(lr,2)
return self.rlred.set(r)

def butaoclick2(self):
a = self.activoc2.get()
p = self.passivoc2.get()
lg = a / p
ra = round(lg,2)
return self.rlg.set(ra)

def widgets_frame2(self):
self.abas = ttk.Notebook(self.frame_2)
self.lime = Frame(self.abas)
self.fuman = Frame(self.abas)

self.lime.configure(background="#dfe3ee")
self.fuman.configure(background="#dfe3ee")

self.abas.add(self.lime, text="Liquidez imediata ")
self.abas.add(self.fuman, text="Fundo de Maneio")
self.abas.place(relx=0, rely=0, relwidth=0.98, relheight=0.98)
# Liquidez imediata
self.c_depositos = DoubleVar()
self.lb_c_depositos = Label(self.lime, text="Caixa e Depósitos Bancários ",
bg='#dfe3ee',
fg='#107db2')
self.lb_c_depositos.place(relx=0.2, rely=0.05)
self.c_depositos_entry = Entry(self.lime, textvariable=self.c_depositos)
self.c_depositos_entry.place(relx=0.44, rely=0.05, relwidth=0.1)

self.passivoc3 = DoubleVar()
self.lb_passivoc3 = Label(self.lime, text="Passivo Corrente",
bg='#dfe3ee', fg='#107db2')
self.lb_passivoc3.place(relx=0.2, rely=0.2)
self.passivoc3_entry = Entry(self.lime, textvariable=self.passivoc3)
self.passivoc3_entry.place(relx=0.44, rely=0.2, relwidth=0.1)

self.bt_calcular3 = Button(self.lime, text="Calcular", bd=2,
bg='#107db2', fg='white', font=('verdana', 8, 'bold'),
command=self.butaoclick1)
self.bt_calcular3.place(relx=0.6, rely=0.15, relwidth=0.2, relheight=0.25)
self.rlimediata = StringVar()
self.resultado1 = Label(self.lime, textvariable=self.rlimediata)
self.resultado1.place(relx=0.44, rely=0.35, relwidth=0.1)
self.lb_limitado = Label(self.lime, text="Liquidez Imediata ",
bg='#dfe3ee', fg='#107db2')
self.lb_limitado.place(relx=0.2, rely=0.35)

# Fundo de Maneio

self.activoc = DoubleVar()
self.lb_activoc = Label(self.fuman, text="Activo Corrente",
bg='#dfe3ee', fg='#107db2')
self.lb_activoc.place(relx=0.25, rely=0.05)
self.activoc_entry = Entry(self.fuman, textvariable=self.activoc)
self.activoc_entry.place(relx=0.4, rely=0.05, relwidth=0.1)

self.passivoc = DoubleVar()
self.lb_passivoc = Label(self.fuman, text="Passivo Corrente",
bg='#dfe3ee', fg='#107db2')
self.lb_passivoc.place(relx=0.25, rely=0.2)
self.passivoc_entry = Entry(self.fuman, textvariable=self.passivoc)
self.passivoc_entry.place(relx=0.4, rely=0.2, relwidth=0.1)

self.bt_calcular = Button(self.fuman, text="Calcular", bd=2,
bg='#107db2', fg='white', font=('verdana', 8, 'bold'),
command=self.butaoclick)
self.bt_calcular.place(relx=0.6, rely=0.15, relwidth=0.2, relheight=0.25)
self.rfm = StringVar()
self.resultado = Label(self.fuman, textvariable=self.rfm)
self.resultado.place(relx=0.4, rely=0.35,relwidth=0.1)
self.lb_fmaneio = Label(self.fuman, text="Fundo de Maneio",
bg='#dfe3ee', fg='#107db2')
self.lb_fmaneio.place(relx=0.25, rely=0.35)
# Botão site Frame 2
self.bt_calcular = Button(self.fuman, text="Informação sobre Fundo de Maneio", bd=2,
bg='#107db2', fg='white', font=('verdana', 8, 'bold'),
command=self.sitefum)
self.bt_calcular.place(relx=0.2, rely=0.6, relwidth=0.5, relheight=0.15)

self.bt_calcular = Button(self.lime, text="Informação sobre Liquidez Imediata", bd=2,
bg='#107db2', fg='white', font=('verdana', 8, 'bold'),
command=self.sitelimitado)
self.bt_calcular.place(relx=0.2, rely=0.6, relwidth=0.5, relheight=0.15)


def sitefum(self):
new = 2
url = "https://projetogestao.wordpress.com/2017/10/28/aula-10-fundo-de-maneio/"

webbrowser.open(url, new=new)
def sitelimitado(self):
new = 2
url = "https://maisretorno.com/blog/termos/l/liquidez-imediata/"

webbrowser.open(url, new=new)


def butaoclick1(self):
cd = self.c_depositos.get()
p = self.passivoc3.get()
r= cd/p
limediata =round(r,2)
return self.rlimediata.set(limediata)



def butaoclick(self):
a = self.activoc.get()
p = self.passivoc.get()
fm =a-p
return self.rfm.set(fm)

def Menus(self):
menubar = Menu(self.root)
self.root.config(menu=menubar)
filemenu = Menu(menubar)
filemenu2 = Menu(menubar)
def siteLiquidez():
new = 2
url = "https://www.dicionariofinanceiro.com/indices-de-liquidez/"
webbrowser.open(url, new=new)

def Quit():self.root.destroy()
menubar.add_cascade(label="Opções", menu=filemenu)
filemenu.add_command(label="Informação sobre Liquidez", command=siteLiquidez)
filemenu.add_command(label="Sair", command=Quit)
Appliquidez()

Comentários

Mensagens populares deste blogue

Criar Cartões de Visita

12 signos egípcios

Análise de Probabilidades