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

Diff of /trunk/LST2008.py

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

revision 51 by wilde, Wed Jan 18 14:02:35 2006 UTC revision 52 by wilde, Tue Jan 24 15:06:40 2006 UTC
# Line 1  Line 1 
1  # -*- coding: iso-8859-1 -*-  # -*- coding: iso-8859-1 -*-
2  # --------------------------------------------------------------------  # --------------------------------------------------------------------
3  # LST2005 -- Python Modul zur Berechnung der Deutschen Lohnsteuer 2005  # LST2006 -- Python Modul zur Berechnung der Deutschen Lohnsteuer 2006
4  # $Id$  # $Id$
5  # --------------------------------------------------------------------  # --------------------------------------------------------------------
6  #  #
# Line 184  class LST: Line 184  class LST:
184                      0.024, # 2037                      0.024, # 2037
185                      0.016, # 2038                      0.016, # 2038
186                      0.008, # 2039                      0.008, # 2039
187                      0.000) # 2040                      0.000) # 2040
188          self._TAB2=(None,  # 1 als erstes Element, wie im PAP          self._TAB2=(None,  # 1 als erstes Element, wie im PAP
189                      3000,  # bis 2005                      3000,  # bis 2005
190                      2880,  # 2006                      2880,  # 2006
# Line 221  class LST: Line 221  class LST:
221                       180,  # 2037                       180,  # 2037
222                       120,  # 2038                       120,  # 2038
223                        60,  # 2039                        60,  # 2039
224                         0)  # 2040                         0)  # 2040
225          self._TAB3=(None,  # 1 als erstes Element, wie im PAP          self._TAB3=(None,  # 1 als erstes Element, wie im PAP
226                       900,  # bis 2005                       900,  # bis 2005
227                       864,  # 2006                       864,  # 2006
# Line 258  class LST: Line 258  class LST:
258                        54,  # 2037                        54,  # 2037
259                        36,  # 2038                        36,  # 2038
260                        18,  # 2039                        18,  # 2039
261                         0)  # 2040                         0)  # 2040
262          self._TAB4=self._TAB1          self._TAB4=self._TAB1
263          self._TAB5=(None,  # 1 als erstes Element, wie im PAP          self._TAB5=(None,  # 1 als erstes Element, wie im PAP
264                      1900,  # bis 2005                      1900,  # bis 2005
# Line 296  class LST: Line 296  class LST:
296                       114,  # 2037                       114,  # 2037
297                        76,  # 2038                        76,  # 2038
298                        38,  # 2039                        38,  # 2039
299                         0)  # 2040                         0)  # 2040
300          self._VBEZB = 0          self._VBEZB = 0
301          self._VHB = 0          self._VHB = 0
302          self._VSP = 0.0  # 2 Dezimalstellen          self._VSP = 0.0  # 2 Dezimalstellen
# Line 324  class LST: Line 324  class LST:
324          # ------------------------------------------------------------          # ------------------------------------------------------------
325          # Anfang der Berechnung          # Anfang der Berechnung
326          self._MRE4LZZ()          self._MRE4LZZ()
327            self._KENNZ = 0
328          self._RE4LZZ = self.RE4 - self._FVB \          self._RE4LZZ = self.RE4 - self._FVB \
329                          - self._ALTE - self.WFUNDF \                          - self._ALTE - self.WFUNDF \
330                          + self.HINZUR                          + self.HINZUR
# Line 351  class LST: Line 352  class LST:
352              self._FVBZ = 0              self._FVBZ = 0
353              self._FVB = 0              self._FVB = 0
354          else:          else:
355                if self.VJAHR < 2006:
356                    self._J = 1
357                elif self.VJAHR < 2040:
358                    self._J = VJAHR - 2004
359                else:
360                    self._J = 36
361              if self.LZZ == 1:              if self.LZZ == 1:
362                  self._VBEZB = self.VBEZM * self.ZMVB + self.VBEZS                  if ( self.STERBE + self.VKAPA ) > 0:
363                  self._FVBZ = 75 * self.ZMVB                      self._VBEZB = self.VBEZM * self.ZMVB + self.VBEZS
364                        self._HFVB = self._TAB2[self._J] * 100
365                        self._FVBZ = self._TAB3[self._J]
366                    else:
367                        self._VBEZB = self.VBEZM * self.ZMVB + self.VBEZS
368                        self._HFVB = self._TAB2[self._J] / 12 * self.ZMVB * 100
369                        self._FVBZ = ceil(self._TAB3[self._J] / 12 * self.ZMVB)
370              else:              else:
371                  self._VBEZB = self.VBEZM * 12 + self.VBEZS                  self._VBEZB = self.VBEZM * 12 + self.VBEZS
372                  self._FVBZ = 900                  self._HFVB = self._TAB2[self._J] * 100
373              self._FVB = ceil(self._VBEZB * 0.4)                  self._FVBZ = self._TAB3[self._J]
374              if self._FVB > 300000:              self._FVB = ceil(self._VBEZB * self._TAB1[self._J])
375                  self._FVB = 300000              if self._FVB > self._HFVB:
376                    self._FVB = self._HFVB
377              self._JW = self._FVB              self._JW = self._FVB
378              self._UPANTEIL()              self._UPANTEIL()
379              self._FVB = self._ANTEIL2              self._FVB = self._ANTEIL2
380          if self.ALTER1 == 0:          if self.ALTER1 == 0:
381              self._ALTE = 0              self._ALTE = 0
382          else:          else:
383                if self.AJAHR < 2006:
384                    self._K = 1
385                elif self.AJAHR < 2040:
386                    self._K = self.AJAHR - 2004
387                else:
388                    self._K = 36
389              self._BMG = self.RE4 - self.VBEZ              self._BMG = self.RE4 - self.VBEZ
390              self._ALTE = ceil(self._BMG * 0.4)              self._ALTE = ceil(self._BMG * TAB4[self._K])
391              self._JW = 190000              self._JW = TAB5[self._K] * 100
392              self._UPANTEIL()              self._UPANTEIL()
393              if self._ALTE > self._ANTEIL2:              if self._ALTE > self._ANTEIL2:
394                  self._ALTE = self._ANTEIL2                  self._ALTE = self._ANTEIL2
# Line 377  class LST: Line 397  class LST:
397          if self.LZZ == 1:          if self.LZZ == 1:
398              self._ZRE4 = FixedPointFloor(self._RE4LZZ / 100.0)              self._ZRE4 = FixedPointFloor(self._RE4LZZ / 100.0)
399              self._ZRE4VP = FixedPointFloor(self._RE4LZZV / 100.0)              self._ZRE4VP = FixedPointFloor(self._RE4LZZV / 100.0)
400                self._ZVBEZ = FixedPointFloor((self.VBEZ - self._FVB) / 100.0)
401          elif self.LZZ == 2:          elif self.LZZ == 2:
402              self._ZRE4 = FixedPointFloor((self._RE4LZZ + 0.67) * 0.12)              self._ZRE4 = FixedPointFloor((self._RE4LZZ + 0.67) * 0.12)
403              self._ZRE4VP = FixedPointFloor((self._RE4LZZV + 0.67) * 0.12)              self._ZRE4VP = FixedPointFloor((self._RE4LZZV + 0.67) * 0.12)
404                self._ZVBEZ = FixedPointFloor((self.VBEZ - self._FVB + 0.67) * 0.12)
405          elif self.LZZ == 3:          elif self.LZZ == 3:
406              self._ZRE4 = FixedPointFloor((self._RE4LZZ + 0.89) * 3.6 / 7)              self._ZRE4 = FixedPointFloor((self._RE4LZZ + 0.89) * 3.6 / 7)
407              self._ZRE4VP = FixedPointFloor((self._RE4LZZV + 0.89) * 3.6 / 7)              self._ZRE4VP = FixedPointFloor((self._RE4LZZV + 0.89) * 3.6 / 7)
408                self._ZVBEZ = FixedPointFloor((self.VBEZ - self._FVB + 0.89) * 3.6 / 7)
409          else:          else:
410              self._ZRE4 = FixedPointFloor((self._RE4LZZ + 0.56) * 3.6)              self._ZRE4 = FixedPointFloor((self._RE4LZZ + 0.56) * 3.6)
411              self._ZRE4VP = FixedPointFloor((self._RE4LZZV + 0.56) * 3.6)              self._ZRE4VP = FixedPointFloor((self._RE4LZZV + 0.56) * 3.6)
412                self._ZVBEZ = FixedPointFloor((self.VBEZ - self._FVB + 0.56) * 3.6)
413          if self._ZRE4 < 0:          if self._ZRE4 < 0:
414              self._ZRE4 = 0.0              self._ZRE4 = 0.0
415            if self._ZVBEZ < 0:
416                self._ZVBEZ = 0.0
417    
418      def _MZTABFB(self):      def _MZTABFB(self):
419          self._KZTAB = 1          self._ANP = 0
420          if self.STKL < 6:          if (self._ZVBEZ > 0) and (self._ZVBEZ < self._FVBZ):
421              if self.VBEZ > 0:              self._FVBZ = self._ZVBEZ
422            if (self.STKL < 6) and (self._ZVBEZ > 0):
423                if (self._ZVBEZ - self._FVBZ) < 102:
424                    self._ANP = self._ZVBEZ - self._FVBZ
425                else:
426                  self._ANP = 102                  self._ANP = 102
427              if self.RE4 > self.VBEZ:          if (self.STKL < 6) and (self._ZRE4 > self._ZVBEZ):
428                  self._ANP += 920              if (self._ZRE4 - self._ZVBEZ) < 920:
429          else:                  self._ANP = self._ANP + self._ZRE4 - self._ZVBEZ
430              self._ANP = 0              else:
431                    self._ANP = self._ANP + 920
432            self._KZTAB = 1
433          if self.STKL == 1:          if self.STKL == 1:
434              self._SAP = 36              self._SAP = 36
435              self._KFB = self.ZKF * 5808              self._KFB = self.ZKF * 5808
# Line 415  class LST: Line 447  class LST:
447          else:          else:
448              self._KFB = 0              self._KFB = 0
449          self._ZTABFB = self._EFA + self._ANP + self._SAP + self._FVBZ          self._ZTABFB = self._EFA + self._ANP + self._SAP + self._FVBZ
         self._KENNZ = 0  
450    
451      def _MLSTJAHR(self):      def _MLSTJAHR(self):
452          if self.STKL < 5:          if self.STKL < 5:
# Line 434  class LST: Line 465  class LST:
465    
466      def _UPEVP(self):      def _UPEVP(self):
467          if self.KRV == 1:          if self.KRV == 1:
468              self._VSP1 = 1.0              self._VSP1 = 0.0
469          else:          else:
470              if self._ZRE4VP > 62400:              if self._ZRE4VP > 63000:
471                  self._ZRE4VP = 62400                  self._ZRE4VP = 63000
472              self._VSP1 = 0.2 * self._ZRE4VP              self._VSP1 = 0.24 * self._ZRE4VP
473              self._VSP1 = FixedPointFloor(self._VSP1 * 0.0975)              self._VSP1 = FixedPointFloor(self._VSP1 * 0.0975)
474          self._VSP2 = FixedPointFloor(0.11 * self._ZRE4VP)          self._VSP2 = FixedPointFloor(0.11 * self._ZRE4VP)
475          self._VHB = 1500 * self._KZTAB          self._VHB = 1500 * self._KZTAB
# Line 450  class LST: Line 481  class LST:
481              self._VSP = self._VSPN              self._VSP = self._VSPN
482    
483      def _MVSP(self):      def _MVSP(self):
484          self._VSPO = self._ZRE4VP * 0.2          if self._KENNZ == 1:
485                self._VSPO = self._ZRE4VP1 * 0.2
486            else:
487                self._VSPO = self._ZRE4VP * 0.2
488          self._VSPVOR = 3068 * self._KZTAB          self._VSPVOR = 3068 * self._KZTAB
489          self._VSPMAX1 = 1334 * self._KZTAB          self._VSPMAX1 = 1334 * self._KZTAB
490          self._VSPMAX2 = 667 * self._KZTAB          self._VSPMAX2 = 667 * self._KZTAB
# Line 583  class LST: Line 617  class LST:
617              self.RE4 = self.JRE4              self.RE4 = self.JRE4
618              self._MRE4LZZ()              self._MRE4LZZ()
619              self._MRE4LZZ2()              self._MRE4LZZ2()
             self._MRE4()  
             self._MZTABFB()  
620              self._MLSTJAHR()              self._MLSTJAHR()
621              self._LST1 = self._ST * 100              self._LST1 = self._ST * 100
622              self.VBEZ = self.JVBEZ + self.VBS              self.VBEZ = self.JVBEZ + self.VBS
623              self.RE4 = self.JRE4 + self.SONSTB              self.RE4 = self.JRE4 + self.SONSTB
624                self.VBEZS = self.VBEZS + self.STERBE
625              self._MRE4LZZ()              self._MRE4LZZ()
626              self._MRE4LZZ2()              self._MRE4LZZ2()
             self._MRE4()  
627              self._MLSTJAHR()              self._MLSTJAHR()
628              self._LST2 = self._ST * 100              self._LST2 = self._ST * 100
629              self.STS = self._LST2 - self._LST1              self.STS = self._LST2 - self._LST1
630              self.SOLZS = self.STS * 5.5 / 100              self.SOLZS = floor(self.STS * 5.5 / 100)
631              if self.R > 0:              if self.R > 0:
632                  self.BKS = self.STS                  self.BKS = self.STS
633              else:              else:
# Line 617  class LST: Line 649  class LST:
649          self._RE4LZZ = self.RE4 - self._FVB - self._ALTE \          self._RE4LZZ = self.RE4 - self._FVB - self._ALTE \
650                         - self.JFREIB + self.JHINZU                         - self.JFREIB + self.JHINZU
651          self._RE4LZZV = self.RE4 - self._FVB - self._ALTE          self._RE4LZZV = self.RE4 - self._FVB - self._ALTE
652            self._MRE4()
653            self._MZTABFB()
654    
655      def _MVMT(self):      def _MVMT(self):
656          if self.VMT > 0:          # ------------------------------
657              # ------------------------------          # Nicht im offiziellen Programm-
658              # Nicht im offiziellen Programm-          # ablaufplan: Attribute sichern
659              # ablaufplan: Attribute sichern          old_lzz = self.LZZ
660              old_lzz = self.LZZ          old_vbez = self.VBEZ
661              old_vbez = self.VBEZ          old_re4 = self.RE4
662              old_re4 = self.RE4          # ------------------------------
663              # ------------------------------          if (self.VMT + self.VKAPA) > 0:
664              self.LZZ = 1              self.LZZ = 1
665              self.VBEZ = self.JVBEZ + self.VBS              self.VBEZ = self.JVBEZ + self.VBS
666              self.RE4 = self.JRE4 + self.SONSTB              self.RE4 = self.JRE4 + self.SONSTB
667              self._MRE4LZZ()              self._MRE4LZZ()
668              self._MRE4LZZ2()              self._MRE4LZZ2()
             self._MRE4()  
             self._MZTABFB()  
669              self._MLSTJAHR()              self._MLSTJAHR()
670              self._LST1 = self._ST * 100              self._LST1 = self._ST * 100
671                self.VMT = self.VMT + self.VKAPA
672                self.VBEZS = self.VBEZS + self.VKAPA
673                self.VBEZ = self.VBEZ + self.VKAPA
674              self.RE4 = self.JRE4 + self.SONSTB + self.VMT              self.RE4 = self.JRE4 + self.SONSTB + self.VMT
675              self._MRE4LZZ()              self._MRE4LZZ()
676              self._MRE4LZZ2()              self._MRE4LZZ2()
             self._MRE4()  
677              self._KENNZ = 1              self._KENNZ = 1
678              self._ZRE4VP1 = self._ZRE4VP              self._ZRE4VP1 = self._ZRE4VP
679              self._MLSTJAHR()              self._MLSTJAHR()
680              self._LST3 = self._ST * 100              self._LST3 = self._ST * 100
681                self.VBEZ = self.VBEZ - self.VKAPA
682              self.RE4 = self.JRE4 + self.SONSTB              self.RE4 = self.JRE4 + self.SONSTB
683              self._MRE4LZZ()              self._MRE4LZZ()
684              self.RE4 = self.JRE4 + self.SONSTB + self.VMT / 5              if (self.RE4 - self.JFREIB + self.JHINZU) < 0:
685              self._MRE4LZZ2()                  self.RE4 = self.RE4 - self.JFREIB + self.JHINZU
686              self._MRE4()                  self.JFREIB = 0
687              self._MLSTJAHR()                  self.JHINZU = 0
688              self._LST2 = self._ST * 100                  self.RE4 = (self.RE4 + self.VMT) / 5
689              self.STV = (self._LST2 - self._LST1) * 5                  self._MRE4LZZ2()
690                    self._MLSTJAHR()
691                    self._LST2 = self._ST * 100
692                    self.STV = self._LST2 * 5
693                else:
694                    self.RE4 = self.RE4 + self.VMT / 5
695                    self._MRE4LZZ2()
696                    self._MLSTJAHR()
697                    self._LST2 = self._ST * 100
698                    self.STV = (self._LST2 - self._LST1) * 5
699              self._LST3 -= self._LST1              self._LST3 -= self._LST1
700              if self._LST3 < self.STV:              if self._LST3 < self.STV:
701                  self.STV = self._LST3                  self.STV = self._LST3
# Line 767  class LST: Line 811  class LST:
811  # Berechnungen, es fehlen insbesondere die Berechnungen zu Mehrj�hrigen  # Berechnungen, es fehlen insbesondere die Berechnungen zu Mehrj�hrigen
812  # Bez�gen und Sonstigen Leistungen.  # Bez�gen und Sonstigen Leistungen.
813    
814  class LStRechner2005(LST):  class LStRechner2006(LST):
815      def __init__(self):      def __init__(self):
816          LST.__init__(self)          LST.__init__(self)
817    

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26