1 |
#! /usr/bin/python |
#! /usr/bin/python |
2 |
|
# -*- coding: iso-8859-1 -*- |
3 |
# -------------------------------------------------------------------- |
# -------------------------------------------------------------------- |
4 |
# Lohnsteuer und Sozialabgaben Rechner |
# Lohnsteuer und Sozialabgaben Rechner |
5 |
# $Id$ |
# $Id$ |
17 |
__version__ = "$Revision$" |
__version__ = "$Revision$" |
18 |
# $Source$ |
# $Source$ |
19 |
|
|
20 |
_release_version = "0.1alpha" |
_release_version = "0.%s beta" % __version__[11:-2] |
21 |
|
|
22 |
import LST2005 |
import LST2005 |
23 |
from Tkinter import * |
from Tkinter import * |
37 |
self.lohn.grid(row=0, column=1, sticky=W) |
self.lohn.grid(row=0, column=1, sticky=W) |
38 |
|
|
39 |
Label(root, text="Steuerklasse:").grid(row=1, sticky=E) |
Label(root, text="Steuerklasse:").grid(row=1, sticky=E) |
40 |
self.stkl = StringVar() |
self.stkl = IntVar() |
41 |
stklframe = Frame(root) |
stklframe = Frame(root) |
42 |
stklframe.grid(row=1, column=1, sticky=W) |
stklframe.grid(row=1, column=1, sticky=W) |
43 |
for text, val in [("I", "1"), |
for text, val in [("I", 1), |
44 |
("II", "2"), |
("II", 2), |
45 |
("III", "3"), |
("III", 3), |
46 |
("IV", "4"), |
("IV", 4), |
47 |
("V", "5"), |
("V", 5), |
48 |
("VI", "6")]: |
("VI", 6)]: |
49 |
stklradio = Radiobutton(stklframe, text=text, value=val, |
stklradio = Radiobutton(stklframe, text=text, value=val, |
50 |
indicatoron=0, command=self.CalcOutput, |
indicatoron=0, command=self.CalcOutput, |
51 |
variable=self.stkl) |
variable=self.stkl) |
67 |
kircheradio.select() |
kircheradio.select() |
68 |
kircheradio.pack(side=LEFT) |
kircheradio.pack(side=LEFT) |
69 |
|
|
70 |
|
Label(root, text="Kinderfreibetrag:").grid(row=3, sticky=E) |
71 |
|
self.kfb = Entry(root) |
72 |
|
self.kfb.bind("<Return>", self.NewInput) |
73 |
|
self.kfb.grid(row=3, column=1, sticky=W) |
74 |
|
|
75 |
self.ResetInput() |
self.ResetInput() |
76 |
|
|
77 |
Label(root, text="Lohnsteuer:").grid(row=0, column=2, sticky=E) |
Label(root, text="Lohnsteuer:").grid(row=0, column=2, sticky=E) |
87 |
self.kist.grid(row=2, column=3, sticky=W) |
self.kist.grid(row=2, column=3, sticky=W) |
88 |
|
|
89 |
buttons = Frame() |
buttons = Frame() |
90 |
buttons.grid(row=3, columnspan=4) |
buttons.grid(row=4, columnspan=4) |
91 |
Button(buttons, text="Quit", command=root.quit).pack(side=LEFT) |
Button(buttons, text="Quit", command=root.quit).pack(side=LEFT) |
92 |
Button(buttons, text="Info", command=self.Info).pack(side=LEFT) |
Button(buttons, text="Info", command=self.Info).pack(side=LEFT) |
93 |
Button(buttons, text="Berechnen", command=self.CalcOutput).pack(side=LEFT) |
Button(buttons, text="Berechnen", command=self.CalcOutput).pack(side=LEFT) |
104 |
self.lohn.delete(0, END) |
self.lohn.delete(0, END) |
105 |
self.lohn.insert(0, "0") |
self.lohn.insert(0, "0") |
106 |
|
|
107 |
|
def ResetInputKfb(self): |
108 |
|
self.kfb.delete(0, END) |
109 |
|
self.kfb.insert(0, "0") |
110 |
|
|
111 |
def InitCalc(self): |
def InitCalc(self): |
112 |
try: |
try: |
113 |
self.SetLohn(float(self.lohn.get())) |
self.SetLohn(float(self.lohn.get())) |
114 |
except: |
except: |
115 |
self.ResetInputLohn() |
self.ResetInputLohn() |
116 |
|
|
117 |
self.SetSteuerklasse(int(self.stkl.get())) |
try: |
118 |
|
self.SetKinderfreibetrag(float(self.kfb.get())) |
119 |
|
except: |
120 |
|
self.ResetInputKfb() |
121 |
|
|
122 |
|
self.SetSteuerklasse(self.stkl.get()) |
123 |
self.SetKirchensteuer(int(self.kirche.get())) |
self.SetKirchensteuer(int(self.kirche.get())) |
124 |
|
|
125 |
def CalcOutput(self): |
def CalcOutput(self): |
135 |
def Info(self): |
def Info(self): |
136 |
infowin = Toplevel(self.root) |
infowin = Toplevel(self.root) |
137 |
infowin.title("Info") |
infowin.title("Info") |
138 |
Label(infowin, text="Lohnrechner 2005 %s" % _release_version, |
Label(infowin, text="Lohnrechner 2005 v%s" % _release_version, |
139 |
font=("Times", 14, "bold italic")).grid(row=0, pady=20) |
font=("Times", 14, "bold italic")).grid(row=0, pady=20) |
140 |
Label(infowin, text= |
Label(infowin, text= |
141 |
"Copyright (C) 2005 Intevation GmbH \n\n\ |
"Copyright (C) 2005 Intevation GmbH \n\n\ |