home *** CD-ROM | disk | FTP | other *** search
- *******************************************************************************
- * STATEONE.PRG This program allows you to print one statement *
- * at a time, instead of all the statements at once. *
- *******************************************************************************
- SET Talk OFF
- STORE T to Printout
- DO WHILE Printout
- ERASE
- STORE " " to Mname
- USE Student
- DO WHILE .NOT. EOF
- SET Intensity OFF
- SET Color TO 9
- @ 2,24 SAY "CENTER YOUR COMPANY'S NAME HERE"
- SET Color to 112,7
- SET Intensity ON
- @ 13,1 SAY "Enter the student's last name or account number";
- GET Mname
- @ 19,20 SAY "Press >RETURN< (only) to abort this operation."
- READ NOUPDATE
-
- IF Mname = " "
- STORE F to Printout
- RETURN
- ELSE
- IF VAL(Mname)>500
- SET Index TO ID
- STORE $(Mname,1,4) to Findstud
- ELSE
- SET Index TO Lname
- STORE TRIM(Mname) to Findstud
- ENDIF
- ENDIF
- FIND &Findstud
- *
- IF #=0
- STORE 0 to Counter
- DO WHILE Counter<15
- STORE Counter+1 to Counter
- @ 22,0 SAY Findstud+" is not in the record file"
- STORE " " to Mname
- ENDIF
- @ 22,0
- *
- IF #>0
- STORE # to Placemark
- *
- IF .NOT. Acct:num=Findstud .OR. .NOT. Lname=Findstud
- SKIP
- IF Lname=Findstud .AND..NOT.EOF
- ERASE
- @ 1,1 SAY "Mercy to Betsy! It would appear we have more than one ";
- +Findstud
- SKIP -1
- ?
- DISPLAY Fname,Lname WHILE Lname=Findstud
- ?
- INPUT "Enter the number from the left column, or enter (numerical);
- 0 to abort" to Placemark
- ENDIF
- ENDIF
-
- IF Placemark>0
- GO Placemark
- COPY Next 1 TO Tempfile
- USE Tempfile
- *
- SELECT Secondary
- USE Payments
- INDEX on dacct:num TO PID
- SET Index TO PID
- Find &Findstud
-
-
- IF #>0
- STORE " " to Post
- ERASE
- @ 7,3 SAY 'Are there any payments or credits in the "Payments" file that ;
- should be'
- @ 9,3 SAY "posted to the student's account before the statement is ;
- printed (Y/N)?"
- DO WHILE .NOT. Post$"YN"
- @ 12,40 GET Post PICTURE "!"
- READ NOUPDATE
- ENDDO
- *
- IF Post="Y"
- SUM Dcredits FOR Dacct:num=Placemark to Stucred
- SUM Damount FOR Dacct:num=Placemark to Stupay
- STORE Stucred+Stupay to Mcredit
- SELECT Primary
- REPLACE Curpayment WITH Mcredit
- ENDIF
- ELSE
- SELECT Primary
- ENDIF
- *
- ERASE
- STORE " " to Mmonth
- STORE " " to Mlessons
- @ 5,5 SAY "SPELL the name of the month in which current lessons occurred."
- @ 7,35 GET Mmonth PICTURE "!XXXXXXXX"
- @ 11,5 SAY 'How many CURRENT lessons are we billing for?'
- @ 13,40 GET Mlessons
- READ NOUPDATE
- REPLACE Month WITH Mmonth
- REPLACE Lessons WITH VAL(Mlessons)
- *
- DO Stateall
- CLEAR Gets
- ENDDO
- ENDDO
- DELETE FILE Tempfile
- RELEASE Findstud,Placemark,Mcredit,Mmonth,Stucred,Stupay,Mlessons,Printout,;
- Counter
- SET Talk ON
- RETURN
- * EOF
-
-
-
- READ NOUPDATE
- ENDDO
- *
- IF Post="Y"
- SUM Dcredits FOR Dacct:num=Placemark to Stucred
- SUM Damount FOR Dacct:num=Placemark to Stupay
- STORE Stucred+Stupay to Mcredit
- SELECT Primary
- REPLACE Curpayment WITH Mcredit
- ENDIF
- ELSE
- SELECT Primary
- ENDIF
- *
- ERASE
- S