home *** CD-ROM | disk | FTP | other *** search
- ***************************************************************************
- ** POST.PRG
- ** (C) Copyright 1990, Sub Rosa Publishing Inc.
- ** A demonstration program provided to VP-Info users.
- ** This program may be copied freely. If it is used in commercial code,
- ** please credit the source, Sub Rosa Publishing Inc.
- **
- ** POST zeros out accumulator fields in DONOR and SOLICIT data files,
- ** and then adds donations and pledges to the appropriate fields.
- **
- ** POST is compatible with all current versions of VP-Info.
- **
- ** Sid Bursten and Bernie Melman
- ** May 9,1990
- ***************************************************************************
- ON escape ;this code is executed when <Esc> is pressed
- WINDOW
- CANCEL
- ENDON
- WINDOW 1,2,23,77 double
- SET talk on
- SET add on ;if any donors or solicitors not in file, add them
- SELECT 1
- USE solicit
- REPLACE all paid with 0,pledge with 0 ;initialize fields to post to
- SET index to sol_code,sol_name ;both indexes needed if records added
- POST on solicitor from donor fields pledge
- SELECT 2
- USE donor
- REPLACE all paid with 0 ;initialize a field in donors
- SET index to don_code,don_name ;both indexes needed if records added
- SELECT 1
- * use FOR clause only when required, and as simple as possible
- DO CASE
- CASE finish<'999999' .and. start>' '
- POST on solicitor from donate fields paid with amount for date>=start .and. date<=finish
- POST#2 on donor from donate fields paid with amount for date>=start .and. date<=finish
- CASE finish<'999999'
- POST on solicitor from donate fields paid with amount for date<=finish
- POST#2 on donor from donate fields paid with amount for date<=finish
- CASE start>' '
- POST on solicitor from donate fields paid with amount for date>=start
- POST#2 on donor from donate fields paid with amount for date>=start
- OTHERWISE
- POST on solicitor from donate fields paid with amount
- POST#2 on donor from donate fields paid with amount
- ENDCASE
- SET deleted on
- SET add off
- SET talk off
- ? ' Posting completed...press any key to print reports.'
- ?
- ok=inkey() ;wait for a keystroke
- REPORT#2 donor
- REPORT solicit
- CLOSE all ;close files and turn special settings off
- RETURN
- *
- * *** end of program POST.prg ***
-