home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / manage1.zip / CHART.PRG < prev    next >
Text File  |  1986-05-29  |  5KB  |  165 lines

  1. **    Last revision: May 26, 1986 at 19:17
  2. * chart.prg chart of account program
  3. SELE D
  4. USE &dr.:CHART
  5. SET INDEX TO &dr.:chart
  6. STOR .t. TO more3
  7. DO WHIL more3
  8.  STOR '?' TO comman
  9.  CLEA
  10.  IF clipper
  11.   @ 0,0, 22, 79 BOX frame
  12.   @ 4,1 SAY line1
  13.   @ 19,1 SAY line1
  14.  ELSE
  15.   @ 0,0 TO 4,79
  16.   @ 0,0 TO 19,79
  17.   @ 0,0 TO 22,79 DOUBLE
  18.  ENDI
  19.  @ 20,5 SAY 'Please select one of the above options. You may also leave this menu'
  20.  @ 21,5 SAY "by typing 'Q' and get on-line HELP by typing '?'."
  21.  @ 2,04 SAY dconame + ' -  CHART OF ACCOUNTS MENU'
  22.  @ 2,65 SAY DTOC(date())
  23.  @ 07,26 SAY "1. Display Chart of Accounts"
  24.  @ 08,26 SAY "2. Print Chart of Accounts"
  25.  @ 09,26 SAY "3. Edit or delete existing accounts"
  26.  @ 10,26 SAY "4. Add new accounts"
  27.  @ 11,26 SAY "5. Index Chart of Accounts"
  28.  @ 12,26 SAY "6. Return to prior menu"
  29.  @ 17,23 SAY "PLEASE SELECT ONE OF THE OPTIONS"
  30.  @ 17,58 GET comman PICTURE '!'
  31.  READ
  32.  DO WHIL AT(COMMAN, '123456?Q') = 0
  33.   STOR '?' TO comman
  34.   @ 17,58 GET comman PICTURE '!'
  35.   READ
  36.  ENDD
  37.  CLEA GETS
  38.  DO CASE
  39.  CASE comman = '1' .OR. comman = '2'
  40.   IF comman =  '2'
  41.    SET PRINT ON
  42.    LIST all fields acctno, desc
  43.    SET PRINT OFF
  44.   ELSE
  45.    CLEA
  46.    DISP all fields acctno, desc
  47.    ? ' '
  48.    ? '                               Hit any key to continue'
  49.    SET CONSOLE OFF
  50.    WAIT
  51.    SET CONSOLE ON
  52.   ENDI comman = '2'
  53.   LOOP
  54.  CASE comman = '3'
  55.   CLEA
  56.   STOR .t. TO more4
  57.   DO WHIL more4
  58.    STOR '    ' TO macctno
  59.    STOR '                                             ' TO mdesc
  60.    @ 12,00
  61.    @ 13,00
  62.    @ 15,00
  63.    @ 8,10 SAY 'Leave blank to end editing'
  64.    @ 10,10 SAY "What account shall we edit ?"
  65.    @ 10,39 GET macctno PICTURE '9999'
  66.    READ
  67.    IF macctno = ' '
  68.     STOR .f. TO more4
  69.    ELSE
  70.     SEEK macctno
  71.     DO WHIL (EOF() .OR. BOF())
  72.      @ 10,10 SAY "What account shall we edit  ?"
  73.      @ 10,39 GET macctno PICTURE '9999'
  74.      READ
  75.      SEEK macctno
  76.     ENDD WHILE # = 0
  77.     STOR 'N' TO getrid
  78.     STOR desc TO mdesc
  79.     @ 12,10 SAY "Account Number: "
  80.     @ 13,13 SAY "Description: "
  81.     @ 12,27 GET macctno PICTURE '9999'
  82.     @ 13,27 GET mdesc
  83.     READ
  84.     @ 15,15 SAY "Shall we delete the account ?"
  85.     @ 15,45 GET getrid PICTURE '!'
  86.     READ
  87.     CLEA GETS
  88.     IF getrid = 'Y'
  89.      @ 17,10 SAY "Don't forget to reindex to remove deleted record."
  90.      DELE
  91.     ELSE
  92.      REPL acctno WITH macctno
  93.      REPL desc WITH mdesc
  94.     ENDI getrid
  95.    ENDI macctno
  96.   ENDD WHILE more4
  97.   LOOP
  98.  CASE comman = '4'
  99.   STOR .t. TO more4
  100.   DO WHIL more4
  101.    CLEA
  102.    STOR '    ' TO macctno
  103.    STOR '                                             ' TO mdesc
  104.    @ 08,10 SAY 'Add as many account as you wish - just leave a blank to end'
  105.    @ 10,10 SAY "Account Number: "
  106.    @ 11,13 SAY "Description: "
  107.    @ 10,27 GET macctno PICTURE '9999'
  108.    @ 11,27 GET mdesc
  109.    READ
  110.    IF macctno = ' '
  111.     STOR .f. TO more4
  112.    ELSE
  113.     APPE blank
  114.     REPL acctno WITH macctno, desc WITH mdesc
  115.    ENDI macct no
  116.   ENDD while more4
  117.  CASE comman = '5'
  118.   SET TALK ON
  119.   SET ECHO ON
  120.   CLOS INDEX
  121.   PACK
  122.   INDE on acctno TO &dr.:chart
  123.   SET ECHO OFF
  124.   SET TALK OFF
  125.   SET INDEX TO &dr.:chart
  126.   LOOP
  127.  CASE comman = '?'
  128.   CLEA
  129.   TEXT
  130.             C H A R T   O F    A C C O U N T S   H E L P   M E N U
  131.  
  132.     The Chart of Accounts is critical to your use of this program.
  133.         It is the vehicle by which you can customize Property Manager
  134.         to fit your requirement. IF YOU SELECTED THE GENERAL CHART OF
  135.         ACCOUNTS YOU MUST INDEX BEFORE FIRST USE.
  136.  
  137.         The Display function shows the various accounts on screen in 
  138.         account number order. The print funtion outputs a full list to
  139.         your printer.  We would suggest that you print the list and    
  140.         decide how it should be customized to meet your needs. You can
  141.         then use the edit function to change or delete items and the
  142.         add funtion to add new items.  Remember, before you use it
  143.         you must index it. (Note to the edit function will not find
  144.         an entry that has had the account number changed unless you
  145.         reindex. 
  146.  
  147.         If you change the account number structure you may have to 
  148.         change the statement writing modules. Chances are you will 
  149.         not have to - but you may.
  150.  
  151.                                   Hit any key to continue
  152.   ENDT
  153.   SET CONSOLE OFF
  154.   WAIT
  155.   SET CONSOLE ON
  156.   LOOP
  157.  CASE comman = '6' .OR. comman = 'Q'
  158.   STOR .f. TO more3
  159.  ENDC
  160. ENDD WHILE more3
  161. SELE C
  162. USE &dr.:account
  163. SET INDEX TO &dr.:account
  164. RETU
  165.