5 |
# $Id$ |
# $Id$ |
6 |
# -------------------------------------------------------------------- |
# -------------------------------------------------------------------- |
7 |
# |
# |
8 |
# Copyright (c) 2005 by Intevation GmbH |
# Copyright (c) 2005,2006 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 2005""" |
"""Lohn/Gehaltsrechner f�r das Jahr 2006""" |
16 |
|
|
17 |
__version__ = "$Revision$" |
__version__ = "$Revision$" |
18 |
# $Source$ |
# $Source$ |
19 |
|
|
20 |
_release_version = "0.%s beta" % __version__[11:-2] |
_release_version = "0.%s beta" % __version__[11:-2] |
21 |
|
|
22 |
import LST2005 |
import LST2006 |
23 |
from Tkinter import * |
from Tkinter import * |
24 |
|
|
25 |
class Lohnrechner(LST2005.LStRechner2005): |
class Lohnrechner(LST2006.LStRechner2006): |
26 |
|
|
27 |
def __init__(self, root): |
def __init__(self, root): |
28 |
LST2005.LStRechner2005.__init__(self) |
LST2006.LStRechner2006.__init__(self) |
29 |
|
|
30 |
# Land, Kirchensteuersatz |
# Land, Kirchensteuersatz, Pflegeversicherung AG-Anteil |
31 |
self.laender = [("Baden-W�rttemberg", 8), |
self.laender = [("Baden-W�rttemberg", 8, 0.0085), |
32 |
("Bayern", 8), |
("Bayern", 8, 0.0085), |
33 |
("Berlin", 9), |
("Berlin", 9, 0.0085), |
34 |
("Brandenburg", 9), |
("Brandenburg", 9, 0.0085), |
35 |
("Bremen", 9), |
("Bremen", 9, 0.0085), |
36 |
("Bremerhaven", 9), |
("Bremerhaven", 9, 0.0085), |
37 |
("Hamburg", 9), |
("Hamburg", 9, 0.0085), |
38 |
("Hessen", 9), |
("Hessen", 9, 0.0085), |
39 |
("Mecklenburg-Vorpommern", 9), |
("Mecklenburg-Vorpommern", 9, 0.0085), |
40 |
("Niedersachsen" ,9), |
("Niedersachsen" ,9, 0.0085), |
41 |
("Nordrhein-Westfalen", 9), |
("Nordrhein-Westfalen", 9, 0.0085), |
42 |
("Rheinland-Pfalz", 9), |
("Rheinland-Pfalz", 9, 0.0085), |
43 |
("Saarland", 9), |
("Saarland", 9, 0.0085), |
44 |
("Sachsen", 9), |
("Sachsen", 9, 0.0135), |
45 |
("Sachsen-Anhalt", 9), |
("Sachsen-Anhalt", 9, 0.0085), |
46 |
("Schleswig-Holstein", 9), |
("Schleswig-Holstein", 9, 0.0085), |
47 |
("Th�ringen", 9)] |
("Th�ringen", 9, 0.0085)] |
|
|
|
|
self.InitSozv() |
|
48 |
|
|
49 |
self.root = root |
self.root = root |
50 |
|
|
51 |
self.root.title("Lohnrechner 2005 - v%s" % _release_version) |
self.root.title("Lohnrechner 2006 - v%s" % _release_version) |
52 |
|
|
53 |
self.SetupUI() |
self.SetupUI() |
54 |
|
self.UpdateLand() |
55 |
|
self.InitSozv() |
56 |
self.ResetInput() |
self.ResetInput() |
57 |
|
|
58 |
def SetupUI(self): |
def SetupUI(self): |
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:").grid(row=0, sticky=E) |
Label(frame, text="Lohn (monatlich):").grid(row=0, sticky=E) |
66 |
self.lohn = Entry(frame) |
self.lohn = Entry(frame) |
67 |
self.lohn.bind("<Return>", self.NewInput) |
self.lohn.bind("<Return>", self.NewInput) |
68 |
self.lohn.grid(row=0, column=1, sticky=W) |
self.lohn.grid(row=0, column=1, sticky=W) |
137 |
self.kvsatz.bind("<Return>", self.NewInput) |
self.kvsatz.bind("<Return>", self.NewInput) |
138 |
self.kvsatz.grid(row=9, column=1, sticky=W) |
self.kvsatz.grid(row=9, column=1, sticky=W) |
139 |
|
|
140 |
|
Label(frame, text="Krankenkassenzuschlag (0.9%):").grid(row=10, sticky=E) |
141 |
|
self.kvsoli = IntVar() |
142 |
|
kvsoliradio = Checkbutton(frame, onvalue=1, offvalue=0, |
143 |
|
command=self.NewInput, variable=self.kvsoli) |
144 |
|
kvsoliradio.select() |
145 |
|
kvsoliradio.grid(row=10, column=1, sticky=W) |
146 |
|
|
147 |
|
|
148 |
Label(frame, text="Rentenversicherung:").grid(row=4, column=2, sticky=E) |
Label(frame, text="Rentenversicherung:").grid(row=4, column=2, sticky=E) |
149 |
self.rv = Entry(frame) |
self.rv = Entry(frame) |
150 |
self.rv.grid(row=4, column=3, sticky=W) |
self.rv.grid(row=4, column=3, sticky=W) |
168 |
|
|
169 |
# Allgemeine UI Elemente |
# Allgemeine UI Elemente |
170 |
buttons = Frame(frame) |
buttons = Frame(frame) |
171 |
buttons.grid(row=9, column=2, columnspan=2) |
buttons.grid(row=9, column=2, rowspan=2, columnspan=2) |
172 |
Button(buttons, text="Quit", command=self.root.quit).pack(side=LEFT) |
Button(buttons, text="Quit", command=self.root.quit).pack(side=LEFT) |
173 |
Button(buttons, text="Info", command=self.Info).pack(side=LEFT) |
Button(buttons, text="Info", command=self.Info).pack(side=LEFT) |
174 |
Button(buttons, text="Berechnen", command=self.CalcOutput).pack(side=LEFT) |
Button(buttons, text="Berechnen", command=self.CalcOutput).pack(side=LEFT) |
205 |
|
|
206 |
def ResetInputKVsatz(self): |
def ResetInputKVsatz(self): |
207 |
self.kvsatz.delete(0, END) |
self.kvsatz.delete(0, END) |
208 |
self.kvsatz.insert(0, "14.7") |
self.kvsatz.insert(0, "13.8") |
209 |
|
|
210 |
def InitCalc(self): |
def InitCalc(self): |
211 |
try: |
try: |
256 |
def Info(self): |
def Info(self): |
257 |
infowin = Toplevel(self.root) |
infowin = Toplevel(self.root) |
258 |
infowin.title("Info") |
infowin.title("Info") |
259 |
Label(infowin, text="Lohnrechner 2005 v%s" % _release_version, |
Label(infowin, text="Lohnrechner 2006 v%s" % _release_version, |
260 |
font=("Times", 14, "bold italic")).grid(row=0, pady=20) |
font=("Times", 14, "bold italic")).grid(row=0, pady=20) |
261 |
Label(infowin, text= |
Label(infowin, text= |
262 |
"Copyright (C) 2005 Intevation GmbH \n\n\ |
"Copyright (C) 2005,2006 Intevation GmbH \n\n\ |
263 |
Lohnrechner 2005 comes with ABSOLUTELY NO WARRANTY.\n\ |
Lohnrechner 2006 comes with ABSOLUTELY NO WARRANTY.\n\ |
264 |
This is free software, and you are welcome to redistribute it\n\ |
This is free software, and you are welcome to redistribute it\n\ |
265 |
under the terms of the GNU General Public License.\n\ |
under the terms of the GNU General Public License.\n\ |
266 |
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\ |
267 |
Dieses Programm verwendet LST2005 %s" % LST2005._ModulVersion()).grid(row=1, padx=10) |
Dieses Programm verwendet LST2006 %s" % LST2006._ModulVersion()).grid(row=1, padx=10) |
268 |
Button(infowin, text="Ok", command=infowin.destroy).grid(row=2, pady=10) |
Button(infowin, text="Ok", command=infowin.destroy).grid(row=2, pady=10) |
269 |
|
|
270 |
# |
# |
274 |
# |
# |
275 |
|
|
276 |
def InitSozv(self): |
def InitSozv(self): |
277 |
self.AVsatz = 0.065 |
self.AVsatz = 0.065 / 2 |
278 |
self.RVsatz = 0.195 |
self.RVsatz = 0.195 / 2 |
279 |
self.PVsatz = 0.017 |
# PVsatz ist in self.laender definiert! |
280 |
self.PVkinderlose = 0.0025 |
self.PVkinderlose = 0.0025 |
281 |
self.BMG1 = 3525 |
self.BMG1 = 3525 |
282 |
self.BMG2 = 5200 |
self.BMG2 = 5200 |
289 |
def GetAV(self): |
def GetAV(self): |
290 |
lohn = self.GetLohn() |
lohn = self.GetLohn() |
291 |
if lohn > self.BMG2 : lohn = self.BMG2 |
if lohn > self.BMG2 : lohn = self.BMG2 |
292 |
return round(self.sozv.get() * self.AVsatz * lohn / 2, 2) |
return round(self.sozv.get() * self.AVsatz * lohn, 2) |
293 |
|
|
294 |
def GetRV(self): |
def GetRV(self): |
295 |
lohn = self.GetLohn() |
lohn = self.GetLohn() |
296 |
if lohn > self.BMG2 : lohn = self.BMG2 |
if lohn > self.BMG2 : lohn = self.BMG2 |
297 |
return round(self.sozv.get() * self.RVsatz * lohn / 2, 2) |
return round(self.sozv.get() * self.RVsatz * lohn, 2) |
298 |
|
|
299 |
def GetPV(self): |
def GetPV(self): |
300 |
|
self.PVsatz = self.laender[self.land][2] |
301 |
lohn = self.GetLohn() |
lohn = self.GetLohn() |
302 |
if lohn > self.BMG1 : lohn = self.BMG1 |
if lohn > self.BMG1 : lohn = self.BMG1 |
303 |
PV = self.PVsatz * lohn / 2 |
PV = self.PVsatz * lohn |
304 |
if float(self.kfb.get()) == 0.0 : |
if float(self.kfb.get()) == 0.0 : |
305 |
PV += lohn * self.PVkinderlose |
PV += lohn * self.PVkinderlose |
306 |
return round(self.sozv.get() * PV, 2) |
return round(self.sozv.get() * PV, 2) |
307 |
|
|
308 |
def GetKV(self): |
def GetKV(self): |
309 |
|
self.KVsoli = self.kvsoli.get() |
310 |
lohn = self.GetLohn() |
lohn = self.GetLohn() |
311 |
if lohn > self.BMG1 : lohn = self.BMG1 |
if lohn > self.BMG1 : lohn = self.BMG1 |
312 |
return round(self.sozv.get() * self.KVsatz * lohn / 2, 2) |
if self.KVsoli : |
313 |
|
return round(self.sozv.get() * ((self.KVsatz / 2) + 0.009) * lohn, 2) |
314 |
|
else : |
315 |
|
return round(self.sozv.get() * self.KVsatz * lohn / 2, 2) |
316 |
|
|
317 |
|
|
318 |
if __name__ == "__main__": |
if __name__ == "__main__": |