home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / lambda / soundpot / a / dbc.lbr / CODEDIT.CZD / CODEDIT.CMD
Encoding:
Text File  |  1993-10-26  |  5.5 KB  |  199 lines

  1.  
  2. * notice..: copyright 1985, all rights reserved
  3. ***************************************************************
  4. ** PROGRAM: CK85.XXX                                         **
  5. ** PURPOSE: CHECK TRACKING OR ACCOUNTS PAYABLE               **
  6. ** FEATURES: ALLOWS MANAGEMENT BY USE OF ACCOUNTING CODES    **
  7. ** AUTHOR:  DON SABA - SAN DIEGO, CA - SABALINE SYSOP        **
  8. ** HELP:  CALL SABALINE (619)692-1961                        **
  9. ***************************************************************
  10. SET talk OFF
  11. USE codes
  12. GO BOTTOM
  13. STORE # TO mrecos
  14. STORE t TO start
  15. STORE 0 TO delcount
  16. DO WHILE start
  17.  IF delcount > 0
  18.   SET deleted ON
  19.  ENDIF delcount > 0 
  20.  ERASE
  21.  STORE 1 TO x
  22.  @ x,02 SAY "<<<  C O D E S    A D D  **  E D I T  **   D E L E T E " +;
  23.  " M O D U L E   >>>" 
  24.  STORE '   ' TO mmalc
  25.  STORE x+2 TO x
  26.  USE codes INDEX codes
  27.  GO TOP
  28.  DO WHILE .not. eof
  29.   @ x,0 SAY malc + " " + expense
  30.   SKIP 
  31.   @ x,20 SAY malc + " " + expense
  32.   SKIP
  33.   @ x,40 SAY malc + " " + expense
  34.   SKIP
  35.   @ x,60 SAY malc + " " + expense
  36.   SKIP
  37.   STORE x+1 TO x
  38.  ENDDO WHILE .not. eof 
  39.  STORE t TO CONTINUE
  40.  DO WHILE CONTINUE 
  41.   *store x+1 to x
  42.   @ x,00 SAY "--------------------------------------------------------" +;
  43.   "-----------------------" 
  44.   STORE '               ' TO mexpense
  45.   STORE ' ' TO maction
  46.   STORE t TO entering
  47.   STORE x+1 TO x
  48.   @ x,0 SAY 'CODE    E X P E N S E   ACTION Y)ES N)O' +;
  49.   ' D)ELETE Q)UIT' 
  50.   DO WHILE entering
  51.    STORE x+1 TO x
  52.    @ x,0 GET mmalc PICTURE '!99' 
  53.    @ x+2,0 SAY "R]eformat Screen  Q]uit or 3 Digit Code  <CR>" 
  54.    COUNT TO mrecos
  55.    @ x+2,65 SAY "Records " + str(mrecos,2,0)
  56.    READ
  57.    @ x+2,0 
  58.    IF $(mmalc,1,1)= 'R' 
  59.     STORE f TO entering
  60.     STORE f TO CONTINUE
  61.    ELSE
  62.     IF $(mmalc,1,1)= 'Q' 
  63.      STORE f TO entering
  64.      STORE f TO CONTINUE
  65.      STORE f TO start
  66.     ELSE
  67.      IF mmalc = ' ' 
  68.       STORE f TO entering
  69.       STORE f TO CONTINUE
  70.       STORE f TO start
  71.      ELSE
  72.       GO TOP
  73.       FIND &mmalc
  74.       IF # <> 0
  75.        STORE 'EDIT' TO mode
  76.        @ x-1,0 
  77.        @ x-1,0 SAY 'CODE    E X P E N S E   ACTI' +;
  78.        'ON &MODE Y)ES N)O D)ELETE Q)UIT' 
  79.        STORE expense TO mexpense
  80.       ENDIF # <> 0 
  81.       IF # = 0
  82.        STORE 'ADD' TO mode
  83.        @ x-1,0 
  84.        @ x-1,0 SAY 'CODE    E X P E N S E   ACTI' +;
  85.        'ON &MODE Y)ES N)O D)ELETE Q)UIT' 
  86.       ENDIF # = 0 
  87.       @ x,04 GET mexpense PICTURE '!!!!!!!!!!!!!!!' 
  88.       @ x,35 GET maction PICTURE '!' 
  89.       READ
  90.       IF maction = ' ' .OR. mexpense = ' ' .OR. mmalc = ' ' 
  91.        @ x,0
  92.        STORE '   ' TO mmalc
  93.        STORE '               ' TO mexpense
  94.        STORE x-1 TO x
  95.        LOOP
  96.       ENDIF 
  97.       IF maction = 'N' 
  98.        @ x,0
  99.        STORE '   ' TO mmalc
  100.        STORE '               ' TO mexpense
  101.        STORE x-1 TO x
  102.        LOOP
  103.       ENDIF maction = 'N' 
  104.       IF maction = 'Y' .AND. mode= 'ADD' 
  105.        @ x,0
  106.        @ x,0 SAY 'ADDING RECORD FOR &MEXPENSE TO CODES.DBF' 
  107.        GO BOTTOM
  108.        APPEND BLANK
  109.        REPLACE malc WITH mmalc
  110.        REPLACE expense WITH mexpense
  111.        STORE '   ' TO mmalc
  112.        STORE '               ' TO mexpense
  113.        @ x,0
  114.        @ x-1,0 
  115.        @ x-1,0 SAY 'CODE    E X P E N S E   ACTI' +;
  116.        'ON &MODE Y)ES N)O D)ELETE Q)UIT' 
  117.        STORE x-1 TO x
  118.        COUNT TO mrecos
  119.       ENDIF maction = 'Y' 
  120.       IF maction = 'Y' .AND. mode= 'EDIT' 
  121.        @ x,0
  122.        @ x,0 SAY 'EDITING RECORD FOR &MEXPENSE TO CODES.DBF' 
  123.        REPLACE malc WITH mmalc
  124.        REPLACE expense WITH mexpense
  125.        STORE '   ' TO mmalc
  126.        STORE '               ' TO mexpense
  127.        @ x,0
  128.        @ x-1,0 
  129.        @ x-1,0 SAY 'CODE    E X P E N S E   ACTI' +;
  130.        'ON  &MODE Y)ES N)O D)ELETE Q)UIT' 
  131.        STORE x-1 TO x 
  132.       ENDIF maction = 'Y' 
  133.       IF maction = 'D' .AND. mode= 'EDIT' 
  134.        STORE 'DELETE' TO mode
  135.        IF *
  136.         STORE 0 TO timer
  137.         DO WHILE timer < 10
  138.          @ x,0 SAY '&MMALC DELETED &MEXPENSE WILL BE REMOVED AFTER QUIT' 
  139.          STORE timer +1 TO timer
  140.          @ x,0
  141.          LOOP
  142.         ENDDO WHILE timer < 10 
  143.        ENDIF * 
  144.        @ x,0
  145.        @ x,0 SAY 'DELETING RECORD FOR &MEXPENSE TO CODES.DBF' 
  146.        DELETE
  147.        STORE delcount + 1 TO delcount 
  148.        STORE '   ' TO mmalc
  149.        STORE '               ' TO mexpense
  150.        @ x,0
  151.        @ x-1,0 
  152.        @ x-1,0 SAY 'CODE    E X P E N S E   ACTI' +;
  153.        'ON  &MODE Y)ES N)O D)ELETE Q)UIT' 
  154.        STORE x-1 TO x 
  155.       ENDIF maction = 'Y' 
  156.       IF maction = 'Q' 
  157.        STORE f TO entering
  158.        STORE f TO CONTINUE
  159.        STORE f TO start
  160.       ENDIF maction = 'Q' 
  161.      ENDIF mmalc = ' ' 
  162.     ENDIF $(mmalc,1,1)= 'Q' 
  163.    ENDIF $(mmalc,1,1)= 'R' 
  164.   ENDDO WHILE entering 
  165.  ENDDO WHILE CONTINUE
  166. ENDDO WHILE start 
  167. IF delcount > 0
  168.  USE codes INDEX codes
  169.  ERASE
  170.  @ 10,0 SAY "Packing to PURGE DELETED Codes " 
  171.  PACK
  172.  @ 10,0
  173.  @ 10,0 SAY "Re-INDEXING Codes" 
  174. ENDIF delcount > 0 
  175. USE
  176. @ 10,0
  177. RETURN
  178. ***************************************************************
  179. ***************************************************************
  180. ***************************************************************
  181.  
  182.     ENDIF $(mmalc,1,1)= 'Q' 
  183.    ENDIF $(mmalc,1,1)= 'R' 
  184.   ENDDO WHILE entering 
  185.  ENDDO WHILE CONTINUE
  186. ENDDO WHILE start 
  187. IF delcount > 0
  188.  USE codes INDEX codes
  189.  ERASE
  190.  @ 10,0 SAY "Packing to PURGE DELETED Codes " 
  191.  PACK
  192.  @ 10,0
  193.  @ 10,0 SAY "Re-INDEXING Codes" 
  194. ENDIF delcount > 0 
  195. USE
  196. @ 10,0
  197. RETURN
  198. ***************************************************************
  199.