home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / manage.zip / TENANT.PRG < prev   
Text File  |  1987-08-16  |  17KB  |  539 lines

  1. *    Last revision: May 26, 1986 at 11:43
  2. * tenant.prg main command program of tenant database
  3. STOR .t. TO first
  4. * set up the loop
  5. STOR .T. to more
  6. DO WHIL more
  7. * if first time this trip
  8.  IF first
  9.   DO t_first
  10.   STOR .f. TO first
  11.  ENDI
  12.  STOR '<B>ackward, <D>elete/Recall, <E>dit, <F>orward, <H>elp, <P>rint' TO prompt1
  13.  STOR '<S>earch by code number, search a<N>y part of database' TO prompt2
  14.  STOR 'b<u>ilding records or <R>eturn to main Menu           SELECT: ' TO prompt3
  15.  STOR 'Main Tenant Database ' TO mode
  16.  STOR '?' TO command
  17. * find out if the current record is marked for deletion
  18.  IF DELETE()
  19.   STOR 'Deleted' TO deleted
  20.  ELSE
  21.   STOR '       ' TO deleted
  22.  ENDI *
  23.  STOR trent TO trentx
  24.  IF ttype = 'P'
  25.   IF (trentpc*(trentpcr/100)/12)>trent
  26.    STOR (trentpc*(trentpcr/100)/12) TO trentx
  27.   ENDI (trentpc)
  28.  ENDI ttype = 'P'
  29.  IF ttype = 'O'
  30.   STOR ((trentpc*(trentpcr/100)/12)+trent) TO trentx
  31.  ENDI ttype = 'O'
  32.  STOR (trentx + taddl + trente + trentm) TO trentxx
  33. * show the current record, and find out what to do next
  34.  @ 0, 0 SAY deleted
  35.  @ 1,26 SAY mode
  36.  @ 3,10 SAY tenant
  37.  @ 3,62 SAY bcode
  38.  @ 4,10 SAY tunit
  39.  @ 4,36 SAY baddr
  40.  @ 5,10 SAY tcontac
  41.  @ 5,62 SAY tphone
  42.  @ 6,36 SAY alt
  43.  @ 7,10 SAY altad
  44.  @ 8,10 SAY altcty
  45.  @ 10,10 SAY ttype
  46.  @ 10,36 SAY trentpc PICTURE '99.9999'
  47.  @ 10,62 SAY tfirst
  48.  @ 11,10 SAY trentpcr PICTURE '999,999,999'
  49.  @ 11,62 SAY texpir
  50.  @ 12,10 SAY tsec PICTURE '99,999.99'
  51.  @ 12,36 SAY tsecb
  52.  @ 12,62 SAY tlate
  53.  @ 13,10 SAY trent PICTURE '99,999.99'
  54.  @ 13,36 SAY tlatec PICTURE '99,999.99'
  55.  @ 13,62 SAY taddl PICTURE '99,999.99'
  56.  @ 14,10 SAY trente PICTURE '99,999.99'
  57.  @ 14,36 SAY trentm PICTURE '99,999.99'
  58.  @ 14,62 SAY trentxx PICTURE '99,999.99'
  59.  @ 15,10 SAY trentd PICTURE '99,999.99'
  60.  @ 15,36 SAY trentpd PICTURE '99/99/99'
  61.  @ 15,62 SAY trentp PICTURE '99,999.99'
  62.  @ 16,10 SAY trenty PICTURE '99,999.99'
  63.  @ 16,36 SAY tflag
  64.  @ 16,62 SAY trentt PICTURE '99,999.99'
  65.  @ 18,10 SAY tnotes
  66.  @ 18,61 SAY tupdate
  67.  @ 20, 7 SAY prompt1
  68.  @ 21, 7 SAY prompt2
  69.  @ 22, 7 SAY prompt3
  70.  @ 22,70 GET command PICTURE '!'
  71.  READ
  72. * perform selected function
  73.  DO CASE
  74.  CASE (command = 'B' .OR. command = ',' )
  75. * move backwards one record
  76.   SKIP -1
  77.   LOOP
  78.  CASE command = 'D'
  79. * switch the current record from deleted to recalled
  80.   IF DELETE()
  81.    RECA
  82.   ELSE
  83.    DELE
  84.   ENDI DELETE()
  85.   LOOP
  86.  CASE command = 'E'
  87.   SET DELIMITER OFF
  88.   SET INTENSITY ON
  89. * store field variables into mem variables for editing
  90.   STOR tenant TO mtenant
  91.   STOR bcode TO mbcode
  92.   STOR tunit TO mtunit
  93.   STOR baddr TO mbaddr
  94.   STOR tcontac TO mtcontac
  95.   STOR tphone TO mtphone
  96.   STOR alt TO malt
  97.   STOR altad TO maltad
  98.   STOR altcty TO maltcty
  99.   STOR ttype TO mttype
  100.   STOR trentpc TO mtrentpc
  101.   STOR texpir TO mtexpir
  102.   STOR trentpcr TO mtrenpcr
  103.   STOR tfirst TO mtfirst
  104.   STOR tsec TO mtsec
  105.   STOR tsecb TO mtsecb
  106.   STOR tlate TO mtlate
  107.   STOR trent TO mtrent
  108.   STOR taddl TO mtaddl
  109.   STOR trente TO mtrente
  110.   STOR trentm TO mtrentm
  111.   STOR trentp TO mtrentp
  112.   STOR trentpd TO mtrentpd
  113.   STOR tlatec TO mtlatec
  114.   STOR trentd TO mtrentd
  115.   STOR trenty TO mtrenty
  116.   STOR trentt TO mtrentt
  117.   STOR tflag TO mtflag
  118.   STOR tnotes TO mtnotes
  119.   STOR tupdate TO mtupdate
  120. * set up screen and prompt for editing
  121.   STOR 'Edit Tenant Data          ' TO mode
  122.   STOR '                 Enter the new or corrected information        ' TO prompt1
  123.   STOR "                 Control 'Q'or 'W' to end edit session   " TO prompt2
  124.   STOR SPACE(70) TO prompt3
  125.   @ 1,26 SAY mode
  126.   @ 3,10 GET mtenant
  127.   @ 3,62 GET mbcode PICTURE '99999'
  128.   @ 4,10 GET mtunit
  129.   @ 4,36 GET mbaddr
  130.   @ 5,10 GET mtcontac
  131.   @ 5,62 GET mtphone PICTURE '(999)999-9999'
  132.   @ 6,36 GET malt PICTURE '!'
  133.   @ 7,10 GET maltad
  134.   @ 8,10 GET maltcty
  135.   @ 10,10 GET mttype PICTURE '!'
  136.   @ 10,36 GET mtrentpc
  137.   @ 10,62 GET mtfirst PICTURE '99/99/99'
  138.   @ 11,10 SAY SPACE(16)
  139.   @ 11,10 GET mtrenpcr
  140.   @ 11,62 GET mtexpir PICTURE '99/99/99'
  141.   @ 12,10 GET mtsec
  142.   @ 12,36 GET mtsecb
  143.   @ 12,62 GET mtlate PICTURE '99'
  144.   @ 13,10 GET mtrent
  145.   @ 13,36 GET mtlatec
  146.   @ 13,62 GET mtaddl
  147.   @ 14,10 GET mtrente
  148.   @ 14,36 GET mtrentm
  149.   @ 15,10 GET mtrentd
  150.   @ 15,36 GET mtrentpd PICTURE '99/99/99'
  151.   @ 15,62 GET mtrentp
  152.   @ 16,10 GET mtrenty
  153.   @ 16,36 GET mtflag PICTURE '99/99/99'
  154.   @ 16,62 GET mtrentt
  155.   @ 18,10 GET mtnotes
  156.   @ 18,61 GET mtupdate PICTURE '99/99/99'
  157.   @ 20,07 SAY prompt1
  158.   @ 21,07 SAY prompt2
  159.   @ 22,07 SAY prompt3
  160.   READ
  161.   CLEA GETS
  162. * test if there is a bad field validation
  163.   DO CASE
  164.   CASE mbcode = ' '
  165.    STOR .t. TO error
  166.   CASE .NOT.(malt = 'Y' .OR. malt = 'N')
  167.    STOR .t. TO error
  168.   CASE .NOT.(mttype = 'R'.OR.mttype='P'.OR. mttype='O')
  169.    STOR .t. TO error
  170.   CASE (mttype = 'P'.OR. mttype = 'O') .AND.(.NOT.(mtrentpc >0.AND. mtrenpcr >0))
  171.    STOR .t. TO error
  172.   OTHE
  173.    STOR .f. TO error
  174.   ENDC
  175. * if test for error was true then fix the fields that need fixing
  176.   IF error
  177. * erase the lines to be used for prompts
  178.    @ 01,00
  179.    @ 20,00
  180.    @ 21,00
  181.    @ 22,00
  182. * tell them to correct it
  183.    @ 1,18 SAY 'Please Correct the Indicated Data'
  184. * keep looping until all fields are fixed
  185.    STOR .t. to an_error
  186.    DO WHIL an_error
  187.     DO CASE
  188.     CASE mbcode = ' '
  189.      @ 20,01 SAY SPACE(75)
  190.      @ 21,01 SAY SPACE(75)
  191.      @ 20,15 SAY 'Must have a tenant code       '
  192.      @ 03,62 GET mbcode PICTURE '99999'
  193.      READ
  194.     CASE .NOT.(malt = 'Y' .OR. malt = 'N')
  195.      @ 20,01 SAY SPACE(75)
  196.      @ 21,01 SAY SPACE(75)
  197.      @ 20,15 SAY "Must answer 'Y' or 'N' to alternate address"
  198.      @ 06,36 GET malt PICTURE '!'
  199.      READ
  200.     CASE .NOT.(mttype = 'R'.OR.mttype='P'.OR. mttype='O')
  201.      @ 20,01 SAY SPACE(75)
  202.      @ 21,01 SAY SPACE(75)
  203.      @ 20,05 SAY "Type must be 'R' for Regular, 'P' for Percentage which uses the higher of"
  204.      @ 21,05 SAY "the percentage or the base rent or 'O' for Overage plus base rent"
  205.      @ 10,10 GET mttype PICTURE '!'
  206.      READ
  207.     CASE (mttype = 'P'.OR. mttype = 'O').AND.(.NOT.(mtrentpc>0.AND. mtrenpcr> 0))
  208.      @ 20,01 SAY SPACE(75)
  209.      @ 21,01 SAY SPACE(75)
  210.      @ 20,05 SAY 'If a percentage or overage lease, you must state the percentage'
  211.      @ 21,05 SAY 'AND the base for calculating the percentage rent'
  212.      @ 10,36 GET mtrentpc
  213.      @ 11,10 GET mtrenpcr
  214.      READ
  215.     OTHE
  216.      STOR .f. TO an_error
  217.     ENDC
  218.    ENDD while an:error
  219.   ENDI error
  220.   STOR 'N' TO command
  221.   SET DELIMITER ON
  222.   SET INTENSITY OFF
  223.   @ 20,01 SAY SPACE(75)
  224.   @ 21,01 SAY SPACE(75)
  225.   @ 20,23 SAY 'Are there any more changes ?   '
  226.   @ 20,50 GET command picture '!'
  227.   READ
  228.   SET INTENSITY ON
  229.   SET DELIMITER OFF
  230.   IF command = 'Y'
  231.    @ 1,00
  232.    @ 1,26 SAY mode
  233.    @ 3,10 GET mtenant
  234.    @ 3,62 GET mbcode PICTURE '99999'
  235.    @ 4,10 GET mtunit
  236.    @ 4,36 GET mbaddr
  237.    @ 5,10 GET mtcontac
  238.    @ 5,62 GET mtphone PICTURE '(999)999-9999'
  239.    @ 6,36 GET malt PICTURE '!'
  240.    @ 7,10 GET maltad
  241.    @ 8,10 GET maltcty
  242.    @ 10,10 GET mttype PICTURE '!'
  243.    @ 10,36 GET mtrentpc
  244.    @ 10,62 GET mtfirst PICTURE '99/99/99'
  245.    @ 11,10 GET mtrenpcr
  246.    @ 11,62 GET mtexpir PICTURE '99/99/99'
  247.    @ 12,10 GET mtsec
  248.    @ 12,36 GET mtsecb
  249.    @ 12,62 GET mtlate PICTURE '99'
  250.    @ 13,10 GET mtrent
  251.    @ 13,36 GET mtlatec
  252.    @ 13,62 GET mtaddl
  253.    @ 14,10 GET mtrente
  254.    @ 14,36 GET mtrentm
  255.    @ 15,10 GET mtrentd
  256.    @ 15,36 GET mtrentpd PICTURE '99/99/99'
  257.    @ 15,62 GET mtrentp
  258.    @ 16,10 GET mtrenty
  259.    @ 16,36 GET mtflag PICTURE '99/99/99'
  260.    @ 16,62 GET mtrentt
  261.    @ 18,10 GET mtnotes
  262.    @ 18,61 GET mtupdate PICTURE '99/99/99'
  263.    @ 20,01 SAY SPACE(75)
  264.    @ 21,01 SAY SPACE(75)
  265.    @ 22,01 SAY SPACE(75)
  266.    @ 20,07 SAY prompt1
  267.    @ 21,07 SAY prompt2
  268.    @ 22,07 SAY prompt3
  269. * let user enter data
  270.    READ
  271.    CLEA GETS
  272.   ENDI command = 'Y'
  273.   REPL tenant WITH mtenant, bcode WITH mbcode, tunit WITH mtunit
  274.   REPL baddr WITH mbaddr, tcontac WITH mtcontac, tphone WITH mtphone
  275.   REPL alt WITH malt, altad WITH maltad, altcty WITH maltcty
  276.   REPL ttype WITH mttype, texpir WITH mtexpir
  277.   REPL trentpc WITH mtrentpc, trentpcr WITH mtrenpcr
  278.   REPL tfirst WITH mtfirst, tsec WITH mtsec, tsecb WITH mtsecb
  279.   REPL tlate WITH mtlate, trent WITH mtrent, taddl WITH mtaddl
  280.   REPL trente WITH mtrente, trentm WITH mtrentm, trentp WITH mtrentp
  281.   REPL trentpd WITH mtrentpd, tlatec WITH mtlatec, trentd WITH mtrentd
  282.   REPL trenty WITH mtrenty, trentt WITH mtrentt
  283.   REPL tflag WITH mtflag, tnotes WITH mtnotes
  284. * ask if an automatic update of the date is wanted
  285.   IF SUBSTR(DTOC(DATE()),1,2) <> '00'
  286.    STOR 'Y' TO command
  287.    @ 20,01 SAY SPACE(75)
  288.    @ 21,01 SAY SPACE(75)
  289.    @ 22,01 SAY SPACE(75)
  290.    @ 20,12 SAY 'Do You wish to UpDate to Todays Date (Y/N) ?'
  291.    @ 20,57 GET command PICTURE '!'
  292.    READ
  293.    IF command = 'Y'
  294.     REPL tupdate WITH  DTOC(DATE())
  295.    ELSE
  296.     REPL tupdate WITH mtupdate
  297.    ENDI $(date)
  298.   ENDI command = 'Y'
  299.   SET DELIMITER ON
  300.   SET INTENSITY OFF
  301.   STOR .t. TO first
  302.  CASE (command = 'F' .OR. command = '.' )
  303. * move forward one record
  304.   SKIP
  305.   LOOP
  306.  CASE (command = 'H' .OR. command = '?' )
  307. * display a screen full of instructions
  308.   STOR .t. TO first
  309.   CLEA
  310.   TEXT
  311.  
  312.  
  313.  
  314.            M A I N   T E N A N T   M E N U   H E L P   F I L E
  315.  
  316.     Welcome to the  SIG/M PROPERTY MANAGER main tenant data base file.
  317.     I am here to help you and you can call me anytime by just entering
  318.     a ? mark at any place where this program asks for a command.
  319.  
  320.     When you go back to the screen you will see two lines -  on top of     
  321.     the first line it says   'Main Tenant Database Menu' - thus,   the
  322.     program always tells you where you are!
  323.  
  324.     Between the two lines  we have the information you or someone else
  325.     entered into the computer.  This information tells you all about a  
  326.     particular tenant.
  327.  
  328.  
  329.  
  330.                If you press any key I will tell you more.
  331.  
  332.  
  333.   ENDT
  334.   SET CONSOLE OFF
  335.   WAIT
  336.   SET CONSOLE ON
  337.   CLEA
  338.   TEXT
  339.  
  340.    This is a multiple data base - by that I mean - you can have one screen of
  341. information about the building and another screen of information about any of 
  342. the tenants in that building.  To find the information about the building the
  343. tenant resides in, hit 'U' for b<U>ilding records.                           
  344.  
  345. The information on screen in clear, so let's look below the line.  This shows
  346. what you can do.  To look at the next record -  hit 'F' (or a period).  To go
  347. back one record - hit 'B' (or a comma). To delete a record hit 'D' and a sign
  348. will appear at the upper right corner.  To remove the delete - hit 'D' again.
  349. Don't worry  -   you cannot accidentally delete a record just by hitting 'D'.  
  350. You must run another program on the Maintenance Menu (purge) to delete.
  351.  
  352. To find a file - hit 'S' for search if you know the code number.Otherwise you
  353. can find any string in the file by using the 'N' search option.   To add more
  354. tenants, however, you must go back to the building data base and hit 'A'  for
  355. Add. The Add option allows you to enter new buildings and tenants or just new
  356. tenants. To Edit a file, use the 'E' option.                               
  357.  
  358.                       Please hit any key to continue         
  359.  
  360.  
  361.  
  362.   ENDT
  363.   SET CONSOLE OFF
  364.   WAIT
  365.   SET CONSOLE ON
  366.   CLEA
  367.   TEXT
  368.  
  369.        The Type of tenancy can be either 'R' for regular, 'P' for per-
  370.    centage rent (in which the higher of the percentage or base becomes the  
  371.    base or 'O' for overage, where an overage rent is added to the base rent.
  372.    To use different methods of calculation, the code in the files ending in
  373.    'TNT' should be changed.                        
  374.                                                                          
  375.    -------------------------------------------------------------------------
  376.    WHATEVER YOU DO  -  NEVER SHUT OFF THE MACHINE OR REMOVE A DISK UNTIL YOU 
  377.    FIRST RETURN TO THE MAIN MENU AND THEN QUIT TO THE OPERATING SYSTEM.     
  378.  
  379.    If you ever get a SYNTAX error that just hitting ENTER does not correct, 
  380.    hit the ESCAPE key and type Quit. Then try all over again.
  381.  
  382.    EVERY SO OFTEN YOU WILL FIND YOU WANT TO USE THE ESCAPE KEY AND WHEN YOU
  383.    TRY TO TYPE 'QUIT' NOTHING HAPPENS. AT A FEW POINTS IN THIS PROGRAN SCREEN
  384.    ACCESS HAS BEEN ELIMINATED. THEREFORE, TYPE 'QUIT' EVEN THOUGH IT DOES NOT
  385.    APPEAR ON THE SCREEN - AND UNLESS THE MACHINE IS LOCKED UP - YOU WILL EXIT
  386.    TO THE OPERATING SYSTEM.
  387.    -------------------------------------------------------------------------
  388.  
  389.              Please hit any key to get back to the data base
  390.  
  391.   ENDT
  392.   SET CONSOLE OFF
  393.   WAIT
  394.   SET CONSOLE ON
  395.   LOOP
  396.  CASE command = 'P'
  397. * Screen print
  398.   @ 20,00
  399.   @ 21,00
  400.   @ 22,00
  401.   @ 20,0 SAY 'PRINT OPTIONS: S (SINGLE SPACE), D (DOUBLE SPACE), N (NO PRINTING)       '
  402.   STOR 'Y' TO PRNTSCRN
  403.   STOR 'N' TO PRNTOPT
  404.   @ 20,67 GET PRNTOPT PICTURE '!'
  405.   READ
  406.   DO WHIL AT(PRNTOPT, 'SDN') = 0
  407.    @ 20,67 GET PRNTOPT PICTURE '!'
  408.    READ
  409.   ENDD
  410.   IF PRNTOPT = 'S'
  411.    STOR 1 TO LINEMULT
  412.   ENDI
  413.   IF PRNTOPT = 'D'
  414.    STOR 2 TO LINEMULT
  415.   ENDI
  416.   IF PRNTOPT = 'N'
  417.    STOR 'N' TO PRNTSCRN
  418.   ENDI
  419.   IF PRNTSCRN = 'Y'
  420.    STOR trent TO trentx
  421.    IF ttype = 'P'
  422.     IF (trentpc*(trentpcr/100)/12)>trent
  423.      STOR (trentpc*(trentpcr/100)/12) TO trentx
  424.     ENDI (trentpc)
  425.    ENDI ttype = 'P'
  426.    IF ttype = 'O'
  427.     STOR ((trentpc*(trentpcr/100)/12)+trent) TO trentx
  428.    ENDI ttype = 'O'
  429.    STOR (trentx + tlatec + taddl + trente + trentm) TO trentxx
  430.    SET DEVICE TO PRINT
  431.    EJEC
  432.    @ LINEMULT*4,3 SAY 'Tenant:'
  433.    @ LINEMULT*4,12 SAY TENANT
  434.    @ LINEMULT*4,54 SAY 'Code:'
  435.    @ LINEMULT*4,61 SAY BCODE
  436.    @ LINEMULT*5,5 SAY 'Unit:'
  437.    @ LINEMULT*5,12 SAY TUNIT
  438.    @ LINEMULT*5,27 SAY 'Building:'
  439.    @ LINEMULT*5,38 SAY BADDR
  440.    @ LINEMULT*6,2 SAY 'Contact:'
  441.    @ LINEMULT*6,12 SAY TCONTAC
  442.    @ LINEMULT*6,53 SAY 'Phone:'
  443.    @ LINEMULT*6,61 SAY TPHONE
  444.    @ LINEMULT*7,9 SAY 'Alternate mailing address:'
  445.    @ LINEMULT*7,36 SAY ALT
  446.    @ LINEMULT*8,1 SAY 'Address:'
  447.    @ LINEMULT*8,10 SAY ALTAD
  448.    @ LINEMULT*9,4 SAY 'City:'
  449.    @ LINEMULT*9,10 SAY ALTCTY
  450.    @ LINEMULT*11,5 SAY 'Type:'
  451.    @ LINEMULT*11,12 SAY TTYPE
  452.    @ LINEMULT*11,20 SAY 'Addl Percentage:'
  453.    @ LINEMULT*11,38 SAY TRENTPC PICTURE '99.9999'
  454.    @ LINEMULT*11,49 SAY '1st Lease:'
  455.    @ LINEMULT*11,61 SAY TFIRST
  456.    @ LINEMULT*12,5 SAY 'Base:'
  457.    @ LINEMULT*12,12 SAY TRENTPCR PICTURE '$999,999,999'
  458.    @ LINEMULT*12,25 SAY 'Expiration:'
  459.    @ LINEMULT*12,38 SAY TEXPIR
  460.    @ LINEMULT*13,1 SAY 'Security:'
  461.    @ LINEMULT*13,12 SAY TSEC PICTURE '$99,999.99'
  462.    @ LINEMULT*13,31 SAY 'Bank:'
  463.    @ LINEMULT*13,38 SAY TSECB
  464.    @ LINEMULT*13,49 SAY 'Late Date:'
  465.    @ LINEMULT*13,61 SAY TLATE
  466.    @ LINEMULT*14,5 SAY 'Rent:'
  467.    @ LINEMULT*14,12 SAY TRENT PICTURE '$99,999.99'
  468.    @ LINEMULT*14,26 SAY 'Late Chgs:'
  469.    @ LINEMULT*14,38 SAY TLATEC PICTURE '$99,999.99'
  470.    @ LINEMULT*14,49 SAY 'Addl Rent:'
  471.    @ LINEMULT*14,61 SAY TADDL PICTURE '$99,999.99'
  472.    @ LINEMULT*15,4 SAY 'G & E:'
  473.    @ LINEMULT*15,12 SAY TRENTE PICTURE '$99,999.99'
  474.    @ LINEMULT*15,26 SAY 'Other Chgs:'
  475.    @ LINEMULT*15,38 SAY TRENTM PICTURE '$99,999.99'
  476.    @ LINEMULT*15,49 SAY 'Total Rent:'
  477.    @ LINEMULT*15,61 SAY TRENTXX PICTURE '$99,999.99'
  478.    @ LINEMULT*16,1 SAY 'Rent Due:'
  479.    @ LINEMULT*16,12 SAY TRENTD PICTURE '$99,999.99'
  480.    @ LINEMULT*16,23 SAY 'Last Payment:'
  481.    @ LINEMULT*16,38 SAY TRENTPD
  482.    @ LINEMULT*16,50 SAY 'Amt Paid:'
  483.    @ LINEMULT*16,61 SAY TRENTP PICTURE '$99,999.99'
  484.    @ LINEMULT*17,01 SAY 'Total Yr:'
  485.    @ LINEMULT*17,12 SAY TRENTY PICTURE '$99,999.99'
  486.    @ LINEMULT*17,31 SAY 'Flag:'
  487.    @ LINEMULT*17,38 SAY TFLAG
  488.    @ LINEMULT*17,53 SAY 'Total:'
  489.    @ LINEMULT*17,61 SAY TRENTT PICTURE '$99,999.99'
  490.    @ LINEMULT*19,4 SAY 'Notes:'
  491.    @ LINEMULT*19,12 SAY TNOTES
  492.    @ LINEMULT*19,52 SAY 'Update:'
  493.    @ LINEMULT*19,61 SAY TUPDATE
  494.    @ LINEMULT*21,1 SAY DTOC(DATE())
  495.    @ 52,0 SAY ' '
  496.    SET DEVICE TO SCREEN
  497.   ENDI
  498.   * RELE PRNTSCRN, PRNTOPT, LINEMULT
  499.   @ 20,00
  500.   @ 21,00
  501.   @ 22,00
  502.   LOOP
  503.  CASE command = 'Q' .OR. command = 'R'
  504.   STOR .f. TO more
  505.   LOOP
  506.  CASE command = 'U'
  507.   STOR SUBSTR(bcode,1,2) TO findt
  508.   SELE A
  509.   USE &dr:build index &dr.:code
  510.   SEEK TRIM(findt)
  511.   DO build
  512.  CASE command = 'S'
  513.   @ 20,00
  514.   @ 21,00
  515.   @ 22,00
  516.   STOR '     ' TO findt
  517.   @ 20,27 SAY 'Enter Code Number'
  518.   @ 20,48 GET findt PICTURE '99999'
  519.   READ
  520.   SEEK TRIM(findt)
  521.   IF .NOT. FOUND()
  522.    @ 20,00
  523.    @ 20,16 SAY 'Unable to locate tenant with that Code Number'
  524.    @ 21,20 SAY 'PLEASE HIT ANY KEY TO CONTINUE'
  525.    SET CONSOL OFF
  526.    WAIT
  527.    SET CONSOL ON
  528.    GO TOP
  529.   ENDI
  530.   LOOP
  531.  CASE command= 'N'
  532.   DO search1t
  533.   STOR .t. TO first
  534.   LOOP
  535.  ENDC
  536. * loop back again
  537. ENDD WHILE more
  538. RETU
  539.