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

Diff of /trunk/lohnrechner.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

lohnrechner.py revision 51 by wilde, Mon Jan 23 17:07:57 2006 UTC trunk/lohnrechner.py revision 67 by wilde, Thu Jan 25 11:13:08 2007 UTC
# Line 5  Line 5 
5  # $Id$  # $Id$
6  # --------------------------------------------------------------------  # --------------------------------------------------------------------
7  #  #
8  # Copyright (c) 2005,2006 by Intevation GmbH  # Copyright (c) 2005,2006,2007 by Intevation GmbH
9  # Authors:  # Authors:
10  # Sascha Wilde <[email protected]>  # Sascha Wilde <[email protected]>
11  #  #
12  # This program is free software under the GPL (>=v2)  # This program is free software under the GPL (>=v2)
13  # Read the file COPYING coming with this package for details.  # Read the file COPYING coming with this package for details.
14    
15  """Lohn/Gehaltsrechner f�r das Jahr 2006"""  """Lohn/Gehaltsrechner f�r das Jahr 2007"""
16    
17  __version__ = "$Revision$"  __version__ = "$Revision$"
18  # $Source$  # $Source$
19                    
20  _release_version = "0.%s beta" % __version__[11:-2]  _release_version = "0.%s" % __version__[11:-2]
21    
22  import LST2006  import LST2007
23  from Tkinter import *  from Tkinter import *
24    
25  class Lohnrechner(LST2006.LStRechner2006):  class Lohnrechner(LST2007.LStRechner2007):
26    
27      def __init__(self, root):      def __init__(self, root):
28          LST2006.LStRechner2006.__init__(self)          LST2007.LStRechner2007.__init__(self)
29    
30          # Land, Kirchensteuersatz, Pflegeversicherung AG-Anteil          # Land, Kirchensteuersatz, Pflegeversicherung AG-Anteil
31          self.laender = [("Baden-W�rttemberg", 8, 0.0085),          self.laender = [("Baden-W�rttemberg", 8, 0.0085),
# Line 48  class Lohnrechner(LST2006.LStRechner2006 Line 48  class Lohnrechner(LST2006.LStRechner2006
48                    
49          self.root = root          self.root = root
50    
51          self.root.title("Lohnrechner 2006 - v%s" % _release_version)          self.root.title("Lohnrechner 2007 - v%s" % _release_version)
52    
53          self.SetupUI()          self.SetupUI()
54          self.UpdateLand()          self.UpdateLand()
# Line 62  class Lohnrechner(LST2006.LStRechner2006 Line 62  class Lohnrechner(LST2006.LStRechner2006
62          frame.grid(padx=10, pady=10)          frame.grid(padx=10, pady=10)
63    
64          # Steuern Ein/Ausgabe          # Steuern Ein/Ausgabe
65          Label(frame, text="Lohn (monatlich):").grid(row=0, sticky=E)          Label(frame, text="Geburtsjahr:").grid(row=0, sticky=E)
66            self.geb = Entry(frame)
67            self.geb.bind("<Return>", self.NewInput)
68            self.geb.grid(row=0, column=1, sticky=W)
69    
70            Label(frame, text="Lohn (monatlich):").grid(row=1, sticky=E)
71          self.lohn = Entry(frame)          self.lohn = Entry(frame)
72          self.lohn.bind("<Return>", self.NewInput)          self.lohn.bind("<Return>", self.NewInput)
73          self.lohn.grid(row=0, column=1, sticky=W)          self.lohn.grid(row=1, column=1, sticky=W)
74    
75          Label(frame, text="Steuerklasse:").grid(row=1, sticky=E)          Label(frame, text="Steuerklasse:").grid(row=2, sticky=E)
76          self.stkl = IntVar()          self.stkl = IntVar()
77          stklframe = Frame(frame)          stklframe = Frame(frame)
78          stklframe.grid(row=1, column=1, sticky=W)          stklframe.grid(row=2, column=1, sticky=W)
79          for text, val in [("I", 1),          for text, val in [("I", 1),
80                            ("II", 2),                            ("II", 2),
81                            ("III", 3),                            ("III", 3),
# Line 84  class Lohnrechner(LST2006.LStRechner2006 Line 89  class Lohnrechner(LST2006.LStRechner2006
89                  stklradio.select()                  stklradio.select()
90              stklradio.pack(side=LEFT)              stklradio.pack(side=LEFT)
91    
92          Label(frame, text="Kirchensteuer:").grid(row=2, sticky=E)          Label(frame, text="Kirchensteuer:").grid(row=3, sticky=E)
93          self.kirche = IntVar()          self.kirche = IntVar()
94          Checkbutton(frame, onvalue=1, offvalue=0, command=self.NewInput,          Checkbutton(frame, onvalue=1, offvalue=0, command=self.NewInput,
95                      variable=self.kirche).grid(row=2, column=1,sticky=W)                      variable=self.kirche).grid(row=3, column=1,sticky=W)
96    
97          Label(frame, text="Kinderfreibetrag:").grid(row=3, sticky=E)          Label(frame, text="Kinderfreibetrag:").grid(row=4, sticky=E)
98          self.kfb = Entry(frame)          self.kfb = Entry(frame)
99          self.kfb.bind("<Return>", self.NewInput)          self.kfb.bind("<Return>", self.NewInput)
100          self.kfb.grid(row=3, column=1, sticky=W)          self.kfb.grid(row=4, column=1, sticky=W)
101    
102          Label(frame, text="Bundesland:").grid(row=4, sticky=NE)          Label(frame, text="Bundesland:").grid(row=5, sticky=NE)
103          landframe = Frame(frame)          landframe = Frame(frame)
104          scrollbar = Scrollbar(landframe, orient=VERTICAL)          scrollbar = Scrollbar(landframe, orient=VERTICAL)
105          self.landbox = Listbox(landframe, height=4, selectmode=SINGLE,          self.landbox = Listbox(landframe, height=4, selectmode=SINGLE,
# Line 106  class Lohnrechner(LST2006.LStRechner2006 Line 111  class Lohnrechner(LST2006.LStRechner2006
111          self.landbox.pack(side=RIGHT, fill=Y)          self.landbox.pack(side=RIGHT, fill=Y)
112          scrollbar.config(command=self.landbox.yview)          scrollbar.config(command=self.landbox.yview)
113          scrollbar.pack(side=LEFT, fill=BOTH, expand=1)          scrollbar.pack(side=LEFT, fill=BOTH, expand=1)
114          landframe.grid(row=4, rowspan=4, column=1, sticky=W)          landframe.grid(row=5, rowspan=4, column=1, sticky=W)
115                    
116          Label(frame, text="Lohnsteuer:").grid(row=0, column=2, sticky=E)          Label(frame, text="Lohnsteuer:").grid(row=0, column=2, sticky=E)
117          self.lst = Entry(frame)          self.lst = Entry(frame)
# Line 125  class Lohnrechner(LST2006.LStRechner2006 Line 130  class Lohnrechner(LST2006.LStRechner2006
130          self.netto1.grid(row=3, column=3, sticky=W)          self.netto1.grid(row=3, column=3, sticky=W)
131    
132          # Sozialversicherung Ein/Ausgabe          # Sozialversicherung Ein/Ausgabe
133          Label(frame, text="Sozialversicherung:").grid(row=8, sticky=E)          Label(frame, text="Sozialversicherung:").grid(row=9, sticky=E)
134          self.sozv = IntVar()          self.sozv = IntVar()
135          sozvradio = Checkbutton(frame, onvalue=1, offvalue=0,          sozvradio = Checkbutton(frame, onvalue=1, offvalue=0,
136                                  command=self.NewInput, variable=self.sozv)                                  command=self.NewInput, variable=self.sozv)
137          sozvradio.select()          sozvradio.select()
138          sozvradio.grid(row=8, column=1, sticky=W)          sozvradio.grid(row=9, column=1, sticky=W)
139    
140          Label(frame, text="Krankenkassenbeitrag:").grid(row=9, sticky=E)          Label(frame, text="Krankenkassenbeitrag:").grid(row=10, sticky=E)
141          self.kvsatz = Entry(frame)          self.kvsatz = Entry(frame)
142          self.kvsatz.bind("<Return>", self.NewInput)          self.kvsatz.bind("<Return>", self.NewInput)
143          self.kvsatz.grid(row=9, column=1, sticky=W)          self.kvsatz.grid(row=10, column=1, sticky=W)
144    
145          Label(frame, text="Krankenkassenzuschlag (0.9%):").grid(row=10, sticky=E)          Label(frame, text="Krankenkassenzuschlag (0.9%):").grid(row=11, sticky=E)
146          self.kvsoli = IntVar()          self.kvsoli = IntVar()
147          kvsoliradio = Checkbutton(frame, onvalue=1, offvalue=0,          kvsoliradio = Checkbutton(frame, onvalue=1, offvalue=0,
148                                  command=self.NewInput, variable=self.kvsoli)                                  command=self.NewInput, variable=self.kvsoli)
149          kvsoliradio.select()          kvsoliradio.select()
150          kvsoliradio.grid(row=10, column=1, sticky=W)          kvsoliradio.grid(row=11, column=1, sticky=W)
151    
152    
153          Label(frame, text="Rentenversicherung:").grid(row=4, column=2, sticky=E)          Label(frame, text="Rentenversicherung:").grid(row=4, column=2, sticky=E)
# Line 168  class Lohnrechner(LST2006.LStRechner2006 Line 173  class Lohnrechner(LST2006.LStRechner2006
173    
174          # Allgemeine UI Elemente          # Allgemeine UI Elemente
175          buttons = Frame(frame)          buttons = Frame(frame)
176          buttons.grid(row=9, column=2, rowspan=2, columnspan=2)          buttons.grid(row=10, column=2, rowspan=2, columnspan=2)
177          Button(buttons, text="Quit", command=self.root.quit).pack(side=LEFT)          Button(buttons, text="Quit", command=self.root.quit).pack(side=LEFT)
178          Button(buttons, text="Info", command=self.Info).pack(side=LEFT)          Button(buttons, text="Info", command=self.Info).pack(side=LEFT)
179          Button(buttons, text="Berechnen", command=self.CalcOutput).pack(side=LEFT)          Button(buttons, text="Berechnen", command=self.CalcOutput).pack(side=LEFT)
# Line 190  class Lohnrechner(LST2006.LStRechner2006 Line 195  class Lohnrechner(LST2006.LStRechner2006
195          self.CalcOutput()          self.CalcOutput()
196    
197      def ResetInput(self):      def ResetInput(self):
198            self.ResetInputGeb()
199          self.ResetInputLohn()          self.ResetInputLohn()
200          self.ResetInputKfb()          self.ResetInputKfb()
201          self.ResetInputKVsatz()          self.ResetInputKVsatz()
202          self.NewLandSel()          self.NewLandSel()
203    
204        def ResetInputGeb(self):
205            self.geb.delete(0, END)
206            self.geb.insert(0, "1964")
207    
208      def ResetInputLohn(self):      def ResetInputLohn(self):
209          self.lohn.delete(0, END)          self.lohn.delete(0, END)
210          self.lohn.insert(0, "0")          self.lohn.insert(0, "0")
# Line 214  class Lohnrechner(LST2006.LStRechner2006 Line 224  class Lohnrechner(LST2006.LStRechner2006
224              self.ResetInputLohn()              self.ResetInputLohn()
225    
226          try:          try:
227                self.SetGeb(int(self.geb.get()))
228            except:
229                self.ResetInputGeb()
230    
231            try:
232              self.SetKinderfreibetrag(float(self.kfb.get()))              self.SetKinderfreibetrag(float(self.kfb.get()))
233          except:          except:
234              self.ResetInputKfb()              self.ResetInputKfb()
# Line 256  class Lohnrechner(LST2006.LStRechner2006 Line 271  class Lohnrechner(LST2006.LStRechner2006
271      def Info(self):      def Info(self):
272          infowin = Toplevel(self.root)          infowin = Toplevel(self.root)
273          infowin.title("Info")          infowin.title("Info")
274          Label(infowin, text="Lohnrechner 2006 v%s" % _release_version,          Label(infowin, text="Lohnrechner 2007 v%s" % _release_version,
275                font=("Times", 14, "bold italic")).grid(row=0, pady=20)                font=("Times", 14, "bold italic")).grid(row=0, pady=20)
276          Label(infowin, text=          Label(infowin, text=
277                "Copyright (C) 2005,2006 Intevation GmbH \n\n\                "Copyright (C) 2005,2006,2007 Intevation GmbH \n\n\
278  Lohnrechner 2006 comes with ABSOLUTELY NO WARRANTY.\n\  Lohnrechner 2007 comes with ABSOLUTELY NO WARRANTY.\n\
279  This is free software, and you are welcome to redistribute it\n\  This is free software, and you are welcome to redistribute it\n\
280  under the terms of the GNU General Public License.\n\  under the terms of the GNU General Public License.\n\
281  For more information about these matters, see the file named COPYING.\n\n\  For more information about these matters, see the file named COPYING.\n\n\
282  Dieses Programm verwendet LST2006 %s" % LST2006._ModulVersion()).grid(row=1, padx=10)  Dieses Programm verwendet LST2007 %s" % LST2007._ModulVersion()).grid(row=1, padx=10)
283          Button(infowin, text="Ok", command=infowin.destroy).grid(row=2, pady=10)          Button(infowin, text="Ok", command=infowin.destroy).grid(row=2, pady=10)
284    
285      #      #
# Line 278  Dieses Programm verwendet LST2006 %s" % Line 293  Dieses Programm verwendet LST2006 %s" %
293          self.RVsatz = 0.195 / 2          self.RVsatz = 0.195 / 2
294          # PVsatz ist in self.laender definiert!          # PVsatz ist in self.laender definiert!
295          self.PVkinderlose = 0.0025          self.PVkinderlose = 0.0025
296          self.BMG1 = 3525          self.BMG1 = 3562.5
297          self.BMG2 = 5200          self.BMG2 = 5250
298    
299      def SetKV(self, value):      def SetKV(self, value):
300          assert value >= 0.0 and value <= 100.0, \          assert value >= 0.0 and value <= 100.0, \

Legend:
Removed from v.51  
changed lines
  Added in v.67

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26