home *** CD-ROM | disk | FTP | other *** search
- *******************************************************************************
- * STUD5-7.PRG This program is run AFTER statements are printed. *
- * It posts the "Cur(rent)Billing" by multiplying "lessons" times "rate", *
- * and then calculates and enters "Balance" (due) into the Student record. *
- * *
- * To make room for this current information, it moves all prior chgs/credits *
- * back one month into the record, so that an Ageing Report is possible. *
- * As a final tip-of-the-hat, it clears the Payments.DBF file so that it can *
- * accept posting of checks to come in as the new month progresses. *
- *******************************************************************************
- SET Talk OFF
- ERASE
- *
- SET Intensity OFF
- SET Color TO 137
- @ 3,3 SAY "** WARNING ***** WARNING ***** WARNING ***** WARNING *****;
- WARNING **"
- SET Color to 112,7
- SET Intensity ON
- @ 6,7 SAY "YOU ARE ENTERING A PROGRAM THAT WILL POST PAYMENTS, BILLINGS,;
- ETC."
- @ 8,7 SAY "IF YOU CONTINUE, CURRENT DATA WILL BE REARRANGED AND THE ;
- PAYMENTS"
- @ 9,7 SAY "JOURNAL WILL BE ERASED."
- @ 12,5 SAY "Be sure the"
- SET Intensity OFF
- SET Color TO 11
- @ 12,17 SAY "Monthly Activity Summary"
- SET Color to 112,7
- @ 12,42 SAY "has been run"
- SET Color TO 137
- @ 12,55 SAY "BEFORE"
- SET Color to 112,7
- SET Intensity ON
- @ 12,62 SAY "continuing."
- *
- STORE " " to Enable
- @ 16,10 say 'Enter "Go for it!" to continue; anything else to ABORT'
- @ 19,38 GET Enable
- READ NOUPDATE
- ERASE
- *
- IF Enable="Go for it!"
- @ 6,16 SAY "I've a hunch this will take about 10 minutes."
- @ 8,9 SAY "Watch me if you like, but really ... I can do it all by myself."
- *
- USE Student
- DO WHILE .NOT. EOF
- REPLACE ALL History WITH History+M6Chg-M6Pay,M6Pay WITH M5Pay,;
- M5Pay WITH M4Pay, M4Pay WITH M3Pay, M3Pay WITH M2Pay, M2Pay with M1Pay
- REPLACE ALL M6Chg WITH M5Chg,M5Chg WITH M4Chg,M4Chg WITH M3Chg,;
- M3Chg WITH M2Chg, M2Chg with M1Chg, M1Chg WITH 0, M1Pay WITH 0
- REPLACE ALL M1Chg with Lessons*Rate
- REPLACE ALL M1Pay with Curpayment
- REPLACE ALL Dateofbill with Cdate
- REPLACE ALL Curpayment WITH 0
- REPLACE ALL Balance WITH Balance-M1Pay+M1Chg
- USE
- ENDDO
- *
- USE Payments
- COPY Structure TO Tempay
- USE
- DELETE File Payments.dbf
- DELETE File Pid.ndx
- DELETE File Plname.ndx
- RENAME Tempay to Payments.dbf
- USE Payments
- *
- ERASE
- RELEASE Enable
- SET Talk ON
- RETURN
- * EOF
- *
- USE Student
- DO WHILE .NOT. EOF
- REPLACE ALL History WITH Histo