Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- from tkinter import ttk
- from tkinter.ttk import Treeview
- from tkinter.ttk import Style
- from Opiti.from_excel.classes.global_inc import registry
- from json_file_io import JsonFileIo
- class DnaFormImport(Tk):
- def __init__(self):
- Tk.__init__(self)
- self.check_assets = IntVar()
- self.check_amort = IntVar()
- self.sel = int()
- self.last_code_entry = None
- self.last_amount_entry = None
- self.entry_asset_prd_amount = IntVar()
- self.term = None
- self.title('Нематериални активи')
- self.geometry('1400x640+200+150') #1060
- self.resizable(False, False)
- self.attributes('-topmost', 'true')
- # Label_frame
- # #Активи label_n(geo, text_l, x, y, p=None, w=15, color='black', bg_color=None, bg_border=None) w- ширина, р - подравняване
- frame = Frame(self)
- frame.pack(fill='both', expand=1)
- canvas = Canvas(frame)
- canvas.pack(side='left', fill='both', expand=1)
- myscrollbar = ttk.Scrollbar(frame, orient="vertical", command=canvas.yview)
- myscrollbar.pack(side='right', fill='y')
- canvas.configure(yscrollcommand=myscrollbar.set)
- canvas.bind('<Configure>', lambda e: canvas.configure(scrollregion=canvas.bbox('all')))
- second_frame = Frame(canvas)
- canvas.create_window((0,0), window=second_frame, anchor='nw')
- # TODO BUTTONS
- # Button Запиши
- # butt_save = Button(self, text='ЗАПИШИ', font=('Bookman Old Style Bold', 8), fg='blue', height=1, width=10)
- # butt_save.place(x=360, y=760)
- # butt_save.bind('<ButtonRelease-1>')
- # # Button Справка
- # butt_note = Button(self, text='СПРАВКА', font=('Bookman Old Style Bold', 8), fg='green', height=1, width=10)
- # butt_note.place(x=460, y=760)
- # butt_note.bind('<ButtonRelease-1>')
- # # Button Помощ
- # butt_help = Button(self, text='Помощ', font=('Bookman Old Style Bold', 8), fg='black', height=1, width=10)
- # butt_help.place(x=20, y=760)
- # butt_help.bind('<ButtonRelease-1>')
- # # Button OK
- # butt_ok = Button(self, text='OK', font=('Bookman Old Style Bold', 8), fg='green', height=1, width=10)
- # butt_ok.place(x=830, y=760)
- # butt_ok.bind('<ButtonRelease-1>')
- # # Button Отказ
- # butt_exit = Button(self, text='ОТКАЗ', font=('Bookman Old Style Bold', 8), fg='red', height=1, width=10,
- # command=self.destroy)
- # butt_exit.place(x=930, y=760)
- # Create Label
- label = Label(second_frame, text='ПОКАЗАТЕЛИ', font=('Times New Roman', 12, 'bold'), bg='white', height=5, anchor='center', fg='black', justify='center')
- label.grid(row=0, column=0, padx=(10, 1), pady=(10, 1), rowspan=2, sticky='nswe')
- label = Label(second_frame, text='Отчетна стойност\nна нетекущите активи', font=('Times New Roman', 10), bg='white', anchor='center', fg='black', justify='center', height=2)
- label.grid(row=0, column=1, padx=(1, 0), pady=(10, 0), columnspan=7, sticky='ewns')
- label = Label(second_frame, text='В началото\nна периода', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', height=3)
- label.grid(row=1, column=1, padx=(1, 0), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='Постъпили\nпрез периода', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', height=3)
- label.grid(row=1, column=2, padx=(1, 0), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='Излезли\nпрез периода', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', height=3)
- label.grid(row=1, column=3, padx=(1, 0), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='В края\nна периода', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', height=3)
- label.grid(row=1, column=4, padx=(1, 0), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='Преоценка в\nувеличение', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', height=3)
- label.grid(row=1, column=5, padx=(1, 0), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='Преоценка в\nнамаление', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', height=3)
- label.grid(row=1, column=6, padx=(1, 0), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='Преоценена\nстойност', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', height=3)
- label.grid(row=1, column=7, padx=(1, 0), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='a', font=('Times New Roman', 10, 'italic'), bg='white', anchor='center', fg='black', justify='center')
- label.grid(row=2, column=0, padx=(10, 1), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='1', font=('Times New Roman', 10, 'italic'), bg='white', anchor='center', fg='black', justify='center')
- label.grid(row=2, column=1, padx=(1, 0), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='2', font=('Times New Roman', 10, 'italic'), bg='white', anchor='center', fg='black', justify='center')
- label.grid(row=2, column=2, padx=(1, 0), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='3', font=('Times New Roman', 10, 'italic'), bg='white', anchor='center', fg='black', justify='center')
- label.grid(row=2, column=3, padx=(1, 0), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='4', font=('Times New Roman', 10, 'italic'), bg='white', anchor='center', fg='black', justify='center')
- label.grid(row=2, column=4, padx=(1, 0), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='5', font=('Times New Roman', 10, 'italic'), bg='white', anchor='center', fg='black', justify='center')
- label.grid(row=2, column=5, padx=(1, 0), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='6', font=('Times New Roman', 10, 'italic'), bg='white', anchor='center', fg='black', justify='center')
- label.grid(row=2, column=6, padx=(1, 0), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='7', font=('Times New Roman', 10, 'italic'), bg='white', anchor='center', fg='black', justify='center')
- label.grid(row=2, column=7, padx=(1, 0), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='II. Дълготрайни материални активи', font=('Times New Roman', 10, 'bold'), bg='white', anchor='w', fg='black', justify='left')
- label.grid(row=10, column=0, padx=(10, 0), pady=(1, 1), columnspan=8, sticky='wens')
- label = Label(second_frame, text=' 1. Земи и сгради, включително права в т.ч.:', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', justify='left')
- label.grid(row=11, column=0, padx=(10, 1), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text=' - земи', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', justify='left')
- label.grid(row=12, column=0, padx=(10, 1), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text=' - подобрения върху земите', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', justify='left')
- label.grid(row=13, column=0, padx=(10, 1), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text=' - сгради', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', justify='left')
- label.grid(row=14, column=0, padx=(10, 1), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text=' 2. Машини, производствено\n оборудване и апаратура', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', justify='left')
- label.grid(row=15, column=0, padx=(10, 1), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text=' 3. Съоръжения и други', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', justify='left')
- label.grid(row=16, column=0, padx=(10, 1), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text=' - в т.ч.: транспортни средства', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', justify='left')
- label.grid(row=17, column=0, padx=(10, 1), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text=' 4. Предоставени аванси и дълготрайни нема-\n териални активи в процес на изграждане', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', justify='left')
- label.grid(row=18, column=0, padx=(10, 1), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text=' - в т.ч.: предоставени аванси', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', justify='left')
- label.grid(row=19, column=0, padx=(10, 1), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='Общо за група II.', font=('Times New Roman', 10, 'bold'), bg='white', anchor='w', fg='black', justify='left')
- label.grid(row=20, column=0, padx=(10, 1), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='III. Дългосрочни финансови активи', font=('Times New Roman', 10, 'bold'), bg='white', anchor='w', fg='black', justify='left')
- label.grid(row=21, column=0, padx=(10, 0), pady=(1, 1), columnspan=8, sticky='wens')
- label = Label(second_frame, text=' 1. Акции и дялове в предприятия от група', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', justify='left')
- label.grid(row=22, column=0, padx=(10, 1), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text=' 2. Предоставени заеми на\n предприятия от група', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', justify='left')
- label.grid(row=23, column=0, padx=(10, 1), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text=' 3. Акции и дялове в асоциирани\n и смесени предприятия', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', justify='left')
- label.grid(row=24, column=0, padx=(10, 1), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text=' 4. предоставени заеми, асоциирани\n и смесени предприятия', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', justify='left')
- label.grid(row=25, column=0, padx=(10, 1), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text=' 5. Дългосрочни инвестиции\n (инвестиционни имоти)', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', justify='left')
- label.grid(row=26, column=0, padx=(10, 1), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text=' 6. Други заеми', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', justify='left')
- label.grid(row=27, column=0, padx=(10, 1), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text=' 7. Изкупени собствени акции', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', justify='left')
- label.grid(row=28, column=0, padx=(10, 1), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='Общо за група III.', font=('Times New Roman', 10, 'bold'), bg='white', anchor='w', fg='black', justify='left')
- label.grid(row=29, column=0, padx=(10, 1), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='IV. Отсрочени данъци', font=('Times New Roman', 10, 'bold'), bg='white', anchor='w', fg='black', justify='left')
- label.grid(row=30, column=0, padx=(10, 0), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='ОБЩО НЕТЕКУЩИ (дълготрайни) АКТИВИ', font=('Times New Roman', 10, 'bold'), bg='white', anchor='w', fg='black', justify='left')
- label.grid(row=31, column=0, padx=(10, 0), pady=(1, 1), sticky='wens')
- # --------------------------------------
- label = Label(second_frame, text='АМОРТИЗАЦИЯ', font=('Times New Roman', 10), bg='white', anchor='center', fg='black', justify='center', height=2)
- label.grid(row=0, column=8, padx=(2, 0), pady=(10, 0), columnspan=7, sticky='ewns')
- label = Label(second_frame, text='В началото\nна периода', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', height=3)
- label.grid(row=1, column=8, padx=(2, 0), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='Начислена\nпрез периода', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', height=3)
- label.grid(row=1, column=9, padx=(1, 0), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='Отписана\nпрез периода', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', height=3)
- label.grid(row=1, column=10, padx=(1, 0), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='В края\nна периода', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', height=3)
- label.grid(row=1, column=11, padx=(1, 0), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='Преоценка в\nувеличение', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', height=3)
- label.grid(row=1, column=12, padx=(1, 0), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='Преоценка в\nнамаление', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', height=3)
- label.grid(row=1, column=13, padx=(1, 0), pady=(1, 1), sticky='wens')
- label = Label(second_frame, text='Преоценена\nамортизация', font=('Times New Roman', 10, 'italic'), bg='white', anchor='w', fg='black', height=3)
- label.grid(row=1, column=14, padx=(1, 0), pady=(1, 1), sticky='wens')
- def dna(self):
- self.mainloop()
- if __name__ == '__main__':
- dna = DnaFormImport()
- dna.dna()
- # TODO -> попълваме сметка -> ЗАПИС -> съответната сметка да не се маркира вече ! и ако може или реда да стане в друг цвят
- # TODO -> ДА се добави бутон КОРЕКЦИЯ !
- # TODO -> Ако в Entry няма написан текст -> TReeview да се попълни наново със всички сметки !
- # TODO -> Бутона ЗАПИШИ да стане ДОБАВИ !
- # TODO -> Бутона ОК да стане ЗАПИШИ !
- # TODO -> Във всеки таб салдата да се сменят от Дебит в кредит
- # TODO _> ДА направя справкята за Бутона СПРАВКА за да се вижда резултата !
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement