home *** CD-ROM | disk | FTP | other *** search
/ Chip: 25 Years Anniversary / CHIP_25Jahre_Jubilaeum.iso / downloads / 400616 / data1.cab / _lohnauskunft-Formulare-Standard / gesabzug.lsf < prev    next >
Text File  |  2003-04-01  |  5KB  |  183 lines

  1. Include "DruckNT.int"
  2. Include "Lak_NT.int"
  3.  
  4. 'Descriptions
  5. Description Form_Description as "Gesamtabzugstabelle normal"
  6. Description Form_Code as "Gesamtabzugstabelle"
  7. Description Page_Orientation as PAGE_LANDSCAPE
  8.  
  9. SetBodyMargin(200,140,200,180)
  10. SetFooterMargin(210,180,210,100)
  11. Dim hNormal as FontType = CreateFont("Arial", 10, FONT_NORMAL, COLOR_BLACK)
  12. Dim hBold as FontType = CreateFont("Arial", 10, FONT_BOLD, COLOR_BLACK)
  13. Dim hMini as FontType = CreateFont("Arial", 8, FONT_NORMAL, COLOR_BLACK)
  14. Dim hTitel as FontType=CreateFont("Arial", 12, FONT_BOLD, COLOR_BLACK)
  15.  
  16. Dim i as Numeric
  17. Dim NumTmp as Numeric
  18.  
  19. Dim Datensatz as Bool
  20. Dim LSt as String
  21. Dim SolZ as String
  22. Dim KSt as String
  23. Dim KV as String
  24. Dim PV as String
  25. Dim RV as String
  26. Dim AV as String
  27. Dim Netto as String
  28. Dim Waehrung as String
  29. Dim DiffWaehrg as Numeric
  30. Dim NumJahr as Numeric 
  31.  
  32.  
  33. NumJahr = GetInt("O",21)
  34.  
  35.  
  36. If  ( NumJahr <= 2001 )  Then
  37.  
  38.     Waehrung = "DM"
  39.     DiffWaehrg = 1000
  40.  
  41. Else
  42.  
  43.     Waehrung = "EUR"
  44.     DiffWaehrg = 500
  45.  
  46. End If
  47.  
  48.  
  49. Function Vordruck()
  50.     
  51.     Dim Steuerklasse as String
  52.     
  53.     Steuerklasse=StrInt("O",10)
  54.  
  55.     If Steuerklasse="0" Then Steuerklasse="0" End If
  56.     If Steuerklasse="1" Then Steuerklasse="I" End If
  57.     If Steuerklasse="2" Then Steuerklasse="II" End If
  58.     If Steuerklasse="3" Then Steuerklasse="III" End If
  59.     If Steuerklasse="4" Then Steuerklasse="IV" End If
  60.     If Steuerklasse="5" Then Steuerklasse="V" End If
  61.     If Steuerklasse="6" Then Steuerklasse="VI" End If
  62.     If Steuerklasse="-2" Then Steuerklasse="Pauschal" End If
  63.  
  64.     RemoveAllTabs()
  65.     SetTabs("L95 L1800 L2200")
  66.     SelectFont(hTitel)
  67.     SetPos(0,40)
  68.     T( "\tGesamtabzugstabelle " + FormatNumeric( "%0.0f", NumJahr ) )
  69.     SelectFont(hNormal)
  70.     TL("\tSteuerklasse:  "+Steuerklasse+"\tAnzahl Kinder:  "+StrKfb("O",11)) 
  71.     RemoveAllTabs()
  72.     SelectFont(hNormal)
  73.     SetPos(0,GetPosY()+30)
  74.     NumTmp=GetPosY()
  75.     DrawLineExt(0,NumTmp,2570,NumTmp)
  76.     
  77.     DrawLineExt(0,0,2570,0)
  78.     DrawLineExt(0,1780,2570,1780)
  79.     DrawLineExt(0,0,0,1780)
  80.     DrawLineExt(540,NumTmp,540,1780)
  81.     DrawLineExt(720,NumTmp,720,1780)
  82.     DrawLineExt(980,NumTmp,980,1780)
  83.     DrawLineExt(1230,NumTmp,1230,1780)
  84.     DrawLineExt(1480,NumTmp,1480,1780)
  85. '    DrawLineExt(1680,NumTmp,1680,1780)
  86.     DrawLineExt(1880,NumTmp,1880,1780)
  87. '    DrawLineExt(2080,NumTmp,2080,1780)
  88.     DrawLineExt(2320,NumTmp,2320,1780)
  89.     DrawLineExt(2570,0,2570,1780)
  90.  
  91.     SetTabs("C270 C600 C630 C850 C1105 C1355 C1580 C1780 C1980 C2200 C2445")
  92.     SetPos(0,GetPosY()+20)
  93.     TL("\t\t\tZusatz-"+"\t\tSolidaritΣts-"+"\tKirchen-"+"\tKranken-"+"\tPflege-"+"\tRenten-"+"\tArbeitslosen-")
  94.     Dim NumTmp2 as Numeric
  95.     NumTmp2=GetPosY()
  96.     DrawLineExt(1680,NumTmp,1680,NumTmp2)
  97.     DrawLineExt(2080,NumTmp,2080,NumTmp2)
  98.     SetPos(0,NumTmp2+5)
  99.     RemoveAllTabs()
  100.     SetTabs("C270 C600 C630 C850 C1105 C1355 C1680 C2100 C2400 C2430 C2455")
  101.     TL("\t"+StrStr("O",9)+" Bruttolohn"+"\t\tTabelle?"+"\tLohnsteuer"+"\tzuschlag"+"\tsteuer"+"\tversicherung"+"\tversicherung"
  102.         +"\t\t\tNettolohn")
  103.     NumTmp2=GetPosY()
  104.     DrawLineExt(1680,NumTmp2+8,1680,1780)
  105.     DrawLineExt(2080,NumTmp2+8,2080,1780)
  106.     SetPos(0,NumTmp2+20)
  107.     RemoveAllTabs()
  108.     SetTabs("C270 C600 C630 C850 C1105 C1355 C1580 C1780 C1980 C2200 C2445")
  109.     SelectFont(hMini)
  110.     TL("\tin "+Waehrung+"\t\t"+"\tin "+Waehrung+"\tin "+Waehrung+"\t"+StrAmt("O",16)+" %\t"+StrAmt("O",12)+" %\t"+StrAmt("O",18)+" %\t"
  111.         +StrAmt("O",13)+" %\t"+StrAmt("O",14)+" %\tin "+Waehrung )
  112.     NumTmp=GetPosY()+20
  113.     DrawLineExt(0,NumTmp,2570,NumTmp)
  114.     SetPos(0,NumTmp+40)
  115.     RemoveAllTabs()
  116.     SetTabs("R295 R490 C630 R945 R1195 R1435 R1640 R1845 R2045 R2255 R2535")
  117.     SelectFont(hNormal)
  118.     i=1
  119. End Function     
  120.  
  121.  
  122. Function GetWerte()
  123.     
  124.     LSt=StrAmt("O",2)
  125.     If LSt="0,00" then LSt="-" End If
  126.  
  127.     SolZ=StrAmt("O",19)
  128.     If SolZ="0,00" then SolZ="-" End If
  129.  
  130.     KSt=StrAmt("O",4)
  131.     If KSt="0,00" then KSt="-" End If
  132.  
  133.     KV=StrAmt("O",5)
  134.     If KV="0,00" then KV="-" End If
  135.  
  136.     PV=StrAmt("O",17)
  137.     If PV="0,00" then PV="-" End If
  138.  
  139.     RV=StrAmt("O",6)
  140.     If RV="0,00" then RV="-" End If
  141.     
  142.     AV=StrAmt("O",7)
  143.     If AV="0,00" then AV="-" End If
  144.  
  145.     Netto=StrAmt("O",22)
  146.     If Netto="0,00" then Netto="-" End If
  147.  
  148. End Function
  149.  
  150.  
  151. Function PrintFooter()
  152.     SelectFont(hMini)
  153.     RemoveAllTabs()
  154.     SetTabs("C1285 R")
  155.     SetPos(0,GetPosY()+15)
  156.     T("Lexware lohnauskunft "+GetProgramVersion()+"\t- " +PAGENUMBER+ " -\t"+FormatDate("%d.%m.%Y",Now()))
  157. End Function
  158.  
  159.  
  160. SetEventHandler(EVENT_START_PAGE,Vordruck)
  161. SetEventHandler(EVENT_PRINT_FOOTER,PrintFooter)
  162.  
  163. Vordruck()
  164. RemoveAllTabs()
  165. SetTabs("R295 R490 C630 R945 R1195 R1435 R1640 R1845 R2045 R2255 R2535")
  166. SelectFont(hNormal)
  167. Datensatz=FirstRecord("O")
  168.  
  169. Dim Zeilenhoehe as Numeric
  170.  
  171. Zeilenhoehe=GetLineHeight()
  172.  
  173. While Datensatz Do
  174.     GetWerte()
  175.     TL("\t"+StrAmt("O",8)+"  bis"+"\t"+StrAmt("O",1)+"\t"+StrBool("O",3)+"\t"+LSt+"\t"+SolZ+"\t"+KSt+"\t"+KV+"\t"+PV+"\t"+RV+"\t"+AV+"\t"+Netto)
  176.     If i=5 AND (Zeilenhoehe<=1780-GetPosY()) Then
  177.         LF
  178.         i=0
  179.     End If
  180.     i=i+1
  181.     Datensatz=NextRecord("O")
  182. End While
  183.