home *** CD-ROM | disk | FTP | other *** search
- * Program : comm2-1.cmd
- * Author : Paul V. Pullen
- * Date....: February 20, 1989
- * Notes...: This program allows the addition of records to the
- * Donate DBF.
- *
- eras
- set talk off
- store t to contin21
- store ' ' to ans
- store 0.00 to ttl
- store 0 to count
- select primary
- use b:donate index b:denv
- select secondary
- use b:congre index b:cenv
- store date() to mdate
- @ 5,5 say 'Is this date correct ' get mdate
- clear gets
- @ 7,5 say 'Enter Y for YES, N for No'
- @ 8,16 get ans picture '!'
- read noupdate
- if ans = "N"
- erase
- @ 5,5 say 'Please input new date ' get mdate
- read noupdate
- endif
- erase
- * store mdate to string
- * store $(string,7,8) to day1
- * store $(string,1,5) to string
- * store $(string,1,2) to day2
- * store $(string,4,5) to day3
- * store day1+day2+day3 to ding
- * store val(ding) to dong
- * release string,day1,day2,day3,ding
- store ' ' to menv
- clear gets
- do while contin21
- store ' ' to mcause
- store 0.00 to mamt
- erase
- @ 5,5 say 'Input Envelope Number :' get menv
- read
- if menv = ' '
- store 'F' to contin21
- release contin21,ans, count, mdate,menv,mcause,mamt,dong
- return
- else
- select secondary
- find &menv
- if # # 0
- store s.donations to mtttl
- else
- store ' ' to menv
- @ 3,5 say '* * * * Envelope Number does not exist * * * *'
- @ 4,5 say ' Please Re-enter '
- @ 5,5 say ' Input Envelop Number : ' get menv
- read noupdate
- loop
- endif # # 0 number 1
- endif val(menv)>0
- @ 7,5 say 'Input Amount of Contribution :' get mamt
- @ 9,5 say 'Input Donation Earmarked for :' get mcause
- read
- store mtttl + mamt to mtttl
- replace s.donations with mtttl
- store ttl + mamt to ttl
- * replace s.last:atten with dong
- if mcause =' '
- store 'Envelope ' to mcause
- endif
- select primary
- appe blank
- replace env:no with val(menv), amount with mamt, p.donation with ;
- mcause, date with mdate
- store ' ' to menv
- erase
- enddo
- release contin21
- * EOF: comm2-1.cmd