home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / hc / hyperpay.sit / HyperPayroll / background_2135.txt < prev    next >
Encoding:
Text File  |  1988-11-14  |  10.8 KB  |  484 lines

  1. -- background: 2135 from stack: in
  2. -- bmap block id: 2492
  3. -- flags: 4000
  4. -- background id: 0
  5. -- name: IRS Form Background
  6. ----- HyperTalk script -----
  7.  
  8.  
  9. on openStack
  10.   hide message box
  11.   show menuBar
  12.   pass openStack
  13. end openStack
  14.  
  15. on mouseup
  16.   Global Altering
  17.   if  the CommandKey=down and the shiftKey=down then
  18.     Set UserLevel to 5
  19.     put true into altering
  20.   end if
  21.   pass mouseup
  22. end mouseup
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30. -- part 8 (button)
  31. -- low flags: 00
  32. -- high flags: 2000
  33. -- rect: left=256 top=298 right=321 bottom=281
  34. -- title width / last selected line: 0
  35. -- icon id / first selected line: 1013 / 1013
  36. -- text alignment: 1
  37. -- font id: 0
  38. -- text size: 12
  39. -- style flags: 0
  40. -- line height: 16
  41. -- part name: Next
  42. ----- HyperTalk script -----
  43. on mouseUp
  44.   visual effect scroll left slowly
  45.   go to next card
  46. end mouseUp
  47.  
  48.  
  49.  
  50. -- part 9 (button)
  51. -- low flags: 00
  52. -- high flags: 2000
  53. -- rect: left=228 top=298 right=321 bottom=254
  54. -- title width / last selected line: 0
  55. -- icon id / first selected line: 1014 / 1014
  56. -- text alignment: 1
  57. -- font id: 0
  58. -- text size: 12
  59. -- style flags: 0
  60. -- line height: 16
  61. -- part name: Prev
  62. ----- HyperTalk script -----
  63. on mouseUp
  64.   visual effect scroll right slowly
  65.   go to prev card
  66. end mouseUp
  67.  
  68.  
  69.  
  70. -- part 30 (button)
  71. -- low flags: 00
  72. -- high flags: A003
  73. -- rect: left=0 top=60 right=77 bottom=62
  74. -- title width / last selected line: 0
  75. -- icon id / first selected line: 0 / 0
  76. -- text alignment: 1
  77. -- font id: 0
  78. -- text size: 12
  79. -- style flags: 0
  80. -- line height: 16
  81. -- part name: Figure
  82. ----- HyperTalk script -----
  83. on mouseUp
  84.   Set Cursor to 4
  85.   set lockscreen to true
  86.  
  87.  
  88.   set numberFormat to 0.00
  89.   put card field "Wage Field"* Card field "Hours Field" into gross
  90.   put the value of gross into card field "Gross Wage Field"
  91.  
  92.   put gross*.0715 into FICA
  93.   Put the value of FICA into card field"FICA Field"
  94.  
  95.  
  96.   Put card field"Union Dues Field" into Card Field"Union Dues 2 Field"
  97.   Put card field"United Way Field" into Card Field"United Way 2 Field"
  98.  
  99.   if hilite of button id 6 then
  100.     put value of 7.31 into FedAllowance
  101.     Put value of 3.45 into StateExemption
  102.     put "Daily" into Period
  103.     if HiLite of button id 33 then
  104.       put value of 7.70 into StateAllowance
  105.       put "Single" into status
  106.  
  107.     else
  108.       put value of 11.55 into StateAllowance
  109.       put "Married" into status
  110.     end if
  111.   end if
  112.  
  113.   if hilite of button id 7 then
  114.     Put "Weekly" into period
  115.     put value of 36.54 into FedAllowance
  116.     Put Value of 17.3 into StateExemption
  117.     if HiLite of button id 33 then
  118.       put "Single" into status
  119.       put value of 38.45 into StateAllowance
  120.  
  121.     else
  122.       put "Married" into status
  123.       put value of 57.70 into StateAllowance
  124.  
  125.     end if
  126.   end if
  127.  
  128.   if hilite of button id 8 then
  129.     Put "BiWeekly" into Period
  130.     put value of 73.08 into FedAllowance
  131.     Put Value of 34.6 into StateExemption
  132.     if HiLite of button id 33 then
  133.       put "Single" into status
  134.       put value of 76.90 into StateAllowance
  135.  
  136.     else
  137.       put value of 115.4 into StateAllowance
  138.       put "Married" into status
  139.     end if
  140.   end if
  141.  
  142.   if hilite of button id 9 then
  143.     put value of 79.17 into FedAllowance
  144.     Put Value of 37.5 into StateExemption
  145.     put "SemiMonthly" into Period
  146.     if HiLite of button id 33 then
  147.       put value of 83.35 into StateAllowance
  148.       put "Single" into status
  149.     else
  150.       put value of 125 into StateAllowance
  151.       put "Married" into status
  152.     end if
  153.   end if
  154.  
  155.   if hilite of button id 11 then
  156.     put value of 158.33 into FedAllowance
  157.     Put Value of 75 into StateExemption
  158.     put "Monthly" into Period
  159.     if HiLite of button id 33 then
  160.       put value of 166.7 into StateAllowance
  161.       put "Single" into status
  162.     else
  163.       put value of 250 into StateAllowance
  164.       put "Married" into status
  165.     end if
  166.   end if
  167.  
  168.  
  169.   if hilite of button id 32 then
  170.     put value of 1900 into FedAllowance
  171.     Put Value of 900 into StateExemption
  172.     put "Annually" into Period
  173.     if HiLite of button id 33 then
  174.       put value of 2000 into StateAllowance
  175.       put "Single" into status
  176.     else
  177.       put value of 3000 into StateAllowance
  178.       put "Married" into status
  179.     end if
  180.   end if
  181.  
  182.  
  183.  
  184.   put value of (gross-(Fedallowance* Card Field "Deduction field")) into FedTaxable
  185.  
  186.   Put Value of ((gross-StateAllowance)-(StateExemption* Card Field"Deduction Field")) into StateTaxable
  187.  
  188.   put false into done
  189.   put value of 0 into x
  190.   put value of 0 into StateTax
  191.   Put Value of 0 into OldValue
  192.   if StateTaxable<=0 then
  193.     Put value of 0 into StateTaxable
  194.   end if
  195.   repeat until x=6 or done=true
  196.     put value of x+1 into x
  197.     Put Period&Status&x into Grab
  198.     put the value of card field Grab of card "StateCard" into RetValue
  199.     Put x&"a" into grate
  200.     put card field grate of card "StateCard" into StateRate
  201.     If StateTaxable<RetValue then
  202.       Put StateTax+((StateTaxable-OldValue)*StateRate) into StateTax
  203.       Put True into Done
  204.     else
  205.       Put StateTax+(StateRate*(RetValue-OldValue)) into StateTax
  206.     end if
  207.     Put value of OldValue into OlderValue
  208.     Put RetValue into OldValue
  209.   end repeat
  210.   If Done=False then
  211.     Put StateTax+((StateTaxable-OldValue)*.085) into StateTax
  212.   end if
  213.   Put Value of StateTax into Card Field "State Tax Field"
  214.  
  215.  
  216.  
  217.   put false into done
  218.   put value of 0 into x
  219.   put value of 0 into FedTax
  220.   Put Value of 0 into OldValue
  221.   if FedTaxable<=0 then
  222.     Put value of 0 into FedTaxable
  223.   end if
  224.   repeat until x=5 or done=true
  225.     put value of x+1 into x
  226.     Put Period&Status&x into Grab
  227.     Put x&"a" into grate
  228.     put card field grate of card "FedCard" into FedRate
  229.     put the value of card field Grab of card "FedCard" into RetValue
  230.     If FedTaxable<RetValue then
  231.       Put FedTax+((FedTaxable-OldValue)*FedRate) into FedTax
  232.       Put True into Done
  233.       if x=1 then
  234.         Put the value of 0.00 into FedTax
  235.       end if
  236.     else
  237.       Put FedTax+(FedRate*(RetValue-OldValue)) into FedTax
  238.       if x=1 then
  239.         Put the value of 0 into FedTax
  240.       end if
  241.     end if
  242.     Put the value of RetValue into OldValue
  243.   end repeat
  244.  
  245.   If done=false then
  246.     Put FedTax+((FedTaxable-RetValue)*.385) into FedTax
  247.   end if
  248.   Put Value of FedTax into Card Field "Fed Tax Field"
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.   put gross-(FICA+Card Field"Fed Tax Field" +Card Field"State Tax Field"+Card Field"United Way Field" +card Field "Union Dues Field") into net
  256.   Put the value of net into Card Field"Net wage Field"
  257.  
  258.   put gross-net into taxtotal
  259.   put the value of TaxTotal into Card Field"Total Taxes Field"
  260.   Set LockScreen to false
  261.  
  262. end mouseUp
  263.  
  264.  
  265.  
  266.  
  267. -- part 33 (button)
  268. -- low flags: 00
  269. -- high flags: A003
  270. -- rect: left=0 top=42 right=59 bottom=61
  271. -- title width / last selected line: 0
  272. -- icon id / first selected line: 0 / 0
  273. -- text alignment: 1
  274. -- font id: 0
  275. -- text size: 12
  276. -- style flags: 0
  277. -- line height: 16
  278. -- part name: Add 
  279. ----- HyperTalk script -----
  280. on mouseUp
  281.   set lockscreen to true
  282.   hide menubar
  283.   Set Cursor to 4
  284.   get the userlevel
  285.   Put it into Previous
  286.   set userlevel to 5
  287.   DoMenu "Copy Card"
  288.   DoMenu "Paste Card"
  289.   Repeat with x=1 to number of card fields
  290.     Put"" into Card Field x
  291.   end repeat
  292.   if hilite of card button"Lock Info"= true then
  293.     Set Hilite of card button"Lock Info" to false
  294.     send "mouseUp"to card button"Lock Info"
  295.   end if
  296.   Set userlevel to previous
  297.   Set lockscreen to false
  298.   show menubar
  299. end mouseUp
  300.  
  301.  
  302.  
  303. -- part 34 (button)
  304. -- low flags: 00
  305. -- high flags: A003
  306. -- rect: left=0 top=23 right=41 bottom=61
  307. -- title width / last selected line: 0
  308. -- icon id / first selected line: 0 / 0
  309. -- text alignment: 1
  310. -- font id: 0
  311. -- text size: 12
  312. -- style flags: 0
  313. -- line height: 16
  314. -- part name: Remove
  315. ----- HyperTalk script -----
  316. on mouseUp
  317.   hide menubar
  318.   Set LockScreen to true
  319.   get the userlevel
  320.   Put it into Previous
  321.   set userlevel to 5
  322.  
  323.   DoMenu "Delete Card"
  324.   Go to previous card
  325.   Set the Userlevel to previous
  326.   show menubar
  327.  
  328. end mouseUp
  329.  
  330.  
  331.  
  332. -- part 35 (button)
  333. -- low flags: 00
  334. -- high flags: 2002
  335. -- rect: left=10 top=81 right=121 bottom=50
  336. -- title width / last selected line: 0
  337. -- icon id / first selected line: 1007 / 1007
  338. -- text alignment: 1
  339. -- font id: 0
  340. -- text size: 12
  341. -- style flags: 0
  342. -- line height: 16
  343. -- part name: New Button
  344. ----- HyperTalk script -----
  345. on mouseUp
  346.   doMenu"Print Report..."
  347. end mouseUp
  348.  
  349.  
  350.  
  351. -- part 36 (button)
  352. -- low flags: 00
  353. -- high flags: 2002
  354. -- rect: left=9 top=124 right=164 bottom=50
  355. -- title width / last selected line: 0
  356. -- icon id / first selected line: 32670 / 32670
  357. -- text alignment: 1
  358. -- font id: 0
  359. -- text size: 12
  360. -- style flags: 0
  361. -- line height: 16
  362. -- part name: New Button
  363. ----- HyperTalk script -----
  364. on mouseUp
  365.   put 1 into x
  366.   go to first card
  367.   repeat while not the mouseclick
  368.     if xΓëÑ(number of cards -2) then
  369.       Go to First Card
  370.       put 1 into x
  371.     else
  372.       go to next card
  373.       put x+1 into x
  374.     end if
  375.  
  376.     wait 5
  377.   end repeat
  378.  
  379. end mouseUp
  380.  
  381.  
  382.  
  383. -- part 37 (button)
  384. -- low flags: 00
  385. -- high flags: 2002
  386. -- rect: left=9 top=167 right=206 bottom=50
  387. -- title width / last selected line: 0
  388. -- icon id / first selected line: 20186 / 20186
  389. -- text alignment: 1
  390. -- font id: 0
  391. -- text size: 12
  392. -- style flags: 0
  393. -- line height: 16
  394. -- part name: New Button
  395. ----- HyperTalk script -----
  396. on mouseUp
  397.   sort by card field "Last Name Field"
  398. end mouseUp
  399.  
  400.  
  401.  
  402. -- part 38 (button)
  403. -- low flags: 00
  404. -- high flags: 2002
  405. -- rect: left=9 top=209 right=248 bottom=50
  406. -- title width / last selected line: 0
  407. -- icon id / first selected line: 27878 / 27878
  408. -- text alignment: 1
  409. -- font id: 0
  410. -- text size: 12
  411. -- style flags: 0
  412. -- line height: 16
  413. -- part name: New Button
  414. ----- HyperTalk script -----
  415. on mouseUp
  416.   Set LockScreen to true
  417.   Put "" into Card Field"Search Field"
  418.   Push this card
  419.   If Visible of card field"Search Field" then
  420.     set visible of card field "Search Field" to false
  421.   else
  422.     set visible of card field "Search Field" to true
  423.     Put "" into Search
  424.     go to first card
  425.     repeat with x=2 to (number of cards-3)
  426.       go to next card
  427.       put Card Field"Last Name Field" into line x-1 of Search
  428.     end repeat
  429.     pop card
  430.     Put Search into Card Field"Search Field"
  431.  
  432.   end if
  433.  
  434. end mouseUp
  435.  
  436.  
  437.  
  438.  
  439.  
  440. -- part 39 (button)
  441. -- low flags: 00
  442. -- high flags: 2002
  443. -- rect: left=9 top=251 right=290 bottom=50
  444. -- title width / last selected line: 0
  445. -- icon id / first selected line: 23078 / 23078
  446. -- text alignment: 1
  447. -- font id: 0
  448. -- text size: 12
  449. -- style flags: 0
  450. -- line height: 16
  451. -- part name: New Button
  452. ----- HyperTalk script -----
  453. on mouseUp
  454.   If Visible of card field"help" then
  455.     set visible of card field "help" to false
  456.   else
  457.     set visible of card field "help" to true
  458.   end if
  459.  
  460. end mouseUp
  461.  
  462.  
  463.  
  464. -- part 40 (button)
  465. -- low flags: 00
  466. -- high flags: 2002
  467. -- rect: left=9 top=293 right=332 bottom=50
  468. -- title width / last selected line: 0
  469. -- icon id / first selected line: 20098 / 20098
  470. -- text alignment: 1
  471. -- font id: 0
  472. -- text size: 12
  473. -- style flags: 0
  474. -- line height: 16
  475. -- part name: Home Button
  476. ----- HyperTalk script -----
  477. on mouseUp
  478.   visual effect iris close to black
  479.   visual effect iris open to white
  480.   visual effect dissolve
  481.   go home
  482. end mouseUp
  483.  
  484.