home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / dbaseii / comm.lbr / COMM2-1.CZD / COMM2-1.CMD
Encoding:
Text File  |  1990-04-02  |  2.1 KB  |  81 lines

  1. * Program :  comm2-1.cmd
  2. * Author :  Paul V. Pullen
  3. * Date....:  February 20, 1989
  4. * Notes...:  This program allows the addition of records to the
  5. *            Donate DBF.
  6. *
  7. eras
  8. set talk off
  9. store t to contin21
  10. store ' ' to ans
  11. store 0.00 to ttl
  12. store 0 to count
  13. select primary
  14. use b:donate index b:denv
  15. select secondary
  16. use b:congre index b:cenv
  17. store date() to mdate
  18. @ 5,5 say 'Is this date correct ' get mdate
  19. clear gets
  20. @ 7,5 say 'Enter Y for YES, N for No'
  21. @ 8,16 get ans picture '!'
  22. read noupdate
  23. if ans = "N"
  24.     erase
  25.     @ 5,5 say 'Please input new date ' get mdate
  26.     read noupdate
  27.  endif
  28. erase
  29. * store mdate to string
  30. * store $(string,7,8) to day1
  31. * store $(string,1,5) to string
  32. * store $(string,1,2) to day2
  33. * store $(string,4,5) to day3
  34. * store day1+day2+day3 to ding
  35. * store val(ding) to dong
  36. * release string,day1,day2,day3,ding
  37. store '    ' to menv
  38. clear gets
  39. do while contin21
  40.   store '              ' to mcause
  41.   store 0.00 to mamt
  42.   erase
  43.   @ 5,5 say 'Input Envelope Number :' get menv
  44.   read
  45.  if menv = '    '
  46.    store 'F' to contin21
  47.    release contin21,ans, count, mdate,menv,mcause,mamt,dong
  48.    return
  49.  else
  50.     select secondary
  51.     find &menv
  52.       if # # 0
  53.         store s.donations to mtttl
  54.         else
  55.           store '    ' to menv
  56.           @ 3,5 say '* * * * Envelope Number does not exist * * * *'
  57.           @ 4,5 say '               Please Re-enter '
  58.           @ 5,5 say ' Input Envelop Number : ' get menv
  59.           read noupdate
  60.           loop
  61.        endif # # 0 number 1
  62.     endif val(menv)>0
  63.     @ 7,5 say 'Input Amount of Contribution :' get mamt
  64.     @ 9,5 say 'Input Donation Earmarked for :' get mcause
  65.     read
  66.     store mtttl + mamt to mtttl
  67.     replace s.donations with mtttl
  68.     store ttl + mamt to ttl
  69. *   replace s.last:atten with dong
  70.     if mcause ='             '
  71.       store 'Envelope ' to mcause
  72.     endif
  73.     select primary
  74.     appe blank
  75.     replace env:no with val(menv), amount with mamt, p.donation with ;
  76.            mcause, date with mdate
  77.     store '    ' to menv
  78.     erase
  79. enddo
  80. release contin21
  81. * EOF: comm2-1.cmd