PROCEDURE CmdWrite.click()
LOCAL lclScanner as character, limctr as integer
limctr = 0
IF this.Parent.text5.value = 1
SCAN NOOPTIMIZE FOR ALLTRIM(tsulat.special) = "S" AND ALLTRIM(this.Parent.CboGrdLvl.value) = ALLTRIM(tsulat.grade)
this.parent.text1.value = TRIM(tsulat.sname) + ", " + TRIM(tsulat.fname)
this.Parent.text2.value = TRIM(tsulat.mobile)
this.Parent.text4.value = TRIM(tsulat.idnum)
*Computations ----------------------------------------------
dyus = 0
paytuit = 0
buks = 0
devisor = 0
TRANSSF = 0
TRANSBA = 0
TRANSBO = 0
TRANSUN = 0
TRANSOT = 0
devide = SUBSTR(DTOC(DATE()),1,2)
IF devide = "09"
devisor = 9
ENDIF
IF devide = "10"
devisor = 8
ENDIF
IF devide = "11"
devisor = 7
ENDIF
IF devide = "12"
devisor = 6
ENDIF
IF devide = "01"
devisor = 5
ENDIF
IF devide = "02"
devisor = 4
ENDIF
IF devide = "03"
devisor = 3
ENDIF
IF devide = "04"
devisor = 2
ENDIF
IF devide = "05"
devisor = 1
ENDIF
IF devide = "06"
devisor = 1
ENDIF
IF devide = "07"
devisor = 1
ENDIF
IF devide = "08"
devisor = 1
ENDIF
SELECT trans
SCAN FOR ALLTRIM(this.Parent.text4.value) = trans.idnum
iden = trans.transcode
DO case
CASE iden = "SF"
TRANSSF = TRANSSF + TRANS.transamt
CASE IDEN = "BA"
TRANSBA = TRANSBA + TRANS.transamt
CASE IDEN = "BO"
TRANSBO = TRANSBO + TRANS.transamt
CASE IDEN = "UN"
TRANSUN = TRANSUN + TRANS.transamt
CASE IDEN = "OT"
TRANSOT = TRANSOT + TRANS.transamt
ENDCASE
ENDSCAN
SELECT tsulat
*Computations ----------------------------------------------
twesyon = ((tsulat.tuition - TRANSSF)/devisor)
hapbuks = ((tsulat.books - TRANSBO)/devisor)
hapback = ((tsulat.baccount - TRANSBA)/devisor)
hapuni = ((tsulat.uniform - TRANSUN)/devisor)
hapot = ((tsulat.others - TRANSOT)/devisor)
dyus = twesyon + hapbuks + hapback + hapuni + hapot
todyus = (tsulat.tuition + tsulat.baccount + tsulat.books + tsulat.uniform + tsulat.others) - (transsf + transba + transbo + transun + transot)
*Recording or Replacemnt ----------------------------------
REPLACE tsulat.pbaccnt WITH transba
REPLACE tsulat.ptuition WITH transsf
REPLACE tsulat.puniform WITH transun
REPLACE tsulat.pbooks WITH transbo
REPLACE tsulat.pothers WITH transot
IF ALLTRIM(this.Parent.CboGrdLvl.value) = "F"
this.Parent.text2.value = TRIM(tsulat.adviser)
ELSE
this.Parent.text2.value = TRIM(tsulat.mobile)
ENDIF
*Account Details ------------------------------------------
this.Parent.edit1.Value = this.parent.text1.value + CHR(13) + ;
"AccntDetails:" + CHR(13) +;
"BackAcct.: " + LTRIM(transform(tsulat.baccount,"###,###,###.##"))+ CHR(13) + ;
"SchoolFees: " + LTRIM(transform(tsulat.tuition,"###,###,###.##"))+ CHR(13)+ ;
"Books: " + LTRIM(transform(tsulat.books,"###,###,###.##")) + CHR(13) + ;
"Uniform: " + LTRIM(transform(tsulat.uniform,"###,###,###.##"))+ CHR(13)+;
"Others: " + LTRIM(transform(tsulat.others,"###,###,###.##")) + "."
*Payment Details: ---------------------------------
this.Parent.edit1.Value = "Payment Details:" + CHR(13) + ;
"BackAcct: " + LTRIM(transform(transba,"###,###,###.##"))+ CHR(13) + ;
"SchoolFees: " + LTRIM(transform(transsf,"###,###,###.##"))+ CHR(13)+;
"Books: " + LTRIM(transform(transbo,"###,###,###.##")) + CHR(13) + ;
"Uniform: " + LTRIM(transform(transun,"###,###,###.##"))+CHR(13)+ ;
"Others: " + LTRIM(transform(transot,"###,###,###.##")) + "."
*Amount Due: --------------------------------------
this.Parent.edit1.Value = "Amount due for " + cMONTH(DATE()) + ":" + CHR(13) + ;
"BackAcct: " + LTRIM(transform(hapback,"###,###,###.##")) + CHR(13) + ;
"SchoolFees: " + LTRIM(transform(twesyon,"###,###,###.##")) + CHR(13) + ;
"Books: " + LTRIM(TRANSFORM(hapbuks,"###,###,###.##")) + CHR(13) + ;
"Uniform: " + LTRIM(TRANSFORM(hapuni,"###,###,###.##")) + CHR(13) + ;
"Others: " + LTRIM(transform(hapot,"###,###,###.##")) + CHR(13) + ;
"Total: " + LTRIM(TRANSFORM(dyus,"###,###,###.##")) + CHR(13) + ;
"For reference only!"
limctr = limctr + 1
this.Parent.text3.value = limctr
ENDSCAN
ELSE
SELECT tsulat
SCAN NOOPTIMIZE FOR ALLTRIM(this.Parent.CboGrdLvl.value) = ALLTRIM(tsulat.grade)
this.parent.text1.value = TRIM(tsulat.sname) + ", " + TRIM(tsulat.fname)
this.Parent.text2.value = TRIM(tsulat.mobile)
this.Parent.text4.value = TRIM(tsulat.idnum)
*Computations ----------------------------------------------
dyus = 0
paytuit = 0
buks = 0
devisor = 0
TRANSSF = 0
TRANSBA = 0
TRANSBO = 0
TRANSUN = 0
TRANSOT = 0
devide = SUBSTR(DTOC(DATE()),1,2)
IF devide = "09"
devisor = 9
ENDIF
IF devide = "10"
devisor = 8
ENDIF
IF devide = "11"
devisor = 7
ENDIF
IF devide = "12"
devisor = 6
ENDIF
IF devide = "01"
devisor = 5
ENDIF
IF devide = "02"
devisor = 4
ENDIF
IF devide = "03"
devisor = 3
ENDIF
IF devide = "04"
devisor = 2
ENDIF
IF devide = "05"
devisor = 1
ENDIF
IF devide = "06"
devisor = 1
ENDIF
IF devide = "07"
devisor = 1
ENDIF
IF devide = "08"
devisor = 1
ENDIF
SELECT trans
SCAN FOR ALLTRIM(this.Parent.text4.value) = trans.idnum
iden = trans.transcode
DO case
CASE iden = "SF"
TRANSSF = TRANSSF + TRANS.transamt
CASE IDEN = "BA"
TRANSBA = TRANSBA + TRANS.transamt
CASE IDEN = "BO"
TRANSBO = TRANSBO + TRANS.transamt
CASE IDEN = "UN"
TRANSUN = TRANSUN + TRANS.transamt
CASE IDEN = "OT"
TRANSOT = TRANSOT + TRANS.transamt
ENDCASE
ENDSCAN
SELECT tsulat
*Computations ----------------------------------------------
twesyon = ((tsulat.tuition - TRANSSF)/devisor)
hapbuks = ((tsulat.books - TRANSBO)/devisor)
hapback = ((tsulat.baccount - TRANSBA)/devisor)
hapuni = ((tsulat.uniform - TRANSUN)/devisor)
hapot = ((tsulat.others - TRANSOT)/devisor)
dyus = twesyon + hapbuks + hapback + hapuni + hapot
todyus = (tsulat.tuition + tsulat.baccount + tsulat.books + tsulat.uniform + tsulat.others) - (transsf + transba + transbo + transun + transot)
*Recording or Replacemnt ----------------------------------
REPLACE tsulat.pbaccnt WITH transba
REPLACE tsulat.ptuition WITH transsf
REPLACE tsulat.puniform WITH transun
REPLACE tsulat.pbooks WITH transbo
REPLACE tsulat.pothers WITH transot
IF ALLTRIM(this.Parent.CboGrdLvl.value) = "F"
this.Parent.text2.value = TRIM(tsulat.adviser)
ELSE
this.Parent.text2.value = TRIM(tsulat.mobile)
ENDIF
*Account Details ------------------------------------------
this.Parent.edit1.Value = this.parent.text1.value + CHR(13) + ;
"AccntDetails: " + CHR(13) +;
"BackAcct.: " + LTRIM(transform(tsulat.baccount,"###,###,###.##"))+ CHR(13) + ;
"SchoolFees: " + LTRIM(transform(tsulat.tuition,"###,###,###.##"))+ CHR(13)+ ;
"Books: " + LTRIM(transform(tsulat.books,"###,###,###.##")) + CHR(13) + ;
"Uniform: " + LTRIM(transform(tsulat.uniform,"###,###,###.##"))+ CHR(13)+;
"Others: " + LTRIM(transform(tsulat.others,"###,###,###.##")) + "."
*Payment Details: ---------------------------------
this.Parent.edit1.Value = "Payment Details:" + CHR(13) + ;
"BackAcct: " + LTRIM(transform(transba,"###,###,###.##"))+ CHR(13) + ;
"SchoolFees: " + LTRIM(transform(transsf,"###,###,###.##"))+ CHR(13)+;
"Books: " + LTRIM(transform(transbo,"###,###,###.##")) + CHR(13) + ;
"Uniform: " + LTRIM(transform(transun,"###,###,###.##"))+CHR(13)+ ;
"Others: " + LTRIM(transform(transot,"###,###,###.##")) + "."
*Amount Due: --------------------------------------
this.Parent.edit1.Value = "Amount due for " + cMONTH(DATE()) + ":" + CHR(13) + ;
"BackAcct: " + LTRIM(transform(hapback,"###,###,###.##")) + CHR(13) + ;
"SchoolFees: " + LTRIM(transform(twesyon,"###,###,###.##")) + CHR(13) + ;
"Books: " + LTRIM(TRANSFORM(hapbuks,"###,###,###.##")) + CHR(13) + ;
"Uniform: " + LTRIM(TRANSFORM(hapuni,"###,###,###.##")) + CHR(13) + ;
"Others: " + LTRIM(transform(hapot,"###,###,###.##")) + CHR(13) + ;
"Total: " + LTRIM(TRANSFORM(dyus,"###,###,###.##")) + CHR(13) + ;
"For reference only!"
limctr = limctr + 1
this.Parent.text3.value = limctr
ENDSCAN
ENDIF
IF ALLTRIM(UPPER(this.Parent.cboGrdLvl.value)) = "A"
SCAN
this.parent.text1.value = TRIM(tsulat.sname) + ", " + TRIM(tsulat.fname)
this.Parent.text2.value = TRIM(tsulat.mobile)
this.Parent.text4.value = TRIM(tsulat.idnum)
*Computations ----------------------------------------------
dyus = 0
paytuit = 0
buks = 0
devisor = 0
TRANSSF = 0
TRANSBA = 0
TRANSBO = 0
TRANSUN = 0
TRANSOT = 0
devide = SUBSTR(DTOC(DATE()),1,2)
IF devide = "09"
devisor = 9
ENDIF
IF devide = "10"
devisor = 8
ENDIF
IF devide = "11"
devisor = 7
ENDIF
IF devide = "12"
devisor = 6
ENDIF
IF devide = "01"
devisor = 5
ENDIF
IF devide = "02"
devisor = 4
ENDIF
IF devide = "03"
devisor = 3
ENDIF
IF devide = "04"
devisor = 2
ENDIF
IF devide = "05"
devisor = 1
ENDIF
IF devide = "06"
devisor = 1
ENDIF
IF devide = "07"
devisor = 1
ENDIF
IF devide = "08"
devisor = 1
ENDIF
SELECT trans
SCAN FOR ALLTRIM(this.Parent.text4.value) = trans.idnum
iden = trans.transcode
DO case
CASE iden = "SF"
TRANSSF = TRANSSF + TRANS.transamt
CASE IDEN = "BA"
TRANSBA = TRANSBA + TRANS.transamt
CASE IDEN = "BO"
TRANSBO = TRANSBO + TRANS.transamt
CASE IDEN = "UN"
TRANSUN = TRANSUN + TRANS.transamt
CASE IDEN = "OT"
TRANSOT = TRANSOT + TRANS.transamt
ENDCASE
ENDSCAN
SELECT tsulat
*Computations ----------------------------------------------
twesyon = ((tsulat.tuition - TRANSSF)/devisor)
hapbuks = ((tsulat.books - TRANSBO)/devisor)
hapback = ((tsulat.baccount - TRANSBA)/devisor)
hapuni = ((tsulat.uniform - TRANSUN)/devisor)
hapot = ((tsulat.others - TRANSOT)/devisor)
dyus = twesyon + hapbuks + hapback + hapuni + hapot
todyus = (tsulat.tuition + tsulat.baccount + tsulat.books + tsulat.uniform + tsulat.others) - (transsf + transba + transbo + transun + transot)
*Recording or Replacemnt ----------------------------------
REPLACE tsulat.pbaccnt WITH transba
REPLACE tsulat.ptuition WITH transsf
REPLACE tsulat.puniform WITH transun
REPLACE tsulat.pbooks WITH transbo
REPLACE tsulat.pothers WITH transot
IF ALLTRIM(this.Parent.CboGrdLvl.value) = "F"
this.Parent.text2.value = TRIM(tsulat.adviser)
ELSE
this.Parent.text2.value = TRIM(tsulat.mobile)
ENDIF
*Account Details ------------------------------------------
this.Parent.edit1.Value = this.parent.text1.value + CHR(13) + ;
"AccntDetails: " + CHR(13) +;
"BackAcct.: " + LTRIM(transform(tsulat.baccount,"###,###,###.##"))+ CHR(13) + ;
"SchoolFees: " + LTRIM(transform(tsulat.tuition,"###,###,###.##"))+ CHR(13)+ ;
"Books: " + LTRIM(transform(tsulat.books,"###,###,###.##")) + CHR(13) + ;
"Uniform: " + LTRIM(transform(tsulat.uniform,"###,###,###.##"))+ CHR(13)+;
"Others: " + LTRIM(transform(tsulat.others,"###,###,###.##")) + "."
*Payment Details: ---------------------------------
this.Parent.edit1.Value = "Payment Details:" + CHR(13) + ;
"BackAcct: " + LTRIM(transform(transba,"###,###,###.##"))+ CHR(13) + ;
"SchoolFees: " + LTRIM(transform(transsf,"###,###,###.##"))+ CHR(13)+;
"Books: " + LTRIM(transform(transbo,"###,###,###.##")) + CHR(13) + ;
"Uniform: " + LTRIM(transform(transun,"###,###,###.##"))+CHR(13)+ ;
"Others: " + LTRIM(transform(transot,"###,###,###.##")) + "."
*Amount Due: --------------------------------------
this.Parent.edit1.Value = "Amount due for " + cMONTH(DATE()) + ":" + CHR(13) + ;
"BackAcct: " + LTRIM(transform(hapback,"###,###,###.##")) + CHR(13) + ;
"SchoolFees: " + LTRIM(transform(twesyon,"###,###,###.##")) + CHR(13) + ;
"Books: " + LTRIM(TRANSFORM(hapbuks,"###,###,###.##")) + CHR(13) + ;
"Uniform: " + LTRIM(TRANSFORM(hapuni,"###,###,###.##")) + CHR(13) + ;
"Others: " + LTRIM(transform(hapot,"###,###,###.##")) + CHR(13) + ;
"Total: " + LTRIM(TRANSFORM(dyus,"###,###,###.##")) + CHR(13) + ;
"For reference only!"
limctr = limctr + 1
this.Parent.text3.value = limctr
ENDSCAN
ENDIF
L = MESSAGEBOX("Message sent to" + " " + ALLTRIM(STR(liMCTR))+ " recipient/s!"+ CHR(13)+ "Would you like to another grade?",4+64+256+4096,"SCMS Account Wave!",15000)
DO CASE
CASE L = -1
this.Parent.text4.value = " "
this.Parent.text1.value = " "
this.Parent.text2.value = " "
this.Parent.edit1.Value = " "
thisform.pgfnames.activepage = 9
CASE L = 6
RETURN
CASE L = 7
this.Parent.text4.value = " "
this.Parent.text1.value = " "
this.Parent.text2.value = " "
this.Parent.edit1.Value = " "
thisform.pgfnames.activepage = 9
ENDCASE
ENDPROC
LOCAL lclScanner as character, limctr as integer
limctr = 0
IF this.Parent.text5.value = 1
SCAN NOOPTIMIZE FOR ALLTRIM(tsulat.special) = "S" AND ALLTRIM(this.Parent.CboGrdLvl.value) = ALLTRIM(tsulat.grade)
this.parent.text1.value = TRIM(tsulat.sname) + ", " + TRIM(tsulat.fname)
this.Parent.text2.value = TRIM(tsulat.mobile)
this.Parent.text4.value = TRIM(tsulat.idnum)
*Computations ----------------------------------------------
dyus = 0
paytuit = 0
buks = 0
devisor = 0
TRANSSF = 0
TRANSBA = 0
TRANSBO = 0
TRANSUN = 0
TRANSOT = 0
devide = SUBSTR(DTOC(DATE()),1,2)
IF devide = "09"
devisor = 9
ENDIF
IF devide = "10"
devisor = 8
ENDIF
IF devide = "11"
devisor = 7
ENDIF
IF devide = "12"
devisor = 6
ENDIF
IF devide = "01"
devisor = 5
ENDIF
IF devide = "02"
devisor = 4
ENDIF
IF devide = "03"
devisor = 3
ENDIF
IF devide = "04"
devisor = 2
ENDIF
IF devide = "05"
devisor = 1
ENDIF
IF devide = "06"
devisor = 1
ENDIF
IF devide = "07"
devisor = 1
ENDIF
IF devide = "08"
devisor = 1
ENDIF
SELECT trans
SCAN FOR ALLTRIM(this.Parent.text4.value) = trans.idnum
iden = trans.transcode
DO case
CASE iden = "SF"
TRANSSF = TRANSSF + TRANS.transamt
CASE IDEN = "BA"
TRANSBA = TRANSBA + TRANS.transamt
CASE IDEN = "BO"
TRANSBO = TRANSBO + TRANS.transamt
CASE IDEN = "UN"
TRANSUN = TRANSUN + TRANS.transamt
CASE IDEN = "OT"
TRANSOT = TRANSOT + TRANS.transamt
ENDCASE
ENDSCAN
SELECT tsulat
*Computations ----------------------------------------------
twesyon = ((tsulat.tuition - TRANSSF)/devisor)
hapbuks = ((tsulat.books - TRANSBO)/devisor)
hapback = ((tsulat.baccount - TRANSBA)/devisor)
hapuni = ((tsulat.uniform - TRANSUN)/devisor)
hapot = ((tsulat.others - TRANSOT)/devisor)
dyus = twesyon + hapbuks + hapback + hapuni + hapot
todyus = (tsulat.tuition + tsulat.baccount + tsulat.books + tsulat.uniform + tsulat.others) - (transsf + transba + transbo + transun + transot)
*Recording or Replacemnt ----------------------------------
REPLACE tsulat.pbaccnt WITH transba
REPLACE tsulat.ptuition WITH transsf
REPLACE tsulat.puniform WITH transun
REPLACE tsulat.pbooks WITH transbo
REPLACE tsulat.pothers WITH transot
IF ALLTRIM(this.Parent.CboGrdLvl.value) = "F"
this.Parent.text2.value = TRIM(tsulat.adviser)
ELSE
this.Parent.text2.value = TRIM(tsulat.mobile)
ENDIF
*Account Details ------------------------------------------
this.Parent.edit1.Value = this.parent.text1.value + CHR(13) + ;
"AccntDetails:" + CHR(13) +;
"BackAcct.: " + LTRIM(transform(tsulat.baccount,"###,###,###.##"))+ CHR(13) + ;
"SchoolFees: " + LTRIM(transform(tsulat.tuition,"###,###,###.##"))+ CHR(13)+ ;
"Books: " + LTRIM(transform(tsulat.books,"###,###,###.##")) + CHR(13) + ;
"Uniform: " + LTRIM(transform(tsulat.uniform,"###,###,###.##"))+ CHR(13)+;
"Others: " + LTRIM(transform(tsulat.others,"###,###,###.##")) + "."
*Payment Details: ---------------------------------
this.Parent.edit1.Value = "Payment Details:" + CHR(13) + ;
"BackAcct: " + LTRIM(transform(transba,"###,###,###.##"))+ CHR(13) + ;
"SchoolFees: " + LTRIM(transform(transsf,"###,###,###.##"))+ CHR(13)+;
"Books: " + LTRIM(transform(transbo,"###,###,###.##")) + CHR(13) + ;
"Uniform: " + LTRIM(transform(transun,"###,###,###.##"))+CHR(13)+ ;
"Others: " + LTRIM(transform(transot,"###,###,###.##")) + "."
*Amount Due: --------------------------------------
this.Parent.edit1.Value = "Amount due for " + cMONTH(DATE()) + ":" + CHR(13) + ;
"BackAcct: " + LTRIM(transform(hapback,"###,###,###.##")) + CHR(13) + ;
"SchoolFees: " + LTRIM(transform(twesyon,"###,###,###.##")) + CHR(13) + ;
"Books: " + LTRIM(TRANSFORM(hapbuks,"###,###,###.##")) + CHR(13) + ;
"Uniform: " + LTRIM(TRANSFORM(hapuni,"###,###,###.##")) + CHR(13) + ;
"Others: " + LTRIM(transform(hapot,"###,###,###.##")) + CHR(13) + ;
"Total: " + LTRIM(TRANSFORM(dyus,"###,###,###.##")) + CHR(13) + ;
"For reference only!"
limctr = limctr + 1
this.Parent.text3.value = limctr
ENDSCAN
ELSE
SELECT tsulat
SCAN NOOPTIMIZE FOR ALLTRIM(this.Parent.CboGrdLvl.value) = ALLTRIM(tsulat.grade)
this.parent.text1.value = TRIM(tsulat.sname) + ", " + TRIM(tsulat.fname)
this.Parent.text2.value = TRIM(tsulat.mobile)
this.Parent.text4.value = TRIM(tsulat.idnum)
*Computations ----------------------------------------------
dyus = 0
paytuit = 0
buks = 0
devisor = 0
TRANSSF = 0
TRANSBA = 0
TRANSBO = 0
TRANSUN = 0
TRANSOT = 0
devide = SUBSTR(DTOC(DATE()),1,2)
IF devide = "09"
devisor = 9
ENDIF
IF devide = "10"
devisor = 8
ENDIF
IF devide = "11"
devisor = 7
ENDIF
IF devide = "12"
devisor = 6
ENDIF
IF devide = "01"
devisor = 5
ENDIF
IF devide = "02"
devisor = 4
ENDIF
IF devide = "03"
devisor = 3
ENDIF
IF devide = "04"
devisor = 2
ENDIF
IF devide = "05"
devisor = 1
ENDIF
IF devide = "06"
devisor = 1
ENDIF
IF devide = "07"
devisor = 1
ENDIF
IF devide = "08"
devisor = 1
ENDIF
SELECT trans
SCAN FOR ALLTRIM(this.Parent.text4.value) = trans.idnum
iden = trans.transcode
DO case
CASE iden = "SF"
TRANSSF = TRANSSF + TRANS.transamt
CASE IDEN = "BA"
TRANSBA = TRANSBA + TRANS.transamt
CASE IDEN = "BO"
TRANSBO = TRANSBO + TRANS.transamt
CASE IDEN = "UN"
TRANSUN = TRANSUN + TRANS.transamt
CASE IDEN = "OT"
TRANSOT = TRANSOT + TRANS.transamt
ENDCASE
ENDSCAN
SELECT tsulat
*Computations ----------------------------------------------
twesyon = ((tsulat.tuition - TRANSSF)/devisor)
hapbuks = ((tsulat.books - TRANSBO)/devisor)
hapback = ((tsulat.baccount - TRANSBA)/devisor)
hapuni = ((tsulat.uniform - TRANSUN)/devisor)
hapot = ((tsulat.others - TRANSOT)/devisor)
dyus = twesyon + hapbuks + hapback + hapuni + hapot
todyus = (tsulat.tuition + tsulat.baccount + tsulat.books + tsulat.uniform + tsulat.others) - (transsf + transba + transbo + transun + transot)
*Recording or Replacemnt ----------------------------------
REPLACE tsulat.pbaccnt WITH transba
REPLACE tsulat.ptuition WITH transsf
REPLACE tsulat.puniform WITH transun
REPLACE tsulat.pbooks WITH transbo
REPLACE tsulat.pothers WITH transot
IF ALLTRIM(this.Parent.CboGrdLvl.value) = "F"
this.Parent.text2.value = TRIM(tsulat.adviser)
ELSE
this.Parent.text2.value = TRIM(tsulat.mobile)
ENDIF
*Account Details ------------------------------------------
this.Parent.edit1.Value = this.parent.text1.value + CHR(13) + ;
"AccntDetails: " + CHR(13) +;
"BackAcct.: " + LTRIM(transform(tsulat.baccount,"###,###,###.##"))+ CHR(13) + ;
"SchoolFees: " + LTRIM(transform(tsulat.tuition,"###,###,###.##"))+ CHR(13)+ ;
"Books: " + LTRIM(transform(tsulat.books,"###,###,###.##")) + CHR(13) + ;
"Uniform: " + LTRIM(transform(tsulat.uniform,"###,###,###.##"))+ CHR(13)+;
"Others: " + LTRIM(transform(tsulat.others,"###,###,###.##")) + "."
*Payment Details: ---------------------------------
this.Parent.edit1.Value = "Payment Details:" + CHR(13) + ;
"BackAcct: " + LTRIM(transform(transba,"###,###,###.##"))+ CHR(13) + ;
"SchoolFees: " + LTRIM(transform(transsf,"###,###,###.##"))+ CHR(13)+;
"Books: " + LTRIM(transform(transbo,"###,###,###.##")) + CHR(13) + ;
"Uniform: " + LTRIM(transform(transun,"###,###,###.##"))+CHR(13)+ ;
"Others: " + LTRIM(transform(transot,"###,###,###.##")) + "."
*Amount Due: --------------------------------------
this.Parent.edit1.Value = "Amount due for " + cMONTH(DATE()) + ":" + CHR(13) + ;
"BackAcct: " + LTRIM(transform(hapback,"###,###,###.##")) + CHR(13) + ;
"SchoolFees: " + LTRIM(transform(twesyon,"###,###,###.##")) + CHR(13) + ;
"Books: " + LTRIM(TRANSFORM(hapbuks,"###,###,###.##")) + CHR(13) + ;
"Uniform: " + LTRIM(TRANSFORM(hapuni,"###,###,###.##")) + CHR(13) + ;
"Others: " + LTRIM(transform(hapot,"###,###,###.##")) + CHR(13) + ;
"Total: " + LTRIM(TRANSFORM(dyus,"###,###,###.##")) + CHR(13) + ;
"For reference only!"
limctr = limctr + 1
this.Parent.text3.value = limctr
ENDSCAN
ENDIF
IF ALLTRIM(UPPER(this.Parent.cboGrdLvl.value)) = "A"
SCAN
this.parent.text1.value = TRIM(tsulat.sname) + ", " + TRIM(tsulat.fname)
this.Parent.text2.value = TRIM(tsulat.mobile)
this.Parent.text4.value = TRIM(tsulat.idnum)
*Computations ----------------------------------------------
dyus = 0
paytuit = 0
buks = 0
devisor = 0
TRANSSF = 0
TRANSBA = 0
TRANSBO = 0
TRANSUN = 0
TRANSOT = 0
devide = SUBSTR(DTOC(DATE()),1,2)
IF devide = "09"
devisor = 9
ENDIF
IF devide = "10"
devisor = 8
ENDIF
IF devide = "11"
devisor = 7
ENDIF
IF devide = "12"
devisor = 6
ENDIF
IF devide = "01"
devisor = 5
ENDIF
IF devide = "02"
devisor = 4
ENDIF
IF devide = "03"
devisor = 3
ENDIF
IF devide = "04"
devisor = 2
ENDIF
IF devide = "05"
devisor = 1
ENDIF
IF devide = "06"
devisor = 1
ENDIF
IF devide = "07"
devisor = 1
ENDIF
IF devide = "08"
devisor = 1
ENDIF
SELECT trans
SCAN FOR ALLTRIM(this.Parent.text4.value) = trans.idnum
iden = trans.transcode
DO case
CASE iden = "SF"
TRANSSF = TRANSSF + TRANS.transamt
CASE IDEN = "BA"
TRANSBA = TRANSBA + TRANS.transamt
CASE IDEN = "BO"
TRANSBO = TRANSBO + TRANS.transamt
CASE IDEN = "UN"
TRANSUN = TRANSUN + TRANS.transamt
CASE IDEN = "OT"
TRANSOT = TRANSOT + TRANS.transamt
ENDCASE
ENDSCAN
SELECT tsulat
*Computations ----------------------------------------------
twesyon = ((tsulat.tuition - TRANSSF)/devisor)
hapbuks = ((tsulat.books - TRANSBO)/devisor)
hapback = ((tsulat.baccount - TRANSBA)/devisor)
hapuni = ((tsulat.uniform - TRANSUN)/devisor)
hapot = ((tsulat.others - TRANSOT)/devisor)
dyus = twesyon + hapbuks + hapback + hapuni + hapot
todyus = (tsulat.tuition + tsulat.baccount + tsulat.books + tsulat.uniform + tsulat.others) - (transsf + transba + transbo + transun + transot)
*Recording or Replacemnt ----------------------------------
REPLACE tsulat.pbaccnt WITH transba
REPLACE tsulat.ptuition WITH transsf
REPLACE tsulat.puniform WITH transun
REPLACE tsulat.pbooks WITH transbo
REPLACE tsulat.pothers WITH transot
IF ALLTRIM(this.Parent.CboGrdLvl.value) = "F"
this.Parent.text2.value = TRIM(tsulat.adviser)
ELSE
this.Parent.text2.value = TRIM(tsulat.mobile)
ENDIF
*Account Details ------------------------------------------
this.Parent.edit1.Value = this.parent.text1.value + CHR(13) + ;
"AccntDetails: " + CHR(13) +;
"BackAcct.: " + LTRIM(transform(tsulat.baccount,"###,###,###.##"))+ CHR(13) + ;
"SchoolFees: " + LTRIM(transform(tsulat.tuition,"###,###,###.##"))+ CHR(13)+ ;
"Books: " + LTRIM(transform(tsulat.books,"###,###,###.##")) + CHR(13) + ;
"Uniform: " + LTRIM(transform(tsulat.uniform,"###,###,###.##"))+ CHR(13)+;
"Others: " + LTRIM(transform(tsulat.others,"###,###,###.##")) + "."
*Payment Details: ---------------------------------
this.Parent.edit1.Value = "Payment Details:" + CHR(13) + ;
"BackAcct: " + LTRIM(transform(transba,"###,###,###.##"))+ CHR(13) + ;
"SchoolFees: " + LTRIM(transform(transsf,"###,###,###.##"))+ CHR(13)+;
"Books: " + LTRIM(transform(transbo,"###,###,###.##")) + CHR(13) + ;
"Uniform: " + LTRIM(transform(transun,"###,###,###.##"))+CHR(13)+ ;
"Others: " + LTRIM(transform(transot,"###,###,###.##")) + "."
*Amount Due: --------------------------------------
this.Parent.edit1.Value = "Amount due for " + cMONTH(DATE()) + ":" + CHR(13) + ;
"BackAcct: " + LTRIM(transform(hapback,"###,###,###.##")) + CHR(13) + ;
"SchoolFees: " + LTRIM(transform(twesyon,"###,###,###.##")) + CHR(13) + ;
"Books: " + LTRIM(TRANSFORM(hapbuks,"###,###,###.##")) + CHR(13) + ;
"Uniform: " + LTRIM(TRANSFORM(hapuni,"###,###,###.##")) + CHR(13) + ;
"Others: " + LTRIM(transform(hapot,"###,###,###.##")) + CHR(13) + ;
"Total: " + LTRIM(TRANSFORM(dyus,"###,###,###.##")) + CHR(13) + ;
"For reference only!"
limctr = limctr + 1
this.Parent.text3.value = limctr
ENDSCAN
ENDIF
L = MESSAGEBOX("Message sent to" + " " + ALLTRIM(STR(liMCTR))+ " recipient/s!"+ CHR(13)+ "Would you like to another grade?",4+64+256+4096,"SCMS Account Wave!",15000)
DO CASE
CASE L = -1
this.Parent.text4.value = " "
this.Parent.text1.value = " "
this.Parent.text2.value = " "
this.Parent.edit1.Value = " "
thisform.pgfnames.activepage = 9
CASE L = 6
RETURN
CASE L = 7
this.Parent.text4.value = " "
this.Parent.text1.value = " "
this.Parent.text2.value = " "
this.Parent.edit1.Value = " "
thisform.pgfnames.activepage = 9
ENDCASE
ENDPROC