home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / manage2.zip / MANAGE.PRG < prev   
Text File  |  1986-05-31  |  13KB  |  347 lines

  1. **    Last revision: May 27, 1986 at 20:58
  2. * MANAGE.PRG
  3. *
  4. * This is a highly complicated program and your help in both clearing
  5. * up the bugs and making suggestions will be appreciated. My thanks to the
  6. * many people who helped test and revise this program - and especially to
  7. * Lee Hillard for some great code and for his pretty print and dBASE syntax
  8. * checker program. Lee is at Hilco Software, 304 N. 17th St., Mt. Vernon
  9. * WA 98273. (206) 428-0475. I might add that the coded portion of the program
  10. * was done using RECODE by Hilco. However, there is no way that we could
  11. * fully test this program without extensive field work.  Most of the changes
  12. * from this point on should be relatively simple - so if you are using the
  13. * program, please drop me a note.  We will try to let you know of changes
  14. * as they develop, either via a note or a new SIG/M release. If you find a
  15. * bug or a requirement for the program, please let us know.
  16. *
  17. * April 1986
  18. * After receiving many requests I finally did a conversion of this
  19. * program from dBASEII to dBASEIII.  This is the converted version. It
  20. * really has not been tested - so please drop me a card on any problems
  21. * you find.
  22. *
  23. * Please contact:
  24. *                   Stephen M. Leon
  25. *                   200 Winston Drive
  26. *                   Cliffside Park, NJ 07010
  27. *                   (201) 886-1658
  28. *                         or
  29. *                   Department of Law
  30. *                   2 World Trade Center
  31. *                   New York, NY 10047
  32. *                   (212) 488-7677
  33. *******************************************************************************
  34. *                                                                             *
  35. *                    N O T I C E                                              *
  36. *                                                                             *
  37. * Copyright 1984,86 by STEPHEN M.LEON.  Non-commercial use or distribution       *
  38. * of the program is authorized only if this notice is retained together with  *
  39. * the text relating to acceptance of the terms of this notice, and the person *
  40. * or persons using the program or benefiting therefrom assume all direct or   *
  41. * indirect risks of such use and agree to indemnify the author and the not-   *
  42. * for-profit computer clubs distributing this program, from any direct or     *
  43. * or indirect expenses incurred by them as a result of their use thereof.     *
  44. * Expenses shall include reasonable counsel fees including reasonable fees    *
  45. * of the author in his capacity as an attorney for services on a reasonable   *
  46. * billing time basis rendered to himself in his capacity as the holder of     *
  47. * the copyright.  Any use of this program constitutes an agreement to the     *
  48. * conditions of this license.  Any other use or distribution is unauthorized  *
  49. * and prohibited  without the express written consent of the author.          *
  50. *                                                                             *
  51. * This program is distributed free (for a nominal media charge) by SIG/M      *
  52. * Special Interest Group/Microcomputers, Box 97, Iselin, NJ 08830.            *
  53. * SIG/M is a not-for-profit undertaking of the Amateur Computer Group of New  *
  54. * Jersey and the New York Amateur Computer Club. This program is also made    *
  55. * available for PC users via PC/BLUE SOFTWARE, also a not-for profit under-   *
  56. * taking of the New Jersey and New York clubs. Permission is granted to any   *
  57. * other not-for-profit group to include this program in their library so long *
  58. * as this notice is retained and the conditions set forth herein are complied *
  59. * with.
  60. *******************************************************************************
  61. * initializing program of multiple database
  62. SET TALK OFF
  63. SET HEADING OFF
  64. SET SCOREBOARD OFF
  65. SET SAFETY OFF
  66. SET DELIMITER ON
  67. SET INTENSITY OFF
  68. SET DELIMITER TO '[]'
  69. PUBL more, first, dr, dconame, clipper, moveit, account, keepitup, frame, line, line1
  70. IF .NOT. clipper
  71.  SET FUNCTION 'F2' TO ' '
  72.  SET FUNCTION 'F3' TO ' '
  73.  SET FUNCTION 'F4' TO ' '
  74.  SET FUNCTION 'F5' TO ' '
  75.  SET FUNCTION 'F6' TO ' '
  76.  SET FUNCTION 'F7' TO ' '
  77.  SET FUNCTION 'F8' TO ' '
  78.  SET FUNCTION 'F9' TO ' '
  79.  SET FUNCTION 'F10' TO ' '
  80.  SET DOHISTORY ON
  81.  SET HELP OFF
  82.  ON ERROR SUSPEND
  83.  ON ESCAPE suspend
  84. ENDI
  85. SET PROCEDURE TO PROC
  86. line = REPLICATE(CHR(205),80)
  87. line1 = REPLICATE(CHR(205),78)
  88. frame = CHR(201)+CHR(205)+CHR(187)+CHR(186)+CHR(188)+;
  89. CHR(205)+CHR(200)+CHR(186)
  90. * must have correct date information
  91. DO WHIL SUBSTR(DTOC(DATE()),7,2) = '80'
  92.  CLEA
  93.  ! DATE
  94.  ! TIME
  95. ENDD
  96. IF .NOT. file ("MANAGE.DAT")
  97.  DO INIT
  98. ENDI .NOT. file
  99. REST from manage.dat additive
  100. IF clipper
  101.  IF .NOT. file ("CODE.NTX")
  102.   CLEA
  103.   @ 10,10 SAY 'I must create index files for Clipper.'
  104.   @ 11,10 SAY 'Please be patient for a few moments'
  105.   @ 12,00 SAY '   '
  106.   SELE A
  107.   USE &dr.:build
  108.   INDE ON bcode TO &dr.:code
  109.   SELE B
  110.   USE &dr.:tenant
  111.   INDE on bcode to &dr.:codea
  112.   SELE C
  113.   USE &dr.:account
  114.   INDE ON SUBSTR(data,7,4) +date + SUBSTR(data,5,2) TO &dr.:account
  115.   SELE D
  116.   USE &dr.:CHART
  117.   INDE on acctno TO &dr.:chart
  118.  ENDI
  119. ELSE
  120.  IF .NOT. file ("CODE.NDX")
  121.   CLEA
  122.   @ 10,10 SAY 'I must create index files for dBase.'
  123.   @ 11,10 SAY 'I will keep you posted'
  124.   @ 12,00 SAY '   '
  125.   SET ECHO ON
  126.   SET TALK ON
  127.   SELE A
  128.   USE &dr.:build
  129.   INDE ON bcode TO &dr.:code
  130.   SELE B
  131.   USE &dr.:tenant
  132.   INDE on bcode to &dr.:codea
  133.   SELE C
  134.   USE &dr.:account
  135.   INDE ON SUBSTR(data,7,4) +date + SUBSTR(data,5,2) TO &dr.:account
  136.   SELE D
  137.   USE &dr.:CHART
  138.   INDE on acctno TO &dr.:chart
  139.   SET TALK OFF
  140.   SET ECHO OFF
  141.  ENDI
  142. ENDI clipper
  143. SET PROC TO proc
  144. CLEA
  145. IF clipper
  146.  @ 1,0, 16, 79 BOX frame
  147.  @ 3,3, 14, 74 BOX frame
  148. ELSE
  149.  @ 01,0 TO 16,79 double
  150.  @ 03,3 TO 14,74 double
  151. ENDI clipper
  152. @ 05,19 SAY 'AMATEUR COMPUTER GROUP OF NEW JERSEY'
  153. @ 7,18 SAY 'SIG/M  P R O P E R T Y  M A N A G E R'
  154. @ 9,20 SAY 'A dBASEIII DATA MANAGEMENT PROGRAM'
  155. @ 10,25 SAY 'FOR TENANTED REAL ESTATE'
  156. @ 11,35 SAY 'by Stephen M. Leon'
  157. @ 13,40 SAY 'Vers 2.0  June 1986 (C) 1984,5,6'
  158. STOR 'Y' TO goahead
  159. @ 18,07 SAY "ARE YOU AGREEABLE TO THE TERMS OF THE COPYRIGHT LICENSING AGREEMENT"
  160. @ 19,07 SAY "AS SET FORTH IN THE FILE 'MANAGE.PRG' ? "
  161. @ 19,65 GET goahead PICTURE '!'
  162. READ
  163. DO WHIL AT(goahead, 'YN') = 0
  164.  @ 19,65 GET goahead PICTURE '!'
  165.  READ
  166. ENDD WHILE goahead
  167. IF goahead = 'N'
  168.  QUIT
  169. ENDI
  170. * set up initial database file
  171. SELE A
  172. USE &dr.:build
  173. SET INDEX TO &dr.:code
  174. * set up forever loop for program
  175. DO WHIL .t.
  176.  STOR '?' TO comman
  177.  CLEA
  178.  IF clipper
  179.   @ 0,0, 22, 79 BOX frame
  180.   @ 4,1 SAY line1
  181.   @ 19,1 SAY line1
  182.  ELSE
  183.   @ 0,0 TO 4,79
  184.   @ 0,0 TO 19,79
  185.   @ 0,0 TO 22,79 DOUBLE
  186.  ENDI
  187.  @ 20,5 SAY 'Please select one of the above options. You may also leave this menu'
  188.  @ 21,5 SAY "by typing 'Q' and get on-line HELP by typing '?'."
  189.  @ 2,06 SAY DCONAME + '  -  MAIN MENU'
  190.  @ 2,65 SAY DTOC(date())
  191.  @ 7,26 SAY "A.  Accounting Database"
  192.  @ 8,26 SAY "B.  Building Database"
  193.  @ 9,26 SAY "C.  Tenant Database"
  194.  @ 10,26 SAY "D.  Database Maintenance"
  195.  @ 11,26 SAY "E.  Help"
  196.  @ 12,26 SAY "F.  Reports"
  197.  @ 13,26 SAY "G.  Quit to dBASE"
  198.  @ 14,26 SAY "H.  Exit to operating system"
  199.  @ 17,23 SAY "PLEASE SELECT ONE OF THE OPTIONS"
  200.  @ 17,58 GET comman PICTURE '!'
  201.  READ
  202.  DO WHIL AT(COMMAN, 'ABCDEFGH?Q') = 0
  203.   STOR '?' TO comman
  204.   @ 17,58 GET comman PICTURE '!'
  205.   READ
  206.  ENDD
  207.  DO CASE
  208.  CASE COMMAN = 'A'
  209.   SELE C
  210.   USE &dr.:account
  211.   DO account
  212.  CASE COMMAN = 'B'
  213.   SELE A
  214.   USE &dr.:build INDEX &dr.:code
  215.   DO build
  216.  CASE COMMAN = 'C'
  217.   SELE B
  218.   USE &dr.:tenant INDEX &dr.:codea
  219.   DO tenant
  220.  CASE COMMAN = 'D'
  221.   DO maintain
  222.  CASE COMMAN = 'F'
  223.   DO report
  224.  CASE COMMAN = 'E' .OR. COMMAN = '?'
  225.   CLEA
  226.   TEXT
  227.  
  228.                M A I N   M E N U   H E L P   F I L E
  229.  
  230. We have tried to make this program as  simple and as straight forward as is
  231. possible. There is no separate documentation - but at any point in the pro-
  232. gram where a '?' prompt appears we have built in a help menu to explain the
  233. various options.  You also may want to print out the opening program module
  234. (a file called 'MANAGE.PRG')                                                
  235.  
  236.  
  237. Remember - HELP is available at any point where there is a question mark.
  238. Just hit ENTER (or '?') and program information will be displayed on screen.
  239. In addition, you can leave any menu by typing 'Q'.
  240.  
  241. There are three main data bases.  BUILDING - which has the basic information 
  242. about each property. TENANT - which has data on each tenant in each building
  243. and ACCOUNTING.
  244.  
  245.                    Please hit any key to continue
  246.  
  247.   ENDT
  248.   SET CONSOLE OFF
  249.   WAIT
  250.   SET CONSOLE ON
  251.   CLEA
  252.   TEXT
  253.  
  254. The BUILDING and TENANT databases contain information.  Who lives where, how
  255. much they pay, did they pay, when is the rent due or the lease up.
  256.  
  257. The ACCOUNTING data base allows you to make journal entries and input cash  
  258. receipts and cash disbursements. From the report menu in the accounting data
  259. base you can print out the Cash Receipts Book, the Cash Disbursements Book,
  260. the General Journal and the General Ledger.  To expedite entry of the items
  261. into the file, we require that you run an update program to post the entries
  262. to the ledgers.
  263.  
  264. The ACCOUNTING data base also allows you to prepare and print a balance sheet
  265. and profit and loss statement (as well as a cash generated from operatings
  266. statement.) Each time you request a statement the data is saved in a file so
  267. that you can always reprint the statement of the date in question.
  268.  
  269.  
  270.                            Please hit any key to continue
  271.  
  272.                            
  273.  
  274.   ENDT
  275.   SET CONSOLE OFF
  276.   WAIT
  277.   SET CONSOLE ON
  278.   CLEA
  279.   TEXT
  280.  
  281. Reports other than accounting reports are handled through the menu you are now
  282. at. This report function allows you to send out rent bills (but you have to be
  283. sure you first posted the new month from the ACCOUNTING data base). It also
  284. prints out a delinquency report, a vacancy report, a lease expiration report 
  285. and address labels for the tenants.
  286.  
  287. The Maintenance function on this menu allows you to Reindex the BUILDING and
  288. TENANT data bases. (A power surge, an improper shutdown, etc. can mess up your
  289. index - so you may have to reindex. You also can add records without indexing-
  290. but must later use the index function.) If you delete a building and its units
  291. you have to run the Purge function on the Maintenance menu. (When you 'delete'
  292. a file - you do not remove it from the records until you Purge. It merely has
  293. a sign 'Deleted' on the upper left hand portion of the screen. If for some 
  294. reason you decide to Edit a deleted file - we assume you want it back and the
  295. program automatically 'undeletes' it.
  296.  
  297. A very powerful function tool - Browse - is on the Maintenance menu. It allows
  298. you to write directly to any file. Display lets you view the records - but not
  299. change them. The rest is obvious, so enjoy the program.
  300.  
  301.                   Press any key to return to the menu
  302.   ENDT
  303.   SET CONSOLE OFF
  304.   WAIT
  305.   SET CONSOLE ON
  306.   CLEA
  307.   TEXT
  308.  
  309.  
  310.      We have tried to document this program as best we could in the
  311.      various HELP menus.  We also have tries to give as much guidance
  312.      as possible in the source code, so that you could make your own
  313.      changes or fix any problems as they developed. The big problem
  314.      was space, so we did have to limit source code comments.
  315.  
  316.      We know that there are bound to be problems.  We have therefore 
  317.      done what most programs of this type do not do - we have left the
  318.      ESCape key on most of the time to give you an out.  If you have 
  319.      a problem, hit ESCape and type quit.  Even if the console is 
  320.      turned off at that time, you will not see the words being typed,
  321.      but it will return to the operating system (assuming you have
  322.      not somehow locked up the machine - in which event you will have 
  323.      to reboot). (Most programs of this type are also not free.)
  324.  
  325.      You may want to take out the ESCape sequence. It is part of the
  326.      program initialization. It can always be changed from either of
  327.      the maintenance menus.
  328.  
  329.                             Hit any key to return to the program
  330.   ENDT
  331.   SET CONSOLE OFF
  332.   WAIT
  333.   SET CONSOLE ON
  334.   STOR .f. TO moveit
  335.   STOR .t. TO first
  336.  CASE COMMAN = 'G'
  337.   CLEA ALL
  338.   RELE ALL
  339.   CANC
  340.  CASE COMMAN = 'H' .OR. COMMAN = 'Q'
  341.   CLEA
  342.   SET CONSOLE OFF
  343.   QUIT
  344.  ENDC
  345. ENDD while .t.
  346. 
  347.