13 |
|
|
14 |
"""Lohn/Gehaltsrechner f�r das Jahr 2005""" |
"""Lohn/Gehaltsrechner f�r das Jahr 2005""" |
15 |
|
|
16 |
|
__version__ = "$Revision$" |
17 |
|
# $Source$ |
18 |
|
|
19 |
|
_release_version = "0.1alpha" |
20 |
|
|
21 |
import LST2005 |
import LST2005 |
22 |
from Tkinter import * |
from Tkinter import * |
23 |
|
|
26 |
def __init__(self, root): |
def __init__(self, root): |
27 |
LST2005.LStRechner2005.__init__(self) |
LST2005.LStRechner2005.__init__(self) |
28 |
|
|
29 |
|
root.title("Lohnrechner 2005 - v%s" % _release_version) |
30 |
|
|
31 |
Label(root, text="Lohn:").grid(row=0, sticky=E) |
Label(root, text="Lohn:").grid(row=0, sticky=E) |
32 |
self.lohn = Entry(root) |
self.lohn = Entry(root) |
33 |
|
self.lohn.bind("<Return>", self.NewInput) |
34 |
self.lohn.grid(row=0, column=1, sticky=W) |
self.lohn.grid(row=0, column=1, sticky=W) |
35 |
|
|
36 |
Label(root, text="Steuerklasse:").grid(row=1, sticky=E) |
Label(root, text="Steuerklasse:").grid(row=1, sticky=E) |
44 |
("V", "5"), |
("V", "5"), |
45 |
("VI", "6")]: |
("VI", "6")]: |
46 |
stklradio = Radiobutton(stklframe, text=text, value=val, |
stklradio = Radiobutton(stklframe, text=text, value=val, |
47 |
indicatoron=0, |
indicatoron=0, command=self.CalcOutput, |
48 |
variable=self.stkl) |
variable=self.stkl) |
49 |
if text == "I": |
if text == "I": |
50 |
stklradio.select() |
stklradio.select() |
64 |
self.calcbutton.grid(row=3, columnspan=4) |
self.calcbutton.grid(row=3, columnspan=4) |
65 |
|
|
66 |
self.CalcOutput() |
self.CalcOutput() |
67 |
|
|
68 |
|
def NewInput(self, event): |
69 |
|
self.CalcOutput() |
70 |
|
|
71 |
def ResetInput(self): |
def ResetInput(self): |
72 |
self.lohn.insert(0, "0") |
self.ResetInputLohn() |
73 |
|
|
74 |
|
def ResetInputLohn(self): |
75 |
|
self.lohn.delete(0, END) |
76 |
|
self.lohn.insert(0, "0") |
77 |
|
|
78 |
def InitCalc(self): |
def InitCalc(self): |
79 |
self.SetLohn(float(self.lohn.get())) |
try: |
80 |
|
self.SetLohn(float(self.lohn.get())) |
81 |
|
except: |
82 |
|
self.ResetInputLohn() |
83 |
|
|
84 |
self.SetSteuerklasse(int(self.stkl.get())) |
self.SetSteuerklasse(int(self.stkl.get())) |
85 |
|
|
86 |
def CalcOutput(self): |
def CalcOutput(self): |
92 |
self.soli.insert(0, "%.2f" % self.GetSoli()) |
self.soli.insert(0, "%.2f" % self.GetSoli()) |
93 |
|
|
94 |
|
|
|
|
|
95 |
if __name__ == "__main__": |
if __name__ == "__main__": |
96 |
root = Tk() |
root = Tk() |
97 |
lr = Lohnrechner(root) |
lr = Lohnrechner(root) |