home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / propmgr2.zip / SEARCH.TNT < prev    next >
Text File  |  1986-09-03  |  4KB  |  172 lines

  1. * DATE 07/20/84  18:07
  2. * search.cmd
  3. IF moveit
  4.  REST from move additive
  5.  FIND &linker
  6.  RELE linker
  7.  STOR f TO moveit
  8. ENDI
  9. STOR t TO first
  10. STOR t TO more
  11. DO WHIL more
  12.  IF first
  13. * set up screen and prompts
  14.   ERAS
  15.   STOR 'Search by <C>ode number, <A>ny part of tenant database or <Q>uit searching' TO prompt1
  16.   STOR '<B>ackward, <F>orward, <D>elete/recall, <E>dit or <P>rint' TO prompt2
  17.   STOR 'Tenant Search Menu' TO mode
  18. * show the current record
  19.   @ 0,26 SAY mode
  20.   @ 1, 0 SAY " -------------------------------------------------"
  21.   @ 1,50 SAY "----------------------------"
  22.   @ 1,50 SAY "-----------------------------"
  23.   @ 3, 2 SAY "Tenant:"
  24.   @ 3,53 SAY "Code:"
  25.   @ 4, 4 SAY "Unit:"
  26.   @ 4,26 SAY "Building:"
  27.   @ 5, 1 SAY "Contact:"
  28.   @ 5,52 SAY "Phone:"
  29.   @ 6,09 SAY "Alternate mailing address:"
  30.   @ 7,01 SAY "Address:"
  31.   @ 8,01 SAY "City:"
  32.   @ 10, 4 SAY "Type:"
  33.   @ 10,19 SAY "Addl Percentage:"
  34.   @ 10,48 SAY "1st Lease:"
  35.   @ 11,04 SAY "Base:"
  36.   @ 11,47 SAY "Expiration:"
  37.   @ 12, 0 SAY "Security:"
  38.   @ 12,30 SAY "Bank:"
  39.   @ 12,48 SAY "Late Date:"
  40.   @ 13, 4 SAY "Rent:"
  41.   @ 13,25 SAY "Late Chgs:"
  42.   @ 13,48 SAY "Addl Rent:"
  43.   @ 14, 3 SAY "G & E:"
  44.   @ 14,24 SAY "Other Chgs:"
  45.   @ 14,47 SAY "Total Rent:"
  46.   @ 15, 0 SAY "Rent Due:"
  47.   @ 15,22 SAY "Last Payment:"
  48.   @ 15,49 SAY "Amt Paid:"
  49.   @ 16,00 SAY "Total Yr:"
  50.   @ 16,30 SAY "Flag:"
  51.   @ 16,52 SAY "Total:"
  52.   @ 18, 3 SAY "Notes:"
  53.   @ 18,51 SAY "Update:"
  54.   @ 19, 0 SAY " -------------------------------------------------"
  55.   @ 19,50 SAY "-----------------------------"
  56.  ENDI first
  57.  STOR f TO first
  58.  STOR '?' TO command
  59.  STOR '     ' TO name
  60. * find out if the current record is marked for deletion
  61.  IF *
  62.   STOR 'Deleted' TO deleted
  63.  ELSE
  64.   STOR '       ' TO deleted
  65.  ENDI *
  66.  STOR trent TO trentx
  67.  IF ttype = 'P'
  68.   IF (trentpc*(trentpcr/100)/12)>trent
  69.    STOR (trentpc*(trentpcr/100)/12) TO trentx
  70.   ENDI (trentpc)
  71.  ENDI ttype = 'P'
  72.  IF ttype = 'O'
  73.   STOR ((trentpc*(trentpcr/100)/12)+trent) TO trentx
  74.  ENDI ttype = 'O'
  75.  STOR (trentx + tlatec + taddl + trente + trentm) TO trentxx
  76. * show the current record, and find out what to do next
  77.  @ 0, 0 SAY deleted
  78.  @ 3,10 SAY tenant
  79.  @ 3,59 SAY bcode
  80.  @ 4,10 SAY tunit
  81.  @ 4,36 SAY baddr
  82.  @ 5,10 SAY tcontac
  83.  @ 5,59 SAY tphone
  84.  @ 6,36 SAY alt
  85.  @ 7,10 SAY altad
  86.  @ 8,10 SAY altcty
  87.  @ 10,10 SAY ttype
  88.  @ 10,36 SAY trentpc USING '99.9999'
  89.  @ 10,59 SAY tfirst
  90.  @ 11,10 SAY trentpcr USING '$999,999,999'
  91.  @ 10,59 SAY texpir
  92.  @ 12,10 SAY tsec USING '$99,999.99'
  93.  @ 12,36 SAY tsecb
  94.  @ 12,59 SAY tlate
  95.  @ 13,10 SAY trent USING '$99,999.99'
  96.  @ 13,36 SAY tlatec USING '$99,999.99'
  97.  @ 13,36 SAY tflag
  98.  @ 13,59 SAY taddl USING '$99,999.99'
  99.  @ 14,10 SAY trente USING '$99,999.99'
  100.  @ 14,36 SAY trentm USING '$99,999.99'
  101.  @ 14,59 SAY trentxx USING '$99,999.99'
  102.  @ 15,10 SAY trentd USING '$99,999.99'
  103.  @ 15,36 SAY trentpd PICTURE '99/99/99'
  104.  @ 15,59 SAY trentp USING '$99,999.99'
  105.  @ 16,10 SAY trenty USING '$99,999.99'
  106.  @ 16,59 SAY trentt USING '$99,999.99'
  107.  @ 18,10 SAY tnotes
  108.  @ 18,61 SAY tupdate
  109.  @ 20,00
  110.  @ 21,00
  111.  @ 22,00
  112.  @ 20,03 SAY prompt1
  113.  @ 21,03 SAY prompt2
  114.  @ 22,56 SAY "WHAT NEXT ?"
  115.  @ 22,70 GET command PICTURE '!'
  116.  READ
  117. * perform selected functions
  118.  DO CASE
  119.  CASE (command = 'B' .OR. command = ',' )
  120. * move backwards one record
  121.   SKIP -1
  122.  CASE command = 'D'
  123.   IF *
  124.    RECA
  125.   ELSE
  126.    DELE
  127.   ENDI *
  128.  CASE (command = 'F' .OR. command = '.' )
  129. * move forward one record
  130.   SKIP
  131.  CASE command = 'C'
  132.   STOR # TO rec:number
  133.   @ 20,00
  134.   @ 21,00
  135.   @ 22,00
  136.   @ 21,12 SAY "Please enter code number "
  137.   @ 21,40 GET name PICTURE '99999'
  138.   READ
  139.   STOR TRIM(name) TO name
  140. * look for matching record
  141.   STOR CHR(PEEK(063)) TO dr
  142.   SET INDEX TO &dr.:codea
  143.   FIND &name
  144.   @ 20,00
  145.   @ 21,00
  146.   @ 22,00
  147. * if it isn ' t in the files
  148.   IF # = 0
  149. * say that name can ' t be found
  150.    @ 20,12 SAY name+ ' is not in the file'
  151.    @ 21,12 SAY 'Press ENTER to Continue'
  152.    SET console OFF
  153.    WAIT
  154.    SET console ON
  155.    GO rec:number
  156.   ENDI # = 0
  157.  CASE command = 'E'
  158.   DO EDIT.tnt
  159.  CASE command = 'P'
  160.   DO PRINT.tnt
  161.  CASE command = 'A'
  162.   DO search1.tnt
  163.  CASE command = 'Q'
  164.   STOR t TO keepitup
  165.   STOR t TO first
  166.   STOR 2 TO box
  167.   RETU
  168.  ENDC
  169.  RELE name
  170. * loop back again
  171. ENDD WHILE more
  172.