/[lohnrechner]/trunk/lohnrechner2007.py
ViewVC logotype

Contents of /trunk/lohnrechner2007.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7 - (show annotations)
Thu Jan 13 10:01:01 2005 UTC (20 years, 3 months ago) by wilde
Original Path: trunk/RCS/lohnrechner.py
File MIME type: text/x-python
File size: 2649 byte(s)
Attribute f�r interne und Release Version hinzugef�gt
Fenstertitel wird gesetzt

1 #! /usr/bin/python
2 # --------------------------------------------------------------------
3 # Lohnsteuer und Sozialabgaben Rechner
4 # $Id$
5 # --------------------------------------------------------------------
6 #
7 # Copyright (c) 2005 by Intevation GmbH
8 # Authors:
9 # Sascha Wilde <[email protected]>
10 #
11 # This program is free software under the GPL (>=v2)
12 # Read the file COPYING coming with this package for details.
13
14 """Lohn/Gehaltsrechner für das Jahr 2005"""
15
16 __version__ = "$Revision$"
17 # $Source$
18
19 _release_version = "0.1alpha"
20
21 import LST2005
22 from Tkinter import *
23
24 class Lohnrechner(LST2005.LStRechner2005):
25
26 def __init__(self, root):
27 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)
32 self.lohn = Entry(root)
33 self.lohn.grid(row=0, column=1, sticky=W)
34
35 Label(root, text="Steuerklasse:").grid(row=1, sticky=E)
36 self.stkl = StringVar()
37 stklframe = Frame(root)
38 stklframe.grid(row=1, column=1, sticky=W)
39 for text, val in [("I", "1"),
40 ("II", "2"),
41 ("III", "3"),
42 ("IV", "4"),
43 ("V", "5"),
44 ("VI", "6")]:
45 stklradio = Radiobutton(stklframe, text=text, value=val,
46 indicatoron=0,
47 variable=self.stkl)
48 if text == "I":
49 stklradio.select()
50 stklradio.pack(side=LEFT)
51
52 self.ResetInput()
53
54 Label(root, text="Lohnsteuer:").grid(row=0, column=2, sticky=E)
55 self.lst = Entry(root)
56 self.lst.grid(row=0, column=3, sticky=W)
57
58 Label(root, text="Lolidaritätszuschlag:").grid(row=1, column=2, sticky=E)
59 self.soli = Entry(root)
60 self.soli.grid(row=1, column=3, sticky=W)
61
62 self.calcbutton = Button(root, text="Berechnen", command=self.CalcOutput)
63 self.calcbutton.grid(row=3, columnspan=4)
64
65 self.CalcOutput()
66
67 def ResetInput(self):
68 self.lohn.insert(0, "0")
69
70 def InitCalc(self):
71 self.SetLohn(float(self.lohn.get()))
72 self.SetSteuerklasse(int(self.stkl.get()))
73
74 def CalcOutput(self):
75 self.InitCalc()
76 self.Calc()
77 self.lst.delete(0, END)
78 self.lst.insert(0, "%.2f" % self.GetLohnsteuer())
79 self.soli.delete(0, END)
80 self.soli.insert(0, "%.2f" % self.GetSoli())
81
82
83 if __name__ == "__main__":
84 root = Tk()
85 lr = Lohnrechner(root)
86 root.mainloop()
87

Properties

Name Value
svn:eol-style native
svn:executable *
svn:keywords Author Date Id Revision

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26