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

Diff of /trunk/RCS/lohnrechner.py

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

revision 9 by wilde, Thu Jan 13 10:32:30 2005 UTC revision 16 by wilde, Thu Jan 13 13:01:58 2005 UTC
# Line 50  class Lohnrechner(LST2005.LStRechner2005 Line 50  class Lohnrechner(LST2005.LStRechner2005
50                  stklradio.select()                  stklradio.select()
51              stklradio.pack(side=LEFT)              stklradio.pack(side=LEFT)
52    
53            Label(root, text="Kirchensteuer (%):").grid(row=2, sticky=E)
54            self.kirche = StringVar()
55            kircheframe = Frame(root)
56            kircheframe.grid(row=2, column=1, sticky=W)
57            for text, val in [("keine", "0"),
58                              ("8 %", "8"),
59                              ("9 %", "9")]:
60                kircheradio = Radiobutton(kircheframe, text=text, value=val,
61                                        indicatoron=0, command=self.CalcOutput,
62                                        variable=self.kirche)
63                if val == "0":
64                    kircheradio.select()
65                kircheradio.pack(side=LEFT)
66    
67          self.ResetInput()          self.ResetInput()
68    
69          Label(root, text="Lohnsteuer:").grid(row=0, column=2, sticky=E)          Label(root, text="Lohnsteuer:").grid(row=0, column=2, sticky=E)
70          self.lst = Entry(root)          self.lst = Entry(root)
71          self.lst.grid(row=0, column=3, sticky=W)          self.lst.grid(row=0, column=3, sticky=W)
72    
73          Label(root, text="Lolidarit�tszuschlag:").grid(row=1, column=2, sticky=E)          Label(root, text="Solidarit�tszuschlag:").grid(row=1, column=2, sticky=E)
74          self.soli = Entry(root)          self.soli = Entry(root)
75          self.soli.grid(row=1, column=3, sticky=W)          self.soli.grid(row=1, column=3, sticky=W)
76    
77            Label(root, text="Kirchensteuer:").grid(row=2, column=2, sticky=E)
78            self.kist = Entry(root)
79            self.kist.grid(row=2, column=3, sticky=W)
80    
81          self.calcbutton = Button(root, text="Berechnen", command=self.CalcOutput)          self.calcbutton = Button(root, text="Berechnen", command=self.CalcOutput)
82          self.calcbutton.grid(row=3, columnspan=4)          self.calcbutton.grid(row=3, columnspan=4)
83                    
# Line 74  class Lohnrechner(LST2005.LStRechner2005 Line 92  class Lohnrechner(LST2005.LStRechner2005
92      def ResetInputLohn(self):      def ResetInputLohn(self):
93          self.lohn.delete(0, END)          self.lohn.delete(0, END)
94          self.lohn.insert(0, "0")          self.lohn.insert(0, "0")
95            
96      def InitCalc(self):      def InitCalc(self):
97          try:          try:
98              self.SetLohn(float(self.lohn.get()))              self.SetLohn(float(self.lohn.get()))
99          except:          except:
100              self.ResetInputLohn()              self.ResetInputLohn()
101                
102          self.SetSteuerklasse(int(self.stkl.get()))          self.SetSteuerklasse(int(self.stkl.get()))
103            self.SetKirchensteuer(int(self.kirche.get()))
104    
105      def CalcOutput(self):      def CalcOutput(self):
106          self.InitCalc()          self.InitCalc()
# Line 90  class Lohnrechner(LST2005.LStRechner2005 Line 109  class Lohnrechner(LST2005.LStRechner2005
109          self.lst.insert(0, "%.2f" % self.GetLohnsteuer())                  self.lst.insert(0, "%.2f" % self.GetLohnsteuer())        
110          self.soli.delete(0, END)          self.soli.delete(0, END)
111          self.soli.insert(0, "%.2f" % self.GetSoli())                  self.soli.insert(0, "%.2f" % self.GetSoli())        
112            self.kist.delete(0, END)
113            self.kist.insert(0, "%.2f" % self.GetKirchensteuer())        
114    
115    
116  if __name__ == "__main__":  if __name__ == "__main__":

Legend:
Removed from v.9  
changed lines
  Added in v.16

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26