--- trunk/RCS/lohnrechner.py 2005/01/31 10:31:05 30 +++ lohnrechner.py 2005/08/02 13:22:49 38 @@ -27,42 +27,42 @@ def __init__(self, root): LST2005.LStRechner2005.__init__(self) - # Land, Kirchensteuersatz - self.laender = [("Baden-Württemberg", 8), - ("Bayern", 8), - ("Berlin", 9), - ("Brandenburg", 9), - ("Bremen", 9), - ("Bremerhaven", 9), - ("Hamburg", 9), - ("Hessen", 9), - ("Mecklenburg-Vorpommern", 9), - ("Niedersachsen" ,9), - ("Nordrhein-Westfalen", 9), - ("Rheinland-Pfalz", 9), - ("Saarland", 9), - ("Sachsen", 9), - ("Sachsen-Anhalt", 9), - ("Schleswig-Holstein", 9), - ("Thüringen", 9)] - - self.InitSozv() + # Land, Kirchensteuersatz, Pflegeversicherung AG-Anteil + self.laender = [("Baden-Württemberg", 8, 0.0085), + ("Bayern", 8, 0.0085), + ("Berlin", 9, 0.0085), + ("Brandenburg", 9, 0.0085), + ("Bremen", 9, 0.0085), + ("Bremerhaven", 9, 0.0085), + ("Hamburg", 9, 0.0085), + ("Hessen", 9, 0.0085), + ("Mecklenburg-Vorpommern", 9, 0.0085), + ("Niedersachsen" ,9, 0.0085), + ("Nordrhein-Westfalen", 9, 0.0085), + ("Rheinland-Pfalz", 9, 0.0085), + ("Saarland", 9, 0.0085), + ("Sachsen", 9, 0.0135), + ("Sachsen-Anhalt", 9, 0.0085), + ("Schleswig-Holstein", 9, 0.0085), + ("Thüringen", 9, 0.0085)] self.root = root self.root.title("Lohnrechner 2005 - v%s" % _release_version) self.SetupUI() + self.UpdateLand() + self.InitSozv() self.ResetInput() def SetupUI(self): self.root.resizable(NO, NO) - frame = Frame(root) + frame = Frame(self.root) frame.grid(padx=10, pady=10) # Steuern Ein/Ausgabe - Label(frame, text="Lohn:").grid(row=0, sticky=E) + Label(frame, text="Lohn (monatlich):").grid(row=0, sticky=E) self.lohn = Entry(frame) self.lohn.bind("", self.NewInput) self.lohn.grid(row=0, column=1, sticky=W) @@ -161,7 +161,7 @@ # Allgemeine UI Elemente buttons = Frame(frame) buttons.grid(row=9, column=2, columnspan=2) - Button(buttons, text="Quit", command=root.quit).pack(side=LEFT) + Button(buttons, text="Quit", command=self.root.quit).pack(side=LEFT) Button(buttons, text="Info", command=self.Info).pack(side=LEFT) Button(buttons, text="Berechnen", command=self.CalcOutput).pack(side=LEFT) @@ -266,9 +266,9 @@ # def InitSozv(self): - self.AVsatz = 0.065 - self.RVsatz = 0.195 - self.PVsatz = 0.017 + self.AVsatz = 0.065 / 2 + self.RVsatz = 0.195 / 2 + # PVsatz ist in self.laender definiert! self.PVkinderlose = 0.0025 self.BMG1 = 3525 self.BMG2 = 5200 @@ -281,17 +281,18 @@ def GetAV(self): lohn = self.GetLohn() if lohn > self.BMG2 : lohn = self.BMG2 - return round(self.sozv.get() * self.AVsatz * lohn / 2, 2) + return round(self.sozv.get() * self.AVsatz * lohn, 2) def GetRV(self): lohn = self.GetLohn() if lohn > self.BMG2 : lohn = self.BMG2 - return round(self.sozv.get() * self.RVsatz * lohn / 2, 2) + return round(self.sozv.get() * self.RVsatz * lohn, 2) def GetPV(self): + self.PVsatz = self.laender[self.land][2] lohn = self.GetLohn() if lohn > self.BMG1 : lohn = self.BMG1 - PV = self.PVsatz * lohn / 2 + PV = self.PVsatz * lohn if float(self.kfb.get()) == 0.0 : PV += lohn * self.PVkinderlose return round(self.sozv.get() * PV, 2) @@ -299,7 +300,10 @@ def GetKV(self): lohn = self.GetLohn() if lohn > self.BMG1 : lohn = self.BMG1 - return round(self.sozv.get() * self.KVsatz * lohn / 2, 2) + if 1 : + return round(self.sozv.get() * ((self.KVsatz / 2) + 0.009) * lohn, 2) + else : + return round(self.sozv.get() * self.KVsatz * lohn / 2, 2) if __name__ == "__main__":