home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / manage.zip / MANAGE.PRG < prev    next >
Text File  |  1987-08-15  |  13KB  |  348 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. PUBL printer, disk, filename, comm, nowprint, rec_no, command
  71. IF .NOT. clipper
  72.  SET FUNCTION 'F2' TO ' '
  73.  SET FUNCTION 'F3' TO ' '
  74.  SET FUNCTION 'F4' TO ' '
  75.  SET FUNCTION 'F5' TO ' '
  76.  SET FUNCTION 'F6' TO ' '
  77.  SET FUNCTION 'F7' TO ' '
  78.  SET FUNCTION 'F8' TO ' '
  79.  SET FUNCTION 'F9' TO ' '
  80.  SET FUNCTION 'F10' TO ' '
  81.  SET DOHISTORY ON
  82.  SET HELP OFF
  83.  ON ERROR SUSPEND
  84.  ON ESCAPE suspend
  85. ENDI
  86. SET PROCEDURE TO PROC
  87. line = REPLICATE(CHR(205),80)
  88. line1 = REPLICATE(CHR(205),78)
  89. frame = CHR(201)+CHR(205)+CHR(187)+CHR(186)+CHR(188)+;
  90. CHR(205)+CHR(200)+CHR(186)
  91. * must have correct date information
  92. DO WHIL SUBSTR(DTOC(DATE()),7,2) = '80'
  93.  CLEA
  94.  ! DATE
  95.  ! TIME
  96. ENDD
  97. IF .NOT. file ("MANAGE.DAT")
  98.  DO INIT
  99. ENDI .NOT. file
  100. REST from manage.dat additive
  101. IF clipper
  102.  IF .NOT. file ("CODE.NTX")
  103.   CLEA
  104.   @ 10,10 SAY 'I must create index files for Clipper.'
  105.   @ 11,10 SAY 'Please be patient for a few moments'
  106.   @ 12,00 SAY '   '
  107.   SELE A
  108.   USE &dr.:build
  109.   INDE ON bcode TO &dr.:code
  110.   SELE B
  111.   USE &dr.:tenant
  112.   INDE on bcode to &dr.:codea
  113.   SELE C
  114.   USE &dr.:account
  115.   INDE ON SUBSTR(data,7,4) +date + SUBSTR(data,5,2) TO &dr.:account
  116.   SELE D
  117.   USE &dr.:CHART
  118.   INDE on acctno TO &dr.:chart
  119.  ENDI
  120. ELSE
  121.  IF .NOT. file ("CODE.NDX")
  122.   CLEA
  123.   @ 10,10 SAY 'I must create index files for dBase.'
  124.   @ 11,10 SAY 'I will keep you posted'
  125.   @ 12,00 SAY '   '
  126.   SET ECHO ON
  127.   SET TALK ON
  128.   SELE A
  129.   USE &dr.:build
  130.   INDE ON bcode TO &dr.:code
  131.   SELE B
  132.   USE &dr.:tenant
  133.   INDE on bcode to &dr.:codea
  134.   SELE C
  135.   USE &dr.:account
  136.   INDE ON SUBSTR(data,7,4) +date + SUBSTR(data,5,2) TO &dr.:account
  137.   SELE D
  138.   USE &dr.:CHART
  139.   INDE on acctno TO &dr.:chart
  140.   SET TALK OFF
  141.   SET ECHO OFF
  142.  ENDI
  143. ENDI clipper
  144. SET PROC TO proc
  145. CLEA
  146. IF clipper
  147.  @ 1,0, 16, 79 BOX frame
  148.  @ 3,3, 14, 74 BOX frame
  149. ELSE
  150.  @ 01,0 TO 16,79 double
  151.  @ 03,3 TO 14,74 double
  152. ENDI clipper
  153. @ 05,19 SAY 'AMATEUR COMPUTER GROUP OF NEW JERSEY'
  154. @ 7,18 SAY 'SIG/M  P R O P E R T Y  M A N A G E R'
  155. @ 9,20 SAY 'A dBASEIII DATA MANAGEMENT PROGRAM'
  156. @ 10,25 SAY 'FOR TENANTED REAL ESTATE'
  157. @ 11,35 SAY 'by Stephen M. Leon'
  158. @ 13,40 SAY 'Vers 2.0  June 1986 (C) 1984,5,6'
  159. STOR 'Y' TO goahead
  160. @ 18,07 SAY "ARE YOU AGREEABLE TO THE TERMS OF THE COPYRIGHT LICENSING AGREEMENT"
  161. @ 19,07 SAY "AS SET FORTH IN THE FILE 'MANAGE.PRG' ? "
  162. @ 19,65 GET goahead PICTURE '!'
  163. READ
  164. DO WHIL AT(goahead, 'YN') = 0
  165.  @ 19,65 GET goahead PICTURE '!'
  166.  READ
  167. ENDD WHILE goahead
  168. IF goahead = 'N'
  169.  QUIT
  170. ENDI
  171. * set up initial database file
  172. SELE A
  173. USE &dr.:build
  174. SET INDEX TO &dr.:code
  175. * set up forever loop for program
  176. DO WHIL .t.
  177.  STOR '?' TO comman
  178.  CLEA
  179.  IF clipper
  180.   @ 0,0, 22, 79 BOX frame
  181.   @ 4,1 SAY line1
  182.   @ 19,1 SAY line1
  183.  ELSE
  184.   @ 0,0 TO 4,79
  185.   @ 0,0 TO 19,79
  186.   @ 0,0 TO 22,79 DOUBLE
  187.  ENDI
  188.  @ 20,5 SAY 'Please select one of the above options. You may also leave this menu'
  189.  @ 21,5 SAY "by typing 'Q' and get on-line HELP by typing '?'."
  190.  @ 2,06 SAY DCONAME + '  -  MAIN MENU'
  191.  @ 2,65 SAY DTOC(date())
  192.  @ 7,26 SAY "A.  Accounting Database"
  193.  @ 8,26 SAY "B.  Building Database"
  194.  @ 9,26 SAY "C.  Tenant Database"
  195.  @ 10,26 SAY "D.  Database Maintenance"
  196.  @ 11,26 SAY "E.  Help"
  197.  @ 12,26 SAY "F.  Reports"
  198.  @ 13,26 SAY "G.  Quit to dBASE"
  199.  @ 14,26 SAY "H.  Exit to operating system"
  200.  @ 17,23 SAY "PLEASE SELECT ONE OF THE OPTIONS"
  201.  @ 17,58 GET comman PICTURE '!'
  202.  READ
  203.  DO WHIL AT(COMMAN, 'ABCDEFGH?Q') = 0
  204.   STOR '?' TO comman
  205.   @ 17,58 GET comman PICTURE '!'
  206.   READ
  207.  ENDD
  208.  DO CASE
  209.  CASE COMMAN = 'A'
  210.   SELE C
  211.   USE &dr.:account
  212.   DO account
  213.  CASE COMMAN = 'B'
  214.   SELE A
  215.   USE &dr.:build INDEX &dr.:code
  216.   DO build
  217.  CASE COMMAN = 'C'
  218.   SELE B
  219.   USE &dr.:tenant INDEX &dr.:codea
  220.   DO tenant
  221.  CASE COMMAN = 'D'
  222.   DO maintain
  223.  CASE COMMAN = 'F'
  224.   DO report
  225.  CASE COMMAN = 'E' .OR. COMMAN = '?'
  226.   CLEA
  227.   TEXT
  228.  
  229.                M A I N   M E N U   H E L P   F I L E
  230.  
  231. We have tried to make this program as  simple and as straight forward as is
  232. possible. There is no separate documentation - but at any point in the pro-
  233. gram where a '?' prompt appears we have built in a help menu to explain the
  234. various options.  You also may want to print out the opening program module
  235. (a file called 'MANAGE.PRG')                                                
  236.  
  237.  
  238. Remember - HELP is available at any point where there is a question mark.
  239. Just hit ENTER (or '?') and program information will be displayed on screen.
  240. In addition, you can leave any menu by typing 'Q'.
  241.  
  242. There are three main data bases.  BUILDING - which has the basic information 
  243. about each property. TENANT - which has data on each tenant in each building
  244. and ACCOUNTING.
  245.  
  246.                    Please hit any key to continue
  247.  
  248.   ENDT
  249.   SET CONSOLE OFF
  250.   WAIT
  251.   SET CONSOLE ON
  252.   CLEA
  253.   TEXT
  254.  
  255. The BUILDING and TENANT databases contain information.  Who lives where, how
  256. much they pay, did they pay, when is the rent due or the lease up.
  257.  
  258. The ACCOUNTING data base allows you to make journal entries and input cash  
  259. receipts and cash disbursements. From the report menu in the accounting data
  260. base you can print out the Cash Receipts Book, the Cash Disbursements Book,
  261. the General Journal and the General Ledger.  To expedite entry of the items
  262. into the file, we require that you run an update program to post the entries
  263. to the ledgers.
  264.  
  265. The ACCOUNTING data base also allows you to prepare and print a balance sheet
  266. and profit and loss statement (as well as a cash generated from operatings
  267. statement.) Each time you request a statement the data is saved in a file so
  268. that you can always reprint the statement of the date in question.
  269.  
  270.  
  271.                            Please hit any key to continue
  272.  
  273.                            
  274.  
  275.   ENDT
  276.   SET CONSOLE OFF
  277.   WAIT
  278.   SET CONSOLE ON
  279.   CLEA
  280.   TEXT
  281.  
  282. Reports other than accounting reports are handled through the menu you are now
  283. at. This report function allows you to send out rent bills (but you have to be
  284. sure you first posted the new month from the ACCOUNTING data base). It also
  285. prints out a delinquency report, a vacancy report, a lease expiration report 
  286. and address labels for the tenants.
  287.  
  288. The Maintenance function on this menu allows you to Reindex the BUILDING and
  289. TENANT data bases. (A power surge, an improper shutdown, etc. can mess up your
  290. index - so you may have to reindex. You also can add records without indexing-
  291. but must later use the index function.) If you delete a building and its units
  292. you have to run the Purge function on the Maintenance menu. (When you 'delete'
  293. a file - you do not remove it from the records until you Purge. It merely has
  294. a sign 'Deleted' on the upper left hand portion of the screen. If for some 
  295. reason you decide to Edit a deleted file - we assume you want it back and the
  296. program automatically 'undeletes' it.
  297.  
  298. A very powerful function tool - Browse - is on the Maintenance menu. It allows
  299. you to write directly to any file. Display lets you view the records - but not
  300. change them. The rest is obvious, so enjoy the program.
  301.  
  302.                   Press any key to return to the menu
  303.   ENDT
  304.   SET CONSOLE OFF
  305.   WAIT
  306.   SET CONSOLE ON
  307.   CLEA
  308.   TEXT
  309.  
  310.  
  311.      We have tried to document this program as best we could in the
  312.      various HELP menus.  We also have tries to give as much guidance
  313.      as possible in the source code, so that you could make your own
  314.      changes or fix any problems as they developed. The big problem
  315.      was space, so we did have to limit source code comments.
  316.  
  317.      We know that there are bound to be problems.  We have therefore 
  318.      done what most programs of this type do not do - we have left the
  319.      ESCape key on most of the time to give you an out.  If you have 
  320.      a problem, hit ESCape and type quit.  Even if the console is 
  321.      turned off at that time, you will not see the words being typed,
  322.      but it will return to the operating system (assuming you have
  323.      not somehow locked up the machine - in which event you will have 
  324.      to reboot). (Most programs of this type are also not free.)
  325.  
  326.      You may want to take out the ESCape sequence. It is part of the
  327.      program initialization. It can always be changed from either of
  328.      the maintenance menus.
  329.  
  330.                             Hit any key to return to the program
  331.   ENDT
  332.   SET CONSOLE OFF
  333.   WAIT
  334.   SET CONSOLE ON
  335.   STOR .f. TO moveit
  336.   STOR .t. TO first
  337.  CASE COMMAN = 'G'
  338.   CLEA ALL
  339.   RELE ALL
  340.   CANC
  341.  CASE COMMAN = 'H' .OR. COMMAN = 'Q'
  342.   CLEA
  343.   SET CONSOLE OFF
  344.   QUIT
  345.  ENDC
  346. ENDD while .t.
  347. 
  348.