home *** CD-ROM | disk | FTP | other *** search
/ Share Gallery 1 / share_gal_1.zip / share_gal_1 / DB / DB012B.ZIP / VPI1MANL.ZIP / CHARITY.ZIP / POST.PRG < prev    next >
Text File  |  1991-12-29  |  2KB  |  60 lines

  1. ***************************************************************************
  2. **  POST.PRG
  3. **  (C) Copyright 1990, Sub Rosa Publishing Inc.
  4. **  A demonstration program provided to VP-Info users.
  5. **  This program may be copied freely. If it is used in commercial code,
  6. **  please credit the source, Sub Rosa Publishing Inc.
  7. **
  8. **  POST zeros out accumulator fields in DONOR and SOLICIT data files,
  9. **  and then adds donations and pledges to the appropriate fields.
  10. **
  11. **  POST is compatible with all current versions of VP-Info.
  12. **
  13. **  Sid Bursten and Bernie Melman
  14. **  May 9,1990
  15. ***************************************************************************
  16. ON escape                  ;this code is executed when <Esc> is pressed
  17.    WINDOW
  18.    CANCEL
  19. ENDON
  20. WINDOW 1,2,23,77 double
  21. SET talk on
  22. SET add on              ;if any donors or solicitors not in file, add them
  23. SELECT 1
  24. USE solicit
  25. REPLACE all paid with 0,pledge with 0 ;initialize fields to post to
  26. SET index to sol_code,sol_name        ;both indexes needed if records added
  27. POST on solicitor from donor fields pledge
  28. SELECT 2
  29. USE donor
  30. REPLACE all paid with 0               ;initialize a field in donors
  31. SET index to don_code,don_name        ;both indexes needed if records added
  32. SELECT 1
  33. *  use FOR clause only when required, and as simple as possible
  34. DO CASE
  35. CASE finish<'999999' .and. start>' '
  36.    POST on solicitor from donate fields paid with amount for date>=start .and. date<=finish
  37.    POST#2 on donor from donate fields paid with amount for date>=start .and. date<=finish
  38. CASE finish<'999999'
  39.    POST on solicitor from donate fields paid with amount for date<=finish
  40.    POST#2 on donor from donate fields paid with amount for date<=finish
  41. CASE start>' '
  42.    POST on solicitor from donate fields paid with amount for date>=start
  43.    POST#2 on donor from donate fields paid with amount for date>=start
  44. OTHERWISE
  45.    POST on solicitor from donate fields paid with amount
  46.    POST#2 on donor from donate fields paid with amount
  47. ENDCASE
  48. SET deleted on
  49. SET add off
  50. SET talk off
  51. ? '           Posting completed...press any key to print reports.'
  52. ?
  53. ok=inkey()              ;wait for a keystroke
  54. REPORT#2 donor
  55. REPORT solicit
  56. CLOSE all               ;close files and turn special settings off
  57. RETURN
  58. *
  59. *                     *** end of program POST.prg ***
  60.