home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / manage.zip / CHECKS.PRG < prev    next >
Text File  |  1987-08-16  |  8KB  |  293 lines

  1. **    Last revision: April 6, 1986 at 15:54
  2. * check entry screen
  3. CLEA
  4. SET INTENSITY ON
  5. SET DELIMITER OFF
  6. STOR '                    ' TO blnks
  7. STOR SUBSTR(blnks,1,2) TO mprop
  8. STOR SUBSTR(blnks,1,4) TO mbank
  9. STOR SUBSTR(blnks,1,8) TO mdate1
  10. STOR .t. TO more
  11. STOR .t. TO first
  12. STOR "When done, leave first amount and check no. blank and enter Control 'Q' or 'W'" TO prompt
  13. DO WHIL more
  14.  STOR SUBSTR(blnks,1,4) TO mchk1
  15.  STOR SUBSTR(blnks,1,20) TO mpay1
  16.  STOR SUBSTR(blnks,1,20) TO mpay1a
  17.  STOR SUBSTR(blnks,1,4) TO macc1
  18.  STOR 0.00 TO mamt1
  19.  STOR SUBSTR(blnks,1,4) TO mchk2
  20.  STOR SUBSTR(blnks,1,20) TO mpay2
  21.  STOR SUBSTR(blnks,1,20) TO mpay2a
  22.  STOR SUBSTR(blnks,1,4) TO macc2
  23.  STOR 0.00 TO mamt2
  24.  STOR SUBSTR(blnks,1,4) TO mchk3
  25.  STOR SUBSTR(blnks,1,20) TO mpay3
  26.  STOR SUBSTR(blnks,1,20) TO mpay3a
  27.  STOR SUBSTR(blnks,1,4) TO macc3
  28.  STOR 0.00 TO mamt3
  29.  STOR SUBSTR(blnks,1,4) TO mchk4
  30.  STOR SUBSTR(blnks,1,20) TO mpay4
  31.  STOR SUBSTR(blnks,1,20) TO mpay4a
  32.  STOR SUBSTR(blnks,1,4) TO macc4
  33.  STOR 0.00 TO mamt4
  34.  STOR SUBSTR(blnks,1,4) TO mchk5
  35.  STOR SUBSTR(blnks,1,20) TO mpay5
  36.  STOR SUBSTR(blnks,1,20) TO mpay5a
  37.  STOR SUBSTR(blnks,1,4) TO macc5
  38.  STOR 0.00 TO mamt5
  39.  STOR 'N' TO verify
  40.  IF first
  41.   @ 1,12 SAY "Cash Disbursements Entry Screen  - Posted"
  42.   @ 1,55 SAY DTOC(date())
  43.   @ 3, 4 SAY "Property:"
  44.   @ 3,37 SAY "Date:"
  45.   @ 4, 0 SAY "Bank Acct No:"
  46.   @ 6, 0 SAY "Check Number:"
  47.   @ 6,36 SAY "Payee:"
  48.   @ 7, 1 SAY "Description:"
  49.   @ 7,35 SAY "Acct #:"
  50.   @ 7,50 SAY "Amount:"
  51.   @ 9, 0 SAY "Check Number:"
  52.   @ 9,36 SAY "Payee:"
  53.   @ 10, 1 SAY "Description:"
  54.   @ 10,35 SAY "Acct #:"
  55.   @ 10,50 SAY "Amount:"
  56.   @ 12, 0 SAY "Check Number:"
  57.   @ 12,36 SAY "Payee:"
  58.   @ 13, 1 SAY "description:"
  59.   @ 13,35 SAY "Acct #:"
  60.   @ 13,50 SAY "Amount:"
  61.   @ 15, 0 SAY "Check Number:"
  62.   @ 15,36 SAY "Payee:"
  63.   @ 16, 1 SAY "Description:"
  64.   @ 16,35 SAY "Acct #:"
  65.   @ 16,50 SAY "Amount:"
  66.   @ 18, 0 SAY "Check Number:"
  67.   @ 18,36 SAY "Payee:"
  68.   @ 19, 1 SAY "Description:"
  69.   @ 19,35 SAY "Acct #:"
  70.   @ 19,50 SAY "Amount:"
  71.   @ 22,00 SAY prompt
  72.  ENDI first
  73.  STOR .f. TO first
  74.  @ 3,14 GET mprop PICTURE '99'
  75.  @ 3,44 GET mdate1 PICTURE '99/99/99'
  76.  @ 4,14 GET mbank PICTURE '9999'
  77.  @ 6,14 GET mchk1 PICTURE '9999'
  78.  @ 6,43 GET mpay1
  79.  @ 7,14 GET mpay1a
  80.  @ 7,43 GET macc1 PICTURE '9999'
  81.  @ 7,60 GET mamt1
  82.  @ 9,14 GET mchk2 PICTURE '9999'
  83.  @ 9,43 GET mpay2
  84.  @ 10,14 GET mpay2a
  85.  @ 10,43 GET macc2 PICTURE '9999'
  86.  @ 10,60 GET mamt2
  87.  @ 12,14 GET mchk3 PICTURE '9999'
  88.  @ 12,43 GET mpay3
  89.  @ 13,14 GET mpay3a
  90.  @ 13,43 GET macc3 PICTURE '9999'
  91.  @ 13,60 GET mamt3
  92.  @ 15,14 GET mchk4 PICTURE '9999'
  93.  @ 15,43 GET mpay4
  94.  @ 16,14 GET mpay4a
  95.  @ 16,43 GET macc4 PICTURE '9999'
  96.  @ 16,60 GET mamt4
  97.  @ 18,14 GET mchk5 PICTURE '9999'
  98.  @ 18,43 GET mpay5
  99.  @ 19,14 GET mpay5a
  100.  @ 19,43 GET macc5 PICTURE '9999'
  101.  @ 19,60 GET mamt5
  102.  @ 20,00
  103.  READ
  104.  CLEA GETS
  105.  @ 22,00
  106.  @ 22,20 SAY "DO YOU WANT TO MAKE ANY CHANGES ? [ ]"
  107.  @ 22,55 GET verify PICTURE '!'
  108.  READ
  109.  CLEA GETS
  110.  IF verify = 'Y'
  111.   STOR .f. TO first
  112.   @ 3,14 GET mprop PICTURE '99'
  113.   @ 3,44 GET mdate1 PICTURE '99/99/99'
  114.   @ 4,14 GET mbank PICTURE '9999'
  115.   @ 6,14 GET mchk1 PICTURE '9999'
  116.   @ 6,43 GET mpay1
  117.   @ 7,14 GET mpay1a
  118.   @ 7,43 GET macc1 PICTURE '9999'
  119.   @ 7,60 GET mamt1
  120.   @ 9,14 GET mchk2 PICTURE '9999'
  121.   @ 9,43 GET mpay2
  122.   @ 10,14 GET mpay2a
  123.   @ 10,43 GET macc2 PICTURE '9999'
  124.   @ 10,60 GET mamt2
  125.   @ 12,14 GET mchk3 PICTURE '9999'
  126.   @ 12,43 GET mpay3
  127.   @ 13,14 GET mpay3a
  128.   @ 13,43 GET macc3 PICTURE '9999'
  129.   @ 13,60 GET mamt3
  130.   @ 15,14 GET mchk4 PICTURE '9999'
  131.   @ 15,43 GET mpay4
  132.   @ 16,14 GET mpay4a
  133.   @ 16,43 GET macc4 PICTURE '9999'
  134.   @ 16,60 GET mamt4
  135.   @ 18,14 GET mchk5 PICTURE '9999'
  136.   @ 18,43 GET mpay5
  137.   @ 19,14 GET mpay5a
  138.   @ 19,43 GET macc5 PICTURE '9999'
  139.   @ 19,60 GET mamt5
  140.   @ 20,00
  141.   @ 21,00
  142.   @ 22,00
  143.   READ
  144.   CLEA GETS
  145.  ENDI verify
  146. * error checking routine
  147. * put in all of the other routines you may require
  148.  STOR .t. TO validate
  149.  DO WHIL VALIDATE
  150.   DO CASE
  151.   CASE mamt1 <> 0 .AND.(SUBSTR(mprop,2) = ' ')
  152.    STOR .t. TO error
  153.   CASE mamt1 <> 0 .AND.(mdate1 = ' ')
  154.    STOR .t. TO error
  155.   CASE mamt1 <> 0 .AND. (SUBSTR(mbank,4) = ' ')
  156.    STOR .t. TO error
  157.   CASE mamt1 <> 0 .AND.(SUBSTR(macc1,4) = ' ')
  158.    STOR .t. TO error
  159.   CASE mamt2 <> 0 .AND.(SUBSTR(macc2,4) = ' ')
  160.    STOR .t. TO error
  161.   CASE mamt3 <> 0 .AND.(SUBSTR(macc3,4) = ' ')
  162.    STOR .t. TO error
  163.   CASE mamt4 <> 0 .AND.(SUBSTR(macc4,4) = ' ')
  164.    STOR .t. TO error
  165.   CASE mamt5 <> 0 .AND.(SUBSTR(macc5,4) = ' ')
  166.    STOR .t. TO error
  167.   OTHE
  168.    STOR .f. TO validate
  169.    STOR .f. TO error
  170.   ENDC
  171.   IF error
  172.    @ 20,00
  173.    @ 21,00
  174.    @ 22,00
  175.    @ 21,14 SAY "PLEASE CORRECT THE INDICATED DATA"
  176. * keep looping till all fields are fixed
  177.    STOR .t. TO an_error
  178.    DO WHIL an_error
  179. * fix bad ones one at a time
  180.     DO CASE
  181.     CASE mamt1 <> 0 .AND.(SUBSTR(mprop,2) = ' ')
  182.      @ 22,00
  183.      @ 22,10 SAY "You must have a two number property account or '00'"
  184.      @ 3,14 GET mprop PICTURE '99'
  185.      READ
  186.     CASE mamt1 <> 0 .AND.(mdate1 = ' ')
  187.      @ 22,00
  188.      @ 22,10 SAY "You must have a transaction date"
  189.      @ 3,44 GET mdate1 PICTURE '99/99/99'
  190.      READ
  191.     CASE mamt1 <> 0 .AND.(SUBSTR(mbank,4) = ' ')
  192.      @ 22,00
  193.      @ 22,10 SAY "You must have a bank account"
  194.      @ 4,14 GET mbank PICTURE '9999'
  195.      READ
  196.     CASE mamt1 <> 0 .AND.  (SUBSTR(macc1,4) = ' ')
  197.      @ 22,00
  198.      @ 22,10 SAY "Account Number must be four numbers"
  199.      @ 7,43 GET macc1 PICTURE '9999'
  200.      READ
  201.     CASE mamt2 <> 0  .AND. (SUBSTR(macc2,4) = ' ')
  202.      @ 22,00
  203.      @ 22,10 SAY "Account Number must be four numbers "
  204.      @ 10,43 GET macc2 PICTURE '9999'
  205.      READ
  206.     CASE mamt3 <> 0 .AND. (SUBSTR(macc3,4) = ' ')
  207.      @ 22,00
  208.      @ 22,10 SAY "Account Number must be four numbers"
  209.      @ 13,43 GET macc3 PICTURE '9999'
  210.      READ
  211.     CASE mamt4 <> 0 .AND. (SUBSTR(macc4,4) = ' ')
  212.      @ 22,00
  213.      @ 22,10 SAY "Account Number must be four numbers "
  214.      @ 16,43 GET macc4 PICTURE '9999'
  215.      READ
  216.     CASE mamt5 <> 0 .AND.(SUBSTR(macc5,4) = ' ')
  217.      @ 22,00
  218.      @ 22,10 SAY "Account Number must be four numbers"
  219.      @ 19,43 GET macc5 PICTURE '9999'
  220.      READ
  221.     OTHE
  222.      @ 20,00
  223.      @ 21,00
  224.      @ 22,00
  225.      @ 22,00 SAY prompt
  226.      STOR .F. TO validate
  227.      STOR .f. TO an_error
  228.     ENDC
  229.    ENDD WHILE an:error
  230.   ENDI error
  231.  ENDD validate
  232.  * RELE error, an_error, validate
  233.  STOR SUBSTR(mdate1,7,2) + SUBSTR(mdate1,1,2) + SUBSTR(mdate1,4,2) TO mdate2
  234.  IF mamt1 > 0 .OR.(mamt1 = 0 .AND. mchk1 <> ' ')
  235.   APPE BLANK
  236.   REPL date WITH mdate2
  237.   REPL data WITH mchk1+mprop+macc1+'D'+mpay1+DTOC(date())+'D'
  238.   REPL amount WITH mamt1
  239.   APPE BLANK
  240.   REPL date WITH mdate2
  241.   REPL data WITH mchk1+mprop+mbank+'C'+mpay1a+DTOC(date())+'D'
  242.   REPL amount WITH (mamt1*-1)
  243.   IF mamt2 > 0
  244.    APPE BLANK
  245.    REPL date WITH mdate2
  246.    REPL data WITH mchk2+mprop+macc2+'D'+mpay2+DTOC(date())+'D'
  247.    REPL amount WITH mamt2
  248.    APPE BLANK
  249.    REPL date WITH mdate2
  250.    REPL data WITH mchk2+mprop+mbank+'C'+mpay2a+DTOC(date())+'D'
  251.    REPL amount WITH (mamt2*-1)
  252.   ENDI mamt2
  253.   IF mamt3 > 0
  254.    APPE BLANK
  255.    REPL date WITH mdate2
  256.    REPL data WITH mchk3+mprop+macc3+'D'+mpay3+DTOC(date())+'D'
  257.    REPL amount WITH mamt3
  258.    APPE BLANK
  259.    REPL date WITH mdate2
  260.    REPL data WITH mchk3+mprop+mbank+'C'+mpay3a+DTOC(date())+'D'
  261.    REPL amount WITH (mamt3*-1)
  262.   ENDI mamt3
  263.   IF mamt4 > 0
  264.    APPE BLANK
  265.    REPL date WITH mdate2
  266.    REPL data WITH mchk4+mprop+macc4+'D'+mpay4+DTOC(date())+'D'
  267.    REPL amount WITH mamt4
  268.    APPE BLANK
  269.    REPL date WITH mdate2
  270.    REPL data WITH mchk4+mprop+mbank+'C'+mpay4a+DTOC(date())+'D'
  271.    REPL amount WITH (mamt4*-1)
  272.   ENDI mamt4
  273.   IF mamt5 > 0
  274.    APPE BLANK
  275.    REPL date WITH mdate2
  276.    REPL data WITH mchk5+mprop+macc5+'D'+mpay5+DTOC(date())+'D'
  277.    REPL amount WITH mamt5
  278.    APPE BLANK
  279.    REPL date WITH mdate2
  280.    REPL data WITH mchk5+mprop+mbank+'C'+mpay5a+DTOC(date())+'D'
  281.    REPL amount WITH (mamt5*-1)
  282.   ENDI mamt5
  283.   STOR .t. TO more
  284.  ELSE
  285.   STOR .f. TO more
  286.  ENDI mamt1 > 0
  287.  STOR .t. TO first
  288. ENDD WHILE more
  289. SET INTENSITY OFF
  290. SET DELIMITER ON
  291. STOR .t. TO account
  292. STOR ' ' TO command
  293.