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

  1. Include "DruckNT.int"
  2. Include "Lak_NT.int"
  3.  
  4.  
  5. 'Descriptions
  6. Description Form_Description as "Vergleichsberechnung"
  7. Description Form_Code as "Vergleichsberechnung"
  8. Description Page_Orientation as PAGE_PORTRAIT
  9.  
  10. SetBodyMargin(135,80,105,200)
  11. 'SetFooterMargin(145, 230, 130, 50)
  12.  
  13.  
  14.  
  15.  
  16. 'ZΣhlvariablen
  17. dim i as Numeric=0
  18. dim j as Numeric=2
  19. dim k as Numeric=1
  20. Dim n as Numeric
  21.  
  22. Dim gerade as Bool=FALSE
  23.  
  24. 'Schriftgr÷▀en
  25. Dim TopGross as FontType=CreateFont("Arial", 14, FONT_BOLD, COLOR_BLACK)
  26. Dim TopNormal as FontType=CreateFont("Arial", 12, FONT_BOLD, COLOR_BLACK)
  27. Dim Normal as FontType=CreateFont("Arial", 10, FONT_NORMAL, COLOR_BLACK)
  28. Dim NormalBold as FontType=CreateFont("Arial", 10, FONT_BOLD, COLOR_BLACK)
  29.  
  30.  
  31. 'Farben
  32. Const COLOR_GREY_LIGHT as 15790320
  33. Const COLOR_GREY_DARK as 13158600
  34.  
  35.  
  36. Function OnPrintFooter()
  37.     SetFont("Arial",8,FONT_NORMAL,COLOR_BLACK)
  38.     SetTabs("L1 C R")
  39.     T("\tLexware lohnauskunft  " +GetProgramVersion()+"\t"+"\t"+FormatDate("%d.%m.%Y",Now()))
  40. '    DrawBitmap(700, GetPosY()+5,22,23,"copyright.bmp")
  41.     RemoveAllTabs()
  42. End Function
  43.  
  44.  
  45. Function BorderWidth(id as CellType, left as Numeric, top as Numeric, right as Numeric, bottom as Numeric)
  46.     SetCellBorder(id, CELL_BORDER_LEFT,left ,PEN_SOLID, COLOR_BLACK)
  47.     SetCellBorder(id, CELL_BORDER_TOP, top,PEN_SOLID, COLOR_BLACK)
  48.     SetCellBorder(id, CELL_BORDER_RIGHT, right,PEN_SOLID, COLOR_BLACK)
  49.     SetCellBorder(id, CELL_BORDER_BOTTOM,bottom ,PEN_SOLID, COLOR_BLACK)
  50. End Function
  51.  
  52.  
  53. Dim cVergleich as CellType=CreateCell(0,0, CELL_TYPE_DYNHORZ+CELL_TYPE_DYNVERT+CELL_TYPE_VERT)
  54. Dim cVergleichTop as CellType=CreateCellEx(cVergleich,1850, 80, CELL_TYPE_DYNHORZ, "Vergleichsberechnung",
  55.     TopGross, CELL_TEXT_LEFT, COLOR_GREY_DARK, hSolidPen, hSolidPen, hSolidPen, hSolidPen, hNullPen, 30,15,0,0)
  56.  
  57. BorderWidth(cVergleichTop, 3, 3, 3, 3)
  58.  
  59. DrawCell(cVergleichTop,TRUE)
  60.  
  61.  
  62. Dim cZeile as CellType=CreateCellEx(cVergleich, 1850, 60, CELL_TYPE_HORZ+CELL_TYPE_DYNVERT, "",
  63.     Normal, CELL_TEXT_LEFT, COLOR_WHITE, hSolidPen, hSolidPen , hSolidPen, hSolidPen, hNullPen, 15,20,0,0)
  64.  
  65. Function Cell( index as Numeric) as CellType
  66.     Cell=GetCellByIndex(cZeile, index)
  67. End Function
  68.  
  69. BorderWidth(cZeile,3,1,3,0)
  70.  
  71. Dim Ergebnis as CellType=CreateCellEx(cZeile, 540 , 60, CELL_TYPE_DYNVERT, "", Normal, CELL_TEXT_LEFT, COLOR_TRANSPARENT,
  72.                                         hNullPen, hNullPen, hSolidPen, hNullPen, hNullPen, 15, 10 , 0 ,10 )
  73. Dim Name1 as CellType=(CreateCellEx(cZeile, 425 , 60,CELL_TYPE_DYNVERT, "", Normal, CELL_TEXT_RIGHT, COLOR_TRANSPARENT,
  74.                                         hNullPen, hNullPen, hSolidPen, hNullPen, hNullPen,0 , 10 ,15  ,10 ))
  75. Dim Name2 as CellType=(CreateCellEx(cZeile, 425 , 60,CELL_TYPE_DYNVERT, "", Normal, CELL_TEXT_RIGHT, COLOR_TRANSPARENT,
  76.                                         hNullPen, hNullPen, hSolidPen, hNullPen, hNullPen, 0, 10 , 15 ,10 ))
  77. Dim Differenz as CellType=(CreateCellEx(cZeile, 270 , 60,CELL_TYPE_DYNVERT, "", Normal,CELL_TEXT_RIGHT, COLOR_TRANSPARENT,
  78.                                         hNullPen, hNullPen, hSolidPen, hNullPen, hNullPen, 0, 10 ,15 ,10))
  79. Dim Waehrung as CellType=(CreateCellEx(cZeile, 190 , 60,CELL_TYPE_DYNVERT, "", Normal,CELL_TEXT_CENTER, COLOR_TRANSPARENT,
  80.                                         hNullPen, hNullPen, hSolidPen, hNullPen, hNullPen, 0, 10 ,0  ,10))
  81.  
  82. While k<5 Do
  83.     BorderWidth(Cell(k),0,0,2,0)
  84. k=k+1
  85. End While
  86.  
  87. While i<=41 Do
  88.     
  89.     If i=0 Then
  90.         SetCellBackground(cZeile, COLOR_GREY_LIGHT)
  91.         k=1
  92.         While k<=5 Do
  93.         SelectCellFont(Cell(k), NormalBold)
  94.         k=k+1
  95.         End While
  96.         SetCellBorder(cZeile, CELL_BORDER_TOP, 0,PEN_SOLID, COLOR_BLACK)
  97.     End If
  98.  
  99.     If i=1 OR i=22 Then
  100.         SetCellBackground(cZeile, COLOR_GREY_DARK)
  101.         k=1
  102.         While k<=5 Do
  103.         SelectCellFont(Cell(k),NormalBold)
  104.         k=k+1
  105.         End While
  106.         SelectCellFont(cZeile, NormalBold)
  107.         SetCellBorder(cZeile, CELL_BORDER_TOP, 3,PEN_SOLID, COLOR_BLACK)
  108.     End If
  109.  
  110.     If i=41 Then
  111.         SetCellBorder(cZeile, CELL_BORDER_BOTTOM, 3,PEN_SOLID, COLOR_BLACK)
  112.     End If
  113.  
  114.     If i>1 AND i<22 AND gerade=TRUE Then
  115.         SetCellBackground(cZeile, COLOR_GREY_LIGHT)
  116.     End If
  117.     
  118.     If i>22  AND gerade=FALSE Then
  119.         SetCellBackground(cZeile, COLOR_GREY_LIGHT)
  120.     End If
  121.  
  122.     If (0<i AND i<=28) OR i>=36 Then
  123.         SetCellText(Cell(1), Get("V",100+i))
  124.         If i=2 Then SetCellText(Cell(1), "Jahr - Monat") End If
  125.         If i=14 Then SetCellText(Cell(1), "╓ffentlicher Dienst") End If
  126.     Else
  127.         If i=29 Then
  128.             SetCellText(Cell(1), "pauschale Lohnsteuer")
  129.         End If
  130.         If i=30 Then
  131.             SetCellText(Cell(1), "pauschaler SolidaritΣtszuschlag")
  132.         End If
  133.         If i=31 Then
  134.             SetCellText(Cell(1), "pauschale Kirchensteuer")
  135.         End If
  136.         If i=32 Then
  137.             SetCellText(Cell(1), "Krankenversicherung")
  138.         End If
  139.         If i=33 Then
  140.             SetCellText(Cell(1), "Pflegeversicherung")
  141.         End If
  142.         If i=34 Then
  143.             SetCellText(Cell(1), "Rentenversicherung")
  144.         End If
  145.         If i=35 Then
  146.             SetCellText(Cell(1), "Arbeitslosenversicherung")
  147.         End If
  148.     End If
  149.     
  150.     If i=38 Then
  151.         SetCellText(Cell(1), "gesetzliche Abzⁿge")
  152.     End If
  153.  
  154.     If i<=4 OR (7<=i AND i<=14) OR i=22 Then
  155.         If i<>0 Then
  156.             j=2
  157.             While j<=4 Do
  158.                 SetCellText(Cell(j), StrStr("V",j*100+i))
  159.                 j=j+1
  160.             End While
  161.             If StrStr("V",200+i)<>StrStr("V",300+i) Then
  162.                 SetCellAlign(Cell(4), CELL_TEXT_CENTER)
  163.             End If
  164.             SetCellText(Cell(5), "")
  165.         Else
  166.             SetCellText(Cell(2), StrStr("V",2))
  167.             SetCellText(Cell(3), StrStr("V",3))
  168.             SetCellText(Cell(4), "Differenz")
  169.             SetCellText(Cell(5), "WΣhrung")
  170.         End If
  171.     Else
  172.         j=2
  173.         While j<=4 Do
  174.             If i<>5 Then
  175.                 SetCellText(Cell(j), StrAmt("V",j*100+i))
  176.             Else
  177.                 SetCellText(Cell(j), FormatNumeric("%.1f", GetNumeric("V",j*100+i)))
  178.             End If
  179.             j=j+1
  180.         End While
  181.         If StrAmt("V",200+i)=StrAmt("V",300+i) Then
  182.             SetCellText(Cell(4), "")
  183.         End If
  184.         If i<>5 Then
  185.             SetCellText(Cell(5), StrStr("V",1))
  186.         Else
  187.             SetCellText(Cell(5), "")
  188.         End If
  189.     End If
  190.  
  191. DrawCell(cZeile, TRUE)
  192.  
  193. SetCellAlign(Cell(4), CELL_TEXT_RIGHT)
  194. SetCellBackground(cZeile, COLOR_WHITE)
  195. SelectCellFont(cZeile, Normal)
  196. SetCellBorder(cZeile, CELL_BORDER_TOP, 1,PEN_SOLID, COLOR_BLACK)
  197. k=1
  198.         While k<=5 Do
  199.         SelectCellFont(Cell(k), Normal)
  200.         k=k+1
  201.         End While
  202. i=i+1
  203.  
  204. IF gerade=TRUE Then
  205.     gerade=FALSE
  206. Else
  207.     gerade=TRUE
  208. End If
  209. End While
  210.  
  211. Dim NumTmp as Numeric
  212. NumTmp=GetPosY()
  213. SetFont("Arial",8,FONT_NORMAL,COLOR_BLACK)
  214. If NumTmp<2690-GetLineHeight()-15 Then
  215.     SetPos(20,NumTmp+10)
  216.     T("Lexware lohnauskunft "+GetProgramVersion())
  217.     RemoveAllTabs()
  218.     SetTabs("R-30")
  219.     T("\t"+FormatDate("%d.%m.%Y",Now()))
  220.     RemoveAllTabs()
  221. Else
  222.     SetPos(1150,30)
  223.     T("Lexware lohnauskunft "+GetProgramVersion())
  224.     SetPos(1670,30)
  225.     T("\t"+FormatDate("%d.%m.%Y",Now()))
  226. End If
  227.