--- trunk/RCS/lohnrechner.py 2005/01/13 15:51:34 17 +++ trunk/RCS/lohnrechner.py 2005/01/14 11:43:17 19 @@ -1,4 +1,5 @@ #! /usr/bin/python +# -*- coding: iso-8859-1 -*- # -------------------------------------------------------------------- # Lohnsteuer und Sozialabgaben Rechner # $Id$ @@ -16,7 +17,7 @@ __version__ = "$Revision$" # $Source$ -_release_version = "0.1alpha" +_release_version = "0.%s alpha" % __version__[11:-2] import LST2005 from Tkinter import * @@ -66,6 +67,11 @@ kircheradio.select() kircheradio.pack(side=LEFT) + Label(root, text="Kinderfreibetrag:").grid(row=3, sticky=E) + self.kfb = Entry(root) + self.kfb.bind("", self.NewInput) + self.kfb.grid(row=3, column=1, sticky=W) + self.ResetInput() Label(root, text="Lohnsteuer:").grid(row=0, column=2, sticky=E) @@ -81,7 +87,7 @@ self.kist.grid(row=2, column=3, sticky=W) buttons = Frame() - buttons.grid(row=3, columnspan=4) + buttons.grid(row=4, columnspan=4) Button(buttons, text="Quit", command=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) @@ -98,12 +104,21 @@ self.lohn.delete(0, END) self.lohn.insert(0, "0") + def ResetInputKfb(self): + self.kfb.delete(0, END) + self.kfb.insert(0, "0") + def InitCalc(self): try: self.SetLohn(float(self.lohn.get())) except: self.ResetInputLohn() + try: + self.SetKinderfreibetrag(float(self.kfb.get())) + except: + self.ResetInputKfb() + self.SetSteuerklasse(int(self.stkl.get())) self.SetKirchensteuer(int(self.kirche.get())) @@ -120,7 +135,7 @@ def Info(self): infowin = Toplevel(self.root) infowin.title("Info") - Label(infowin, text="Lohnrechner 2005 %s" % _release_version, + Label(infowin, text="Lohnrechner 2005 v%s" % _release_version, font=("Times", 14, "bold italic")).grid(row=0, pady=20) Label(infowin, text= "Copyright (C) 2005 Intevation GmbH \n\n\