[Lohnrechner-commits] r52 - /

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Tue Jan 24 16:06:40 CET 2006


Author: wilde
Date: 2006-01-24 16:06:40 +0100 (Tue, 24 Jan 2006)
New Revision: 52

Modified:
   LST2006.py
Log:
Entsprechend Programmablaufplan f?\195?\188r 2006 ge?\195?\164ndert.


Modified: LST2006.py
===================================================================
--- LST2006.py	2006-01-23 17:07:57 UTC (rev 51)
+++ LST2006.py	2006-01-24 15:06:40 UTC (rev 52)
@@ -1,6 +1,6 @@
 # -*- coding: iso-8859-1 -*-
 # --------------------------------------------------------------------
-# LST2005 -- Python Modul zur Berechnung der Deutschen Lohnsteuer 2005
+# LST2006 -- Python Modul zur Berechnung der Deutschen Lohnsteuer 2006
 # $Id$
 # --------------------------------------------------------------------
 #
@@ -184,7 +184,7 @@
                     0.024, # 2037
                     0.016, # 2038
                     0.008, # 2039
-                    0.000) # 2040 
+                    0.000) # 2040
         self._TAB2=(None,  # 1 als erstes Element, wie im PAP
                     3000,  # bis 2005
                     2880,  # 2006
@@ -221,7 +221,7 @@
                      180,  # 2037
                      120,  # 2038
                       60,  # 2039
-                       0)  # 2040 
+                       0)  # 2040
         self._TAB3=(None,  # 1 als erstes Element, wie im PAP
                      900,  # bis 2005
                      864,  # 2006
@@ -258,7 +258,7 @@
                       54,  # 2037
                       36,  # 2038
                       18,  # 2039
-                       0)  # 2040 
+                       0)  # 2040
         self._TAB4=self._TAB1
         self._TAB5=(None,  # 1 als erstes Element, wie im PAP
                     1900,  # bis 2005
@@ -296,7 +296,7 @@
                      114,  # 2037
                       76,  # 2038
                       38,  # 2039
-                       0)  # 2040 
+                       0)  # 2040
         self._VBEZB = 0
         self._VHB = 0
         self._VSP = 0.0  # 2 Dezimalstellen
@@ -324,6 +324,7 @@
         # ------------------------------------------------------------
         # Anfang der Berechnung
         self._MRE4LZZ()
+        self._KENNZ = 0
         self._RE4LZZ = self.RE4 - self._FVB \
                         - self._ALTE - self.WFUNDF \
                         + self.HINZUR
@@ -351,24 +352,43 @@
             self._FVBZ = 0
             self._FVB = 0
         else:
+            if self.VJAHR < 2006:
+                self._J = 1
+            elif self.VJAHR < 2040:
+                self._J = VJAHR - 2004
+            else:
+                self._J = 36
             if self.LZZ == 1:
-                self._VBEZB = self.VBEZM * self.ZMVB + self.VBEZS
-                self._FVBZ = 75 * self.ZMVB
+                if ( self.STERBE + self.VKAPA ) > 0:
+                    self._VBEZB = self.VBEZM * self.ZMVB + self.VBEZS
+                    self._HFVB = self._TAB2[self._J] * 100
+                    self._FVBZ = self._TAB3[self._J]
+                else:
+                    self._VBEZB = self.VBEZM * self.ZMVB + self.VBEZS
+                    self._HFVB = self._TAB2[self._J] / 12 * self.ZMVB * 100
+                    self._FVBZ = ceil(self._TAB3[self._J] / 12 * self.ZMVB)
             else:
                 self._VBEZB = self.VBEZM * 12 + self.VBEZS
-                self._FVBZ = 900
-            self._FVB = ceil(self._VBEZB * 0.4)
-            if self._FVB > 300000:
-                self._FVB = 300000
+                self._HFVB = self._TAB2[self._J] * 100
+                self._FVBZ = self._TAB3[self._J]
+            self._FVB = ceil(self._VBEZB * self._TAB1[self._J])
+            if self._FVB > self._HFVB:
+                self._FVB = self._HFVB
             self._JW = self._FVB
             self._UPANTEIL()
             self._FVB = self._ANTEIL2
         if self.ALTER1 == 0:
             self._ALTE = 0
         else:
+            if self.AJAHR < 2006:
+                self._K = 1
+            elif self.AJAHR < 2040:
+                self._K = self.AJAHR - 2004
+            else:
+                self._K = 36
             self._BMG = self.RE4 - self.VBEZ
-            self._ALTE = ceil(self._BMG * 0.4)
-            self._JW = 190000
+            self._ALTE = ceil(self._BMG * TAB4[self._K])
+            self._JW = TAB5[self._K] * 100
             self._UPANTEIL()
             if self._ALTE > self._ANTEIL2:
                 self._ALTE = self._ANTEIL2
@@ -377,27 +397,39 @@
         if self.LZZ == 1:
             self._ZRE4 = FixedPointFloor(self._RE4LZZ / 100.0)
             self._ZRE4VP = FixedPointFloor(self._RE4LZZV / 100.0)
+            self._ZVBEZ = FixedPointFloor((self.VBEZ - self._FVB) / 100.0)
         elif self.LZZ == 2:
             self._ZRE4 = FixedPointFloor((self._RE4LZZ + 0.67) * 0.12)
             self._ZRE4VP = FixedPointFloor((self._RE4LZZV + 0.67) * 0.12)
+            self._ZVBEZ = FixedPointFloor((self.VBEZ - self._FVB + 0.67) * 0.12)
         elif self.LZZ == 3:
             self._ZRE4 = FixedPointFloor((self._RE4LZZ + 0.89) * 3.6 / 7)
             self._ZRE4VP = FixedPointFloor((self._RE4LZZV + 0.89) * 3.6 / 7)
+            self._ZVBEZ = FixedPointFloor((self.VBEZ - self._FVB + 0.89) * 3.6 / 7)
         else:
             self._ZRE4 = FixedPointFloor((self._RE4LZZ + 0.56) * 3.6)
             self._ZRE4VP = FixedPointFloor((self._RE4LZZV + 0.56) * 3.6)
+            self._ZVBEZ = FixedPointFloor((self.VBEZ - self._FVB + 0.56) * 3.6)
         if self._ZRE4 < 0:
             self._ZRE4 = 0.0
+        if self._ZVBEZ < 0:
+            self._ZVBEZ = 0.0
 
     def _MZTABFB(self):
+        self._ANP = 0
+        if (self._ZVBEZ > 0) and (self._ZVBEZ < self._FVBZ):
+            self._FVBZ = self._ZVBEZ
+        if (self.STKL < 6) and (self._ZVBEZ > 0):
+            if (self._ZVBEZ - self._FVBZ) < 102:
+                self._ANP = self._ZVBEZ - self._FVBZ
+            else:
+                self._ANP = 102
+        if (self.STKL < 6) and (self._ZRE4 > self._ZVBEZ):
+            if (self._ZRE4 - self._ZVBEZ) < 920:
+                self._ANP = self._ANP + self._ZRE4 - self._ZVBEZ
+            else:
+                self._ANP = self._ANP + 920
         self._KZTAB = 1
-        if self.STKL < 6:
-            if self.VBEZ > 0:
-                self._ANP = 102
-            if self.RE4 > self.VBEZ:
-                self._ANP += 920
-        else:
-            self._ANP = 0
         if self.STKL == 1:
             self._SAP = 36
             self._KFB = self.ZKF * 5808
@@ -415,7 +447,6 @@
         else:
             self._KFB = 0
         self._ZTABFB = self._EFA + self._ANP + self._SAP + self._FVBZ
-        self._KENNZ = 0
 
     def _MLSTJAHR(self):
         if self.STKL < 5:
@@ -434,11 +465,11 @@
 
     def _UPEVP(self):
         if self.KRV == 1:
-            self._VSP1 = 1.0
+            self._VSP1 = 0.0
         else:
-            if self._ZRE4VP > 62400:
-                self._ZRE4VP = 62400
-            self._VSP1 = 0.2 * self._ZRE4VP
+            if self._ZRE4VP > 63000:
+                self._ZRE4VP = 63000
+            self._VSP1 = 0.24 * self._ZRE4VP
             self._VSP1 = FixedPointFloor(self._VSP1 * 0.0975)
         self._VSP2 = FixedPointFloor(0.11 * self._ZRE4VP)
         self._VHB = 1500 * self._KZTAB
@@ -450,7 +481,10 @@
             self._VSP = self._VSPN
 
     def _MVSP(self):
-        self._VSPO = self._ZRE4VP * 0.2
+        if self._KENNZ == 1:
+            self._VSPO = self._ZRE4VP1 * 0.2
+        else:
+            self._VSPO = self._ZRE4VP * 0.2
         self._VSPVOR = 3068 * self._KZTAB
         self._VSPMAX1 = 1334 * self._KZTAB
         self._VSPMAX2 = 667 * self._KZTAB
@@ -583,19 +617,17 @@
             self.RE4 = self.JRE4
             self._MRE4LZZ()
             self._MRE4LZZ2()
-            self._MRE4()
-            self._MZTABFB()
             self._MLSTJAHR()
             self._LST1 = self._ST * 100
             self.VBEZ = self.JVBEZ + self.VBS
             self.RE4 = self.JRE4 + self.SONSTB
+            self.VBEZS = self.VBEZS + self.STERBE
             self._MRE4LZZ()
             self._MRE4LZZ2()
-            self._MRE4()
             self._MLSTJAHR()
             self._LST2 = self._ST * 100
             self.STS = self._LST2 - self._LST1
-            self.SOLZS = self.STS * 5.5 / 100
+            self.SOLZS = floor(self.STS * 5.5 / 100)
             if self.R > 0:
                 self.BKS = self.STS
             else:
@@ -617,41 +649,53 @@
         self._RE4LZZ = self.RE4 - self._FVB - self._ALTE \
                        - self.JFREIB + self.JHINZU
         self._RE4LZZV = self.RE4 - self._FVB - self._ALTE
+        self._MRE4()
+        self._MZTABFB()
 
     def _MVMT(self):
-        if self.VMT > 0:
-            # ------------------------------
-            # Nicht im offiziellen Programm-
-            # ablaufplan: Attribute sichern
-            old_lzz = self.LZZ
-            old_vbez = self.VBEZ
-            old_re4 = self.RE4
-            # ------------------------------
+        # ------------------------------
+        # Nicht im offiziellen Programm-
+        # ablaufplan: Attribute sichern
+        old_lzz = self.LZZ
+        old_vbez = self.VBEZ
+        old_re4 = self.RE4
+        # ------------------------------
+        if (self.VMT + self.VKAPA) > 0:
             self.LZZ = 1
             self.VBEZ = self.JVBEZ + self.VBS
             self.RE4 = self.JRE4 + self.SONSTB
             self._MRE4LZZ()
             self._MRE4LZZ2()
-            self._MRE4()
-            self._MZTABFB()
             self._MLSTJAHR()
             self._LST1 = self._ST * 100
+            self.VMT = self.VMT + self.VKAPA
+            self.VBEZS = self.VBEZS + self.VKAPA
+            self.VBEZ = self.VBEZ + self.VKAPA
             self.RE4 = self.JRE4 + self.SONSTB + self.VMT
             self._MRE4LZZ()
             self._MRE4LZZ2()
-            self._MRE4()
             self._KENNZ = 1
             self._ZRE4VP1 = self._ZRE4VP
             self._MLSTJAHR()
             self._LST3 = self._ST * 100
+            self.VBEZ = self.VBEZ - self.VKAPA
             self.RE4 = self.JRE4 + self.SONSTB
             self._MRE4LZZ()
-            self.RE4 = self.JRE4 + self.SONSTB + self.VMT / 5
-            self._MRE4LZZ2()
-            self._MRE4()
-            self._MLSTJAHR()
-            self._LST2 = self._ST * 100
-            self.STV = (self._LST2 - self._LST1) * 5
+            if (self.RE4 - self.JFREIB + self.JHINZU) < 0:
+                self.RE4 = self.RE4 - self.JFREIB + self.JHINZU
+                self.JFREIB = 0
+                self.JHINZU = 0
+                self.RE4 = (self.RE4 + self.VMT) / 5
+                self._MRE4LZZ2()
+                self._MLSTJAHR()
+                self._LST2 = self._ST * 100
+                self.STV = self._LST2 * 5
+            else:
+                self.RE4 = self.RE4 + self.VMT / 5
+                self._MRE4LZZ2()
+                self._MLSTJAHR()
+                self._LST2 = self._ST * 100
+                self.STV = (self._LST2 - self._LST1) * 5
             self._LST3 -= self._LST1
             if self._LST3 < self.STV:
                 self.STV = self._LST3
@@ -767,7 +811,7 @@
 # Berechnungen, es fehlen insbesondere die Berechnungen zu Mehrjährigen
 # Bezügen und Sonstigen Leistungen.
 
-class LStRechner2005(LST):
+class LStRechner2006(LST):
     def __init__(self):
         LST.__init__(self)
 



More information about the Lohnrechner-commits mailing list