home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / hc / timebill.sit / Expenses / background_2726.txt < prev    next >
Text File  |  1988-01-29  |  10KB  |  454 lines

  1. -- background: 2726 from stack: in
  2. -- bmap block id: 2387
  3. -- flags: 4000
  4. -- background id: 0
  5. -- name: Expense Report
  6. ----- HyperTalk script -----
  7. on openStack
  8.   hide message box
  9.   hide menuBar
  10.   hide tool window
  11.   hide pattern window
  12.   choose browse tool
  13.   set userLevel to 2
  14.   go last card of this background
  15.  
  16. end openStack
  17. on closeCard
  18.   totalAmt
  19. end closeCard
  20.  
  21. on newCard
  22.   put field "credits" of recent card into field "credits"
  23.   put field "credits2" of recent card into field "credits2"
  24.   put field "weekendg" of prev card into nextweek
  25.   put field "name" of prev card  into nametrans
  26.   convert nextweek to secs
  27.   add (60*60*24*7) to nextweek
  28.   convert nextweek to date
  29.   put nextweek into field "weekendg"
  30.   put nametrans into field "name"
  31.  
  32.  
  33.   click at location of  field "name"
  34.   click at location of  field "name"
  35. end newCard
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45. -- part 23 (field)
  46. -- low flags: 00
  47. -- high flags: 2002
  48. -- rect: left=434 top=7 right=25 bottom=501
  49. -- title width / last selected line: 0
  50. -- icon id / first selected line: 0 / 0
  51. -- text alignment: 0
  52. -- font id: 16
  53. -- text size: 10
  54. -- style flags: 0
  55. -- line height: 11
  56. -- part name: Weekendg
  57.  
  58.  
  59. -- part 46 (field)
  60. -- low flags: 00
  61. -- high flags: 6002
  62. -- rect: left=9 top=59 right=291 bottom=68
  63. -- title width / last selected line: 0
  64. -- icon id / first selected line: 0 / 0
  65. -- text alignment: 0
  66. -- font id: 3
  67. -- text size: 10
  68. -- style flags: 0
  69. -- line height: 11
  70. -- part name: Clientcode
  71. ----- HyperTalk script -----
  72. on closeField
  73.   put "!@#$%^&*()~<>?/'{}[]\|-_+=,:;" into compareString
  74.   repeat with i= 1 to the number of lines of field "clientcode"
  75.     repeat with z=1 to the number of chars of line i of field "clientcode"
  76.       if char z of line i of field "clientcode" is in compareString then
  77.  
  78.         put char z of line i of field "clientcode" into clickSpot
  79.         beep
  80.         Answer "Is ΓÇÿ" & clickSpot & "ΓÇÖ really part of the code?" with "Yes" or "Oops"
  81.         if it = "Yes" then exit closeField
  82.         Find clickspot
  83.         exit closeField
  84.       end if
  85.     end repeat
  86.   end repeat
  87. end closeField
  88.  
  89.  
  90. -- part 24 (button)
  91. -- low flags: 00
  92. -- high flags: 2000
  93. -- rect: left=9 top=42 right=57 bottom=67
  94. -- title width / last selected line: 0
  95. -- icon id / first selected line: 0 / 0
  96. -- text alignment: 1
  97. -- font id: 2
  98. -- text size: 10
  99. -- style flags: 8192
  100. -- line height: 13
  101. -- part name: clientcode
  102. ----- HyperTalk script -----
  103. on MouseUp
  104.   push card
  105.   set lockScreen to true
  106.   go stack "Client info"
  107.   go to card "Codes In Use"
  108.   set lockScreen to false
  109. end mouseUp
  110.  
  111.  
  112.  
  113. -- part 48 (button)
  114. -- low flags: 00
  115. -- high flags: A004
  116. -- rect: left=355 top=126 right=156 bottom=506
  117. -- title width / last selected line: 0
  118. -- icon id / first selected line: 0 / 0
  119. -- text alignment: 1
  120. -- font id: 2
  121. -- text size: 10
  122. -- style flags: 8192
  123. -- line height: 13
  124. -- part name: To Summary
  125. ----- HyperTalk script -----
  126. on mouseUp
  127.   push card
  128.   go stack "job summary"
  129. end mouseUp
  130.  
  131.  
  132.  
  133. -- part 50 (button)
  134. -- low flags: 00
  135. -- high flags: A004
  136. -- rect: left=354 top=42 right=78 bottom=505
  137. -- title width / last selected line: 0
  138. -- icon id / first selected line: 0 / 0
  139. -- text alignment: 1
  140. -- font id: 2
  141. -- text size: 10
  142. -- style flags: 8192
  143. -- line height: 13
  144. -- part name: New/Delete
  145. ----- HyperTalk script -----
  146. on mouseUp
  147.   if the optionKey is down then
  148.     answer "Are you sure you want to delete?" with "Yes" or "Cancel"
  149.     if it = "Yes" then doMenu "delete card"
  150.     exit mouseUp
  151.   end if
  152.  
  153.   doMenu "New Card"
  154. end mouseUp
  155.  
  156.  
  157.  
  158. -- part 52 (field)
  159. -- low flags: 00
  160. -- high flags: 6002
  161. -- rect: left=69 top=59 right=291 bottom=117
  162. -- title width / last selected line: 0
  163. -- icon id / first selected line: 0 / 0
  164. -- text alignment: 0
  165. -- font id: 3
  166. -- text size: 10
  167. -- style flags: 8192
  168. -- line height: 11
  169. -- part name: Date (m/d)
  170.  
  171.  
  172. -- part 53 (field)
  173. -- low flags: 00
  174. -- high flags: 6002
  175. -- rect: left=118 top=59 right=291 bottom=183
  176. -- title width / last selected line: 0
  177. -- icon id / first selected line: 0 / 0
  178. -- text alignment: 65535
  179. -- font id: 3
  180. -- text size: 10
  181. -- style flags: 8192
  182. -- line height: 11
  183. -- part name: Amount
  184. ----- HyperTalk script -----
  185. On CloseField
  186.  
  187.  
  188.  
  189.   put "ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()~<>?/'{}[]\|-_+=,:;" into compareString
  190.   repeat with i= 1 to the number of lines of field "amount"
  191.     repeat with z=1 to the number of chars of line i of field "amount"
  192.       if char z of line i of field "amount" is in compareString then
  193.  
  194.         put char z of line i of field "amount" into clickSpot
  195.         beep
  196.         Answer "Only numbers in this column, please."
  197.         Find clickspot
  198.         exit closeField
  199.       end if
  200.     end repeat
  201.   end repeat
  202.  
  203.   totalAmt
  204. End CloseField
  205.  
  206.  
  207. -- part 54 (field)
  208. -- low flags: 00
  209. -- high flags: 6002
  210. -- rect: left=184 top=59 right=291 bottom=350
  211. -- title width / last selected line: 0
  212. -- icon id / first selected line: 0 / 0
  213. -- text alignment: 0
  214. -- font id: 3
  215. -- text size: 10
  216. -- style flags: 8192
  217. -- line height: 11
  218. -- part name: Description
  219. ----- HyperTalk script -----
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228. -- part 56 (button)
  229. -- low flags: 00
  230. -- high flags: A004
  231. -- rect: left=356 top=253 right=291 bottom=507
  232. -- title width / last selected line: 0
  233. -- icon id / first selected line: 0 / 0
  234. -- text alignment: 1
  235. -- font id: 2
  236. -- text size: 10
  237. -- style flags: 8192
  238. -- line height: 13
  239. -- part name: Print Card/Report
  240. ----- HyperTalk script -----
  241. on mouseUp
  242.  
  243.   if the optionKey is down then
  244.     doMenu "page setup..."
  245.     doMenu "print report..."
  246.     exit mouseUp
  247.   end if
  248.  
  249.   doMenu "page setup..."
  250.   doMenu "print card"
  251. end mouseUp
  252.  
  253.  
  254.  
  255. -- part 57 (button)
  256. -- low flags: 00
  257. -- high flags: A004
  258. -- rect: left=356 top=158 right=187 bottom=506
  259. -- title width / last selected line: 0
  260. -- icon id / first selected line: 0 / 0
  261. -- text alignment: 1
  262. -- font id: 2
  263. -- text size: 10
  264. -- style flags: 8192
  265. -- line height: 13
  266. -- part name: To Client Info
  267. ----- HyperTalk script -----
  268. on mouseUp
  269.   push card
  270.   go stack "Client Info"
  271.  
  272. end mouseUp
  273.  
  274.  
  275.  
  276. -- part 58 (button)
  277. -- low flags: 00
  278. -- high flags: 0000
  279. -- rect: left=164 top=8 right=26 bottom=183
  280. -- title width / last selected line: 0
  281. -- icon id / first selected line: 21847 / 21847
  282. -- text alignment: 1
  283. -- font id: 2
  284. -- text size: 10
  285. -- style flags: 8192
  286. -- line height: 13
  287. -- part name: Home
  288. ----- HyperTalk script -----
  289. on mouseUp
  290.   visual effect iris close
  291.   go "home"
  292. end mouseUp
  293.  
  294.  
  295.  
  296. -- part 65 (button)
  297. -- low flags: 00
  298. -- high flags: A004
  299. -- rect: left=354 top=80 right=98 bottom=506
  300. -- title width / last selected line: 0
  301. -- icon id / first selected line: 0 / 0
  302. -- text alignment: 1
  303. -- font id: 2
  304. -- text size: 10
  305. -- style flags: 8192
  306. -- line height: 13
  307. -- part name: Sort 
  308. ----- HyperTalk script -----
  309. on mouseUp
  310.   Answer "Sort by:" with "Name" or "Date" or "Cancel"
  311.   if it = "cancel" then
  312.     beep
  313.     exit mouseUp
  314.   end if
  315.   if it = "Name" then
  316.     sort by field "name"
  317.     exit mouseUp
  318.   end if
  319.   if it = "Date" then
  320.  
  321.     set lockScreen to true
  322.     repeat with i= 1 to the number of cards
  323.       go card i
  324.       convert field "weekendg" to secs
  325.     end repeat
  326.     sort ascending by field "weekendg"
  327.     repeat with i= 1 to the number of cards
  328.       go card i
  329.       convert field "weekendg" to date
  330.     end repeat
  331.   end if
  332.  
  333. end mouseUp
  334.  
  335.  
  336.  
  337. -- part 47 (field)
  338. -- low flags: 00
  339. -- high flags: 2002
  340. -- rect: left=53 top=7 right=25 bottom=146
  341. -- title width / last selected line: 0
  342. -- icon id / first selected line: 0 / 0
  343. -- text alignment: 0
  344. -- font id: 16
  345. -- text size: 10
  346. -- style flags: 0
  347. -- line height: 11
  348. -- part name: Name
  349.  
  350.  
  351. -- part 63 (field)
  352. -- low flags: 01
  353. -- high flags: 0002
  354. -- rect: left=119 top=295 right=313 bottom=183
  355. -- title width / last selected line: 0
  356. -- icon id / first selected line: 0 / 0
  357. -- text alignment: 0
  358. -- font id: 3
  359. -- text size: 10
  360. -- style flags: 8448
  361. -- line height: 15
  362. -- part name: TotalAmt
  363.  
  364.  
  365. -- part 69 (button)
  366. -- low flags: 00
  367. -- high flags: A004
  368. -- rect: left=356 top=189 right=218 bottom=506
  369. -- title width / last selected line: 0
  370. -- icon id / first selected line: 0 / 0
  371. -- text alignment: 1
  372. -- font id: 2
  373. -- text size: 10
  374. -- style flags: 8192
  375. -- line height: 13
  376. -- part name: To Time Sheets
  377. ----- HyperTalk script -----
  378. on mouseUp
  379.   push card
  380.   go stack "Time Sheet"
  381.  
  382. end mouseUp
  383.  
  384.  
  385.  
  386. -- part 66 (field)
  387. -- low flags: 80
  388. -- high flags: 2004
  389. -- rect: left=104 top=88 right=218 bottom=395
  390. -- title width / last selected line: 0
  391. -- icon id / first selected line: 0 / 0
  392. -- text alignment: 1
  393. -- font id: 2
  394. -- text size: 14
  395. -- style flags: 768
  396. -- line height: 15
  397. -- part name: Credits
  398.  
  399.  
  400. -- part 67 (field)
  401. -- low flags: 80
  402. -- high flags: 0001
  403. -- rect: left=110 top=95 right=212 bottom=383
  404. -- title width / last selected line: 0
  405. -- icon id / first selected line: 0 / 0
  406. -- text alignment: 1
  407. -- font id: 2
  408. -- text size: 12
  409. -- style flags: 0
  410. -- line height: 16
  411. -- part name: Credits2
  412.  
  413.  
  414. -- part 70 (button)
  415. -- low flags: 00
  416. -- high flags: 0000
  417. -- rect: left=8 top=317 right=338 bottom=24
  418. -- title width / last selected line: 0
  419. -- icon id / first selected line: 0 / 0
  420. -- text alignment: 1
  421. -- font id: 2
  422. -- text size: 10
  423. -- style flags: 8192
  424. -- line height: 13
  425. -- part name: prev
  426. ----- HyperTalk script -----
  427. on mouseUp
  428.   visual effect wipe right
  429.   go prev card
  430.   push recent card
  431. end mouseUp
  432.  
  433.  
  434.  
  435. -- part 71 (button)
  436. -- low flags: 00
  437. -- high flags: 0000
  438. -- rect: left=487 top=316 right=338 bottom=506
  439. -- title width / last selected line: 0
  440. -- icon id / first selected line: 0 / 0
  441. -- text alignment: 1
  442. -- font id: 2
  443. -- text size: 10
  444. -- style flags: 8192
  445. -- line height: 13
  446. -- part name: next
  447. ----- HyperTalk script -----
  448. on mouseUp
  449.   visual effect wipe left
  450.   go next card
  451.   push recent card
  452. end mouseUp
  453.  
  454.