Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from trial_balance_import import *
- from new_company import *
- from accountant import *
- from trial_balance import *
- class Main:
- def __init__(self):
- pass
- # Top level
- def passport_com(self):
- imp_win = InputCompany()
- imp_win.open_comp()
- def accountancy(self):
- inp_acc = AccountCompany()
- inp_acc.open_acc()
- def type_acc(self): # TODO Treeview_acc
- trial_balance = TrialBalance()
- trial_balance.main()
- def import_trial(self):
- open_trial_balance()
- def import_dna(self):
- pass
- def main(self):
- parent = tk.Tk()
- parent.title('ИЗГОТВЯНЕ НА ФИНАНСОВИ ОТЧЕТИ')
- # get the screen dimension
- screen_width = parent.winfo_screenwidth()
- screen_height = parent.winfo_screenheight()
- h = 150
- # parent.geometry(f'{screen_width}x{h}+-10+0') # Беше !
- parent.geometry(f'{screen_width}x{h}+0+0')
- parent.resizable(True, False)
- parent.attributes('-topmost', 'true')
- # Calculator
- photo1 = PhotoImage(file=r"32x32.png")
- bt1 = Button(parent, image=photo1, relief='raised', height=30, width=30, highlightthickness=4, activebackground='red')
- bt1.place(x=screen_width-80, y=0)
- bt1.bind('<ButtonRelease-1>',)
- # -----------------------Buttons
- # Buttons - referenceс
- butt_balance = tk.Button(parent, text='БАЛАНС', font=('Bookman Old Style Bold', 8), fg='green', width=10)
- butt_balance.place(x=350 , y=0)
- butt_balance.bind('<ButtonRelease-1>', None)
- butt_income = tk.Button(parent, text='ОПР', font=('Bookman Old Style Bold', 8), fg='darkred', width=10)
- butt_income.place(x=470 , y=0)
- butt_income.bind('<ButtonRelease-1>', None)
- butt_income = tk.Button(parent, text='КАПИТАЛ', font=('Bookman Old Style Bold', 8), fg='blue', width=10)
- butt_income.place(x=590 , y=0)
- butt_income.bind('<ButtonRelease-1>', None)
- butt_income = tk.Button(parent, text='ОПП', font=('Bookman Old Style Bold', 8), fg='darkblue', width=10)
- butt_income.place(x=710 , y=0)
- butt_income.bind('<ButtonRelease-1>', None)
- butt_income = tk.Button(parent, text='ДА', font=('Bookman Old Style Bold', 8), fg='black', width=10)
- butt_income.place(x=830 , y=0)
- butt_income.bind('<ButtonRelease-1>', None)
- #---------------------------------------------------
- butt_pict = tk.Button(parent, text='Снимка на\nактивния\nпрозорец', font=('Bookman Old Style Bold', 8), fg='green')
- butt_pict.place(x=screen_width-200, y=0)
- butt_pict.bind('<ButtonRelease-1>', self.passport_com)
- # -----LABELS
- label_sk = tk.Label(parent, text='Собствен капитал: ', font=('Times', 8, 'italic'), fg='green', width=16, anchor='w')
- label_sk.place(x=350 , y=30)
- label_sk_sum = tk.Label(parent, text='5 000 999.00 ', font=('Times', 8, 'italic'), fg='black', width=14, anchor='e')
- label_sk_sum.place(x=350 , y=45)
- label_a = tk.Label(parent, text='Балансово число: ', font=('Times', 8, 'italic'), fg='green', width=16, anchor='w')
- label_a.place(x=350 , y=60)
- label_a_sum = tk.Label(parent, text='10 000 999.00 ', font=('Times', 8, 'italic'), fg='black', width=14, anchor='e')
- label_a_sum.place(x=350 , y=75)
- label_inc = tk.Label(parent, text='Приходи: ', font=('Times', 8, 'italic'), fg='darkred', width=16, anchor='w')
- label_inc.place(x=470 , y=30)
- label_inc_sum = tk.Label(parent, text='19 000 999.00 ', font=('Times', 8, 'italic'), fg='black', width=14, anchor='e')
- label_inc_sum.place(x=470 , y=45)
- label_cap = tk.Label(parent, text='Дивиденти: ', font=('Times', 8, 'italic'), fg='blue', width=16, anchor='w')
- label_cap.place(x=590 , y=30)
- label_cap_sum = tk.Label(parent, text='1 000 999.00 ', font=('Times', 8, 'italic'), fg='black', width=14, anchor='e')
- label_cap_sum.place(x=590 , y=45)
- label_money = tk.Label(parent, text='Налични пари: ', font=('Times', 8, 'italic'), fg='darkblue', width=16, anchor='w')
- label_money.place(x=710 , y=30)
- label_money_sum = tk.Label(parent, text='1 000 999.00 ', font=('Times', 8, 'italic'), fg='black', width=14, anchor='e')
- label_money_sum.place(x=710 , y=45)
- label_long_assets = tk.Label(parent, text='Нетекущи активи: ', font=('Times', 8, 'italic'), fg='black', width=16, anchor='w')
- label_long_assets.place(x=830 , y=30)
- label_long_assets_sum = tk.Label(parent, text='10 000 999.00 ', font=('Times', 8, 'italic'), fg='black', width=14, anchor='e')
- label_long_assets_sum.place(x=830 , y=45)
- # ----- MENU
- menubar = tk.Menu(parent, background='yellow', foreground='black', activebackground='green', activeforeground='black')
- parent.config(menu=menubar)
- # Create a File menu
- file_menu = tk.Menu(menubar, tearoff=0, background='white', foreground='blue', font='Times, 12') # tearoff - маха прекъснатата линия
- # add menu item to menubar
- file_menu.add_command(label="Отвори")
- file_menu.add_command(label="Item1")
- file_menu.add_command(label="Item2")
- file_menu.add_command(label="Изход", command=parent.destroy)
- menubar.add_cascade(label="Файл", menu=file_menu) # add the File_menu to the menubar
- # Import menu
- import_menu = tk.Menu(menubar, tearoff=0)
- import_menu.add_command(label="Оборотна ведомост", command=lambda: None)
- import_menu.add_command(label="Парични средтсва")
- import_menu.add_command(label="Приходни сметки")
- menubar.add_cascade(label="Импорт", menu=import_menu) # add the File_menu to the menubar
- # Ръчно въвеждане
- # ДНА
- act_menu = tk.Menu(menubar, tearoff=0)
- act_menu.add_command(label="I. Нематериални активи", command=self.import_dna)
- act_menu.add_command(label="II. Дълготрайни материални активи")
- act_menu.add_command(label="III. Дългосрочни финансови активи")
- act_menu.add_command(label="IV. Отсрочени данъци")
- act_menu.add_command(label="- Платени аванси на доставчици")
- act_menu.add_command(label="- Активи в процес на придобиване")
- act_menu.add_command(label="- Преоценени активи")
- menubar.add_cascade(label="Въвеждане", menu=act_menu) # add the File_menu to the menubar
- # Нова фирма
- new_company = tk.Menu(menubar, tearoff=0)
- # new_company.add_command(label='Ново предприятие', command=lambda: self.passport_com())
- # new_company.add_command(label='Съставител на ФО', command=lambda: self.accountancy())
- new_company.add_command(label='Начални салда', command=lambda: None)
- new_company.add_command(label='Видове сметки', command=lambda: self.type_acc())
- menubar.add_cascade(label='Нови данни', menu=new_company)
- # Справки
- reference = tk.Menu(menubar, tearoff=0)
- reference.add_command(label='Оборотна ведомост', command=lambda: None)
- reference.add_command(label='Кореспонденция на приходите', command=lambda: None)
- reference.add_command(label='Сметки за нетекущи активи', command=lambda: None)
- reference.add_command(label='Движение на парични средства', command=lambda: None)
- menubar.add_cascade(label='Справки', menu=reference)
- parent.mainloop()
- if __name__ == '__main__':
- test = Main()
- test.main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement