home *** CD-ROM | disk | FTP | other *** search
- *******************************************************************************
- * This program generates a report of monthly "activity" on *
- * each student's account. ...Beginning balance, amount of current *
- * billing, payments received, and net balance due. STUD5-6.PRG *
- *******************************************************************************
- SET Talk OFF
- ERASE
- *
- STORE 0 to totalbal,totalpay,totalchg,totalcrt,page
- SET format TO Print
- SET Print ON
- SET Console OFF
- ? CHR(27) + CHR(66) + CHR(2)
- ? CHR(27)+Chr(77)+CHR(3)
- SET Console ON
- SET Print OFF
- SET Format to Screen
- @ 6,16 SAY "This will take 10 minutes or so. Take a break!"
- SET Format to Print
-
- USE Student
- SET Index TO Lname
- DO WHILE .NOT. EOF
- STORE Page+1 to Page
- STORE 'January February March April May June '+;
- 'July August SeptemberOctober November December ' to Date:str
- *
- STORE TRIM($(Date:str, VAL($(Cdate,1,2))*9-8,9))+" " +;
- $(Cdate,4,2)+", 19"+$(Cdate,7,2) TO Sdate
- *
- @ 2,4 SAY 'Page '+STR(Page,1)
- @ 2,71 SAY Sdate
- ENDIF
- STORE CHR(174) to A
- STORE CHR(173) to B
- STORE CHR(126) to C
- @ 4,29 SAY "CENTER YOUR COMPANY'S NAME HERE"
- @ 6,27 SAY 'Summary of Activity for Prior Month'
- @ 8,27 SAY "(Including This Month's NEW Billing)"
- @ 10,36 SAY A+B+A+B+A+B+A+B+A+B+A+B+A+B+A+B+A
- @ 12,15 SAY ' STARTING PAYMENTS CREDIT ;
- NEW NEW'
- @ 13,1 SAY 'ACCT NAME BALANCE RECEIVED;
- ISSUED BILLING BALANCE'
- @ 14,1 SAY C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C;
- +C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C;
- +C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C+C
- STORE 15 to Line
-
- DO WHILE Line<56 .AND. .NOT. EOF
- SELECT Secondary
- STORE P.Acct:Num to Mcustid
- USE Payments INDEX PID
- FIND &Mcustid
- SUM DCredits TO Custcrt FOR Dacct:num=Mcustid
- SUM DAmount TO Custpay FOR Dacct:num=Mcustid
- STORE P.Lessons*P.Rate TO Custchgs
- @ Line,1 SAY P.Acct:Num
- *
- IF Lname="Zz"
- @ Line,6 SAY "New Trier High School"
- ELSE
- @ Line,6 SAY P.Fname
- @ LINE,17 SAY P.Lname
- ENDIF
- *
- @ Line,35 SAY STR(P.Balance,8,2)
-
- IF Custpay<>0
- @ Line,48 SAY STR(custpay,8,2)
- ENDIF
-
- IF Custcrt<>0
- @ Line,60 SAY STR(Custcrt,8,2)
- ENDIF
-
- IF Custchgs<>0
- @ Line,71 SAY STR(custchgs,8,2)
- ENDIF
-
- IF P.Balance-Custpay-Custcrt+Custchgs = 0
- @ Line,89 SAY "---"
- ELSE
- @ Line,85 SAY STR(P.Balance-Custpay-Custcrt+Custchgs,8,2)
- ENDIF
- *
- STORE Line+1 to Line
- STORE totalbal+P.Balance to totalbal
- STORE totalpay+custpay to totalpay
- STORE totalchg+custchgs to totalchg
- STORE Totalcrt+Custcrt to Totalcrt
- Select Primary
- SKIP
- ENDDO
-
- IF EOF
- STORE Line+2 to Line
- @ Line,15 SAY 'TOTALS'
- @ Line,35 SAY STR(totalbal,9,2)
- @ Line,48 SAY STR(totalpay,9,2)
- @ Line,60 SAY STR(totalcrt,9,2)
- @ Line,71 SAY STR(totalchg,9,2)
- @ Line,85 SAY STR(totalbal-totalpay-totalcrt+totalchg,9,2)
- ENDIF
- EJECT
- ENDDO
- SET Format TO Screen
- Select Secondary
- USE
- Select Primary
- USE
- RETURN
- * EOF
-
- TR(totalbal,9,2)
- @ Line,48 SAY STR(totalpay,9,2)
- @ Line,60 SAY STR(totalcrt,9,2)
- @ Line,71 SAY STR(totalchg,9,2)
- @ Line,85 SAY STR(totalbal-totalpay-totalcrt+totalchg,9,2)
- ENDIF
- EJECT
- ENDDO
- SET Format TO Screen
- Select Se